All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] serial: bfin_5xx: IRDA is not affected by anomaly 05000230
@ 2010-05-23  8:40 Mike Frysinger
  0 siblings, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2010-05-23  8:40 UTC (permalink / raw
  To: linux-serial, Greg Kroah-Hartman, Alan Cox
  Cc: uclinux-dist-devel, linux-kernel, Graf Yang

From: Graf Yang <graf.yang@analog.com>

Anomaly 05000230 (over sampling of the UART STOP bit) applies only when
the peripheral is operating in UART mode.  So drop the anomaly handling
when the UART is in IRDA mode.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 drivers/serial/bfin_5xx.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 96f7e74..a78652b 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -869,7 +869,12 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
 	}
 
 	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
-	quot = uart_get_divisor(port, baud) - ANOMALY_05000230;
+	quot = uart_get_divisor(port, baud);
+
+	/* If discipline is not IRDA, apply ANOMALY_05000230 */
+	if (termios->c_line != N_IRDA)
+		quot -= ANOMALY_05000230;
+
 	spin_lock_irqsave(&uart->port.lock, flags);
 
 	UART_SET_ANOMALY_THRESHOLD(uart, USEC_PER_SEC / baud * 15);
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 1/2] serial: bfin_5xx: IRDA is not affected by anomaly 05000230
@ 2010-05-31 11:29 Mike Frysinger
  2010-05-31 11:29 ` [PATCH 2/2] serial: bfin_5xx: fix typo in IER check Mike Frysinger
  2010-06-03 17:41 ` [PATCH 1/2] serial: bfin_5xx: IRDA is not affected by anomaly 05000230 Greg KH
  0 siblings, 2 replies; 5+ messages in thread
From: Mike Frysinger @ 2010-05-31 11:29 UTC (permalink / raw
  To: linux-serial, Greg Kroah-Hartman, Alan Cox
  Cc: uclinux-dist-devel, linux-kernel, Graf Yang

From: Graf Yang <graf.yang@analog.com>

Anomaly 05000230 (over sampling of the UART STOP bit) applies only when
the peripheral is operating in UART mode.  So drop the anomaly handling
when the UART is in IRDA mode.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 drivers/serial/bfin_5xx.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 96f7e74..a78652b 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -869,7 +869,12 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
 	}
 
 	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
-	quot = uart_get_divisor(port, baud) - ANOMALY_05000230;
+	quot = uart_get_divisor(port, baud);
+
+	/* If discipline is not IRDA, apply ANOMALY_05000230 */
+	if (termios->c_line != N_IRDA)
+		quot -= ANOMALY_05000230;
+
 	spin_lock_irqsave(&uart->port.lock, flags);
 
 	UART_SET_ANOMALY_THRESHOLD(uart, USEC_PER_SEC / baud * 15);
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] serial: bfin_5xx: fix typo in IER check
  2010-05-31 11:29 [PATCH 1/2] serial: bfin_5xx: IRDA is not affected by anomaly 05000230 Mike Frysinger
@ 2010-05-31 11:29 ` Mike Frysinger
  2010-06-03 17:41 ` [PATCH 1/2] serial: bfin_5xx: IRDA is not affected by anomaly 05000230 Greg KH
  1 sibling, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2010-05-31 11:29 UTC (permalink / raw
  To: linux-serial, Greg Kroah-Hartman, Alan Cox
  Cc: uclinux-dist-devel, linux-kernel, Sonic Zhang

From: Sonic Zhang <sonic.zhang@analog.com>

This most likely won't cause problems on systems as people don't typically
enable GPIO RTS/CTS if they don't actually use it.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 drivers/serial/bfin_5xx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index a78652b..511cbf6 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -797,7 +797,7 @@ static void bfin_serial_shutdown(struct uart_port *port)
 		gpio_free(uart->rts_pin);
 #endif
 #ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
-	if (UART_GET_IER(uart) && EDSSI)
+	if (UART_GET_IER(uart) & EDSSI)
 		free_irq(uart->status_irq, uart);
 #endif
 }
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] serial: bfin_5xx: IRDA is not affected by anomaly 05000230
  2010-05-31 11:29 [PATCH 1/2] serial: bfin_5xx: IRDA is not affected by anomaly 05000230 Mike Frysinger
  2010-05-31 11:29 ` [PATCH 2/2] serial: bfin_5xx: fix typo in IER check Mike Frysinger
@ 2010-06-03 17:41 ` Greg KH
  2010-06-03 17:42   ` Greg KH
  1 sibling, 1 reply; 5+ messages in thread
From: Greg KH @ 2010-06-03 17:41 UTC (permalink / raw
  To: Mike Frysinger
  Cc: linux-serial, Greg Kroah-Hartman, Alan Cox, uclinux-dist-devel,
	linux-kernel, Graf Yang

On Mon, May 31, 2010 at 07:29:31AM -0400, Mike Frysinger wrote:
> From: Graf Yang <graf.yang@analog.com>
> 
> Anomaly 05000230 (over sampling of the UART STOP bit) applies only when
> the peripheral is operating in UART mode.  So drop the anomaly handling
> when the UART is in IRDA mode.
> 
> Signed-off-by: Graf Yang <graf.yang@analog.com>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
>  drivers/serial/bfin_5xx.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
> index 96f7e74..a78652b 100644
> --- a/drivers/serial/bfin_5xx.c
> +++ b/drivers/serial/bfin_5xx.c
> @@ -869,7 +869,12 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
>  	}
>  
>  	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
> -	quot = uart_get_divisor(port, baud) - ANOMALY_05000230;
> +	quot = uart_get_divisor(port, baud);
> +
> +	/* If discipline is not IRDA, apply ANOMALY_05000230 */
> +	if (termios->c_line != N_IRDA)
> +		quot -= ANOMALY_05000230;
> +

This can't be applied to the current tree, did you make it backwards?

confused,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] serial: bfin_5xx: IRDA is not affected by anomaly 05000230
  2010-06-03 17:41 ` [PATCH 1/2] serial: bfin_5xx: IRDA is not affected by anomaly 05000230 Greg KH
@ 2010-06-03 17:42   ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2010-06-03 17:42 UTC (permalink / raw
  To: Mike Frysinger
  Cc: linux-serial, Greg Kroah-Hartman, Alan Cox, uclinux-dist-devel,
	linux-kernel, Graf Yang

On Thu, Jun 03, 2010 at 10:41:31AM -0700, Greg KH wrote:
> On Mon, May 31, 2010 at 07:29:31AM -0400, Mike Frysinger wrote:
> > From: Graf Yang <graf.yang@analog.com>
> > 
> > Anomaly 05000230 (over sampling of the UART STOP bit) applies only when
> > the peripheral is operating in UART mode.  So drop the anomaly handling
> > when the UART is in IRDA mode.
> > 
> > Signed-off-by: Graf Yang <graf.yang@analog.com>
> > Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> > ---
> >  drivers/serial/bfin_5xx.c |    7 ++++++-
> >  1 files changed, 6 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
> > index 96f7e74..a78652b 100644
> > --- a/drivers/serial/bfin_5xx.c
> > +++ b/drivers/serial/bfin_5xx.c
> > @@ -869,7 +869,12 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
> >  	}
> >  
> >  	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
> > -	quot = uart_get_divisor(port, baud) - ANOMALY_05000230;
> > +	quot = uart_get_divisor(port, baud);
> > +
> > +	/* If discipline is not IRDA, apply ANOMALY_05000230 */
> > +	if (termios->c_line != N_IRDA)
> > +		quot -= ANOMALY_05000230;
> > +
> 
> This can't be applied to the current tree, did you make it backwards?

Crap, that's because I already had it in my tree, doh...

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-06-03 17:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-31 11:29 [PATCH 1/2] serial: bfin_5xx: IRDA is not affected by anomaly 05000230 Mike Frysinger
2010-05-31 11:29 ` [PATCH 2/2] serial: bfin_5xx: fix typo in IER check Mike Frysinger
2010-06-03 17:41 ` [PATCH 1/2] serial: bfin_5xx: IRDA is not affected by anomaly 05000230 Greg KH
2010-06-03 17:42   ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2010-05-23  8:40 Mike Frysinger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.