* [PATCH 1/4] serial: bfin_5xx: remove useless gpio handling with hard flow control
@ 2010-01-19 11:13 Mike Frysinger
2010-01-19 11:13 ` [PATCH 2/4] serial: bfin_5xx: need to disable DMA TX interrupt too Mike Frysinger
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Mike Frysinger @ 2010-01-19 11:13 UTC (permalink / raw)
To: linux-serial, Alan Cox; +Cc: linux-kernel, Andrew Morton, Sonic Zhang
From: Sonic Zhang <sonic.zhang@analog.com>
For UARTs that have dedicated hardware flow control support, there will be
no gpios to request/free as they are part of the normal peripheral pins.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
drivers/serial/bfin_5xx.c | 16 +---------------
1 files changed, 1 insertions(+), 15 deletions(-)
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 50abb7e..15843cc 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -746,15 +746,6 @@ static int bfin_serial_startup(struct uart_port *port)
Status interrupt.\n");
}
- if (uart->cts_pin >= 0) {
- gpio_request(uart->cts_pin, DRIVER_NAME);
- gpio_direction_output(uart->cts_pin, 1);
- }
- if (uart->rts_pin >= 0) {
- gpio_request(uart->rts_pin, DRIVER_NAME);
- gpio_direction_output(uart->rts_pin, 0);
- }
-
/* CTS RTS PINs are negative assertive. */
UART_PUT_MCR(uart, ACTS);
UART_SET_IER(uart, EDSSI);
@@ -801,10 +792,6 @@ static void bfin_serial_shutdown(struct uart_port *port)
gpio_free(uart->rts_pin);
#endif
#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
- if (uart->cts_pin >= 0)
- gpio_free(uart->cts_pin);
- if (uart->rts_pin >= 0)
- gpio_free(uart->rts_pin);
if (UART_GET_IER(uart) && EDSSI)
free_irq(uart->status_irq, uart);
#endif
@@ -1409,8 +1396,7 @@ static int bfin_serial_remove(struct platform_device *dev)
continue;
uart_remove_one_port(&bfin_serial_reg, &bfin_serial_ports[i].port);
bfin_serial_ports[i].port.dev = NULL;
-#if defined(CONFIG_SERIAL_BFIN_CTSRTS) || \
- defined(CONFIG_SERIAL_BFIN_HARD_CTSRTS)
+#if defined(CONFIG_SERIAL_BFIN_CTSRTS)
gpio_free(bfin_serial_ports[i].cts_pin);
gpio_free(bfin_serial_ports[i].rts_pin);
#endif
--
1.6.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/4] serial: bfin_5xx: need to disable DMA TX interrupt too
2010-01-19 11:13 [PATCH 1/4] serial: bfin_5xx: remove useless gpio handling with hard flow control Mike Frysinger
@ 2010-01-19 11:13 ` Mike Frysinger
2010-01-19 11:13 ` [PATCH 3/4] serial: bfin_5xx: kgdboc should accept gdb break only when it is active Mike Frysinger
2010-01-19 11:13 ` [PATCH 4/4] serial: bfin_5xx: pull in linux/io.h for ioremap prototypes Mike Frysinger
2 siblings, 0 replies; 7+ messages in thread
From: Mike Frysinger @ 2010-01-19 11:13 UTC (permalink / raw)
To: linux-serial, Alan Cox; +Cc: linux-kernel, Andrew Morton, Graf Yang
From: Graf Yang <graf.yang@analog.com>
If we don't disable the DMA TX channel, an inopportune timeout will
trigger the interrupt handler and may cause a dead lock with the spin_lock.
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
drivers/serial/bfin_5xx.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 15843cc..b5a9b37 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -488,6 +488,7 @@ void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart)
{
int x_pos, pos;
+ dma_disable_irq(uart->tx_dma_channel);
dma_disable_irq(uart->rx_dma_channel);
spin_lock_bh(&uart->port.lock);
@@ -521,6 +522,7 @@ void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart)
}
spin_unlock_bh(&uart->port.lock);
+ dma_enable_irq(uart->tx_dma_channel);
dma_enable_irq(uart->rx_dma_channel);
mod_timer(&(uart->rx_dma_timer), jiffies + DMA_RX_FLUSH_JIFFIES);
--
1.6.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/4] serial: bfin_5xx: kgdboc should accept gdb break only when it is active
2010-01-19 11:13 [PATCH 1/4] serial: bfin_5xx: remove useless gpio handling with hard flow control Mike Frysinger
2010-01-19 11:13 ` [PATCH 2/4] serial: bfin_5xx: need to disable DMA TX interrupt too Mike Frysinger
@ 2010-01-19 11:13 ` Mike Frysinger
2010-01-26 0:11 ` Andrew Morton
2010-01-19 11:13 ` [PATCH 4/4] serial: bfin_5xx: pull in linux/io.h for ioremap prototypes Mike Frysinger
2 siblings, 1 reply; 7+ messages in thread
From: Mike Frysinger @ 2010-01-19 11:13 UTC (permalink / raw)
To: linux-serial, Alan Cox; +Cc: linux-kernel, Andrew Morton, Sonic Zhang
From: Sonic Zhang <sonic.zhang@analog.com>
If we always check for gdb breaks even when it isn't active, we get false
positives on normal code and the system panics.
URL: http://blackfin.uclinux.org/gf/tracker/5277
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
drivers/serial/bfin_5xx.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index b5a9b37..6b87955 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -237,7 +237,8 @@ static void bfin_serial_rx_chars(struct bfin_serial_port *uart)
#if defined(CONFIG_KGDB_SERIAL_CONSOLE) || \
defined(CONFIG_KGDB_SERIAL_CONSOLE_MODULE)
- if (kgdb_connected && kgdboc_port_line == uart->port.line)
+ if (kgdb_connected && kgdboc_port_line == uart->port.line
+ && kgdboc_break_enabled)
if (ch == 0x3) {/* Ctrl + C */
kgdb_breakpoint();
return;
--
1.6.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 3/4] serial: bfin_5xx: kgdboc should accept gdb break only when it is active
2010-01-19 11:13 ` [PATCH 3/4] serial: bfin_5xx: kgdboc should accept gdb break only when it is active Mike Frysinger
@ 2010-01-26 0:11 ` Andrew Morton
2010-01-26 1:57 ` Mike Frysinger
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2010-01-26 0:11 UTC (permalink / raw)
To: Mike Frysinger; +Cc: linux-serial, Alan Cox, linux-kernel, Sonic Zhang
On Tue, 19 Jan 2010 06:13:12 -0500
Mike Frysinger <vapier@gentoo.org> wrote:
> From: Sonic Zhang <sonic.zhang@analog.com>
>
> If we always check for gdb breaks even when it isn't active, we get false
> positives on normal code and the system panics.
>
> URL: http://blackfin.uclinux.org/gf/tracker/5277
> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
> drivers/serial/bfin_5xx.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
> index b5a9b37..6b87955 100644
> --- a/drivers/serial/bfin_5xx.c
> +++ b/drivers/serial/bfin_5xx.c
> @@ -237,7 +237,8 @@ static void bfin_serial_rx_chars(struct bfin_serial_port *uart)
>
> #if defined(CONFIG_KGDB_SERIAL_CONSOLE) || \
> defined(CONFIG_KGDB_SERIAL_CONSOLE_MODULE)
> - if (kgdb_connected && kgdboc_port_line == uart->port.line)
> + if (kgdb_connected && kgdboc_port_line == uart->port.line
> + && kgdboc_break_enabled)
> if (ch == 0x3) {/* Ctrl + C */
> kgdb_breakpoint();
> return;
I expect that we want
[PATCH 2/4] serial: bfin_5xx: need to disable DMA TX interrupt too
and
[PATCH 3/4] serial: bfin_5xx: kgdboc should accept gdb break only when it is active
in 2.6.33 and the other two in 2.6.34?
If so then should either of the above two also be backported into
-stable?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3/4] serial: bfin_5xx: kgdboc should accept gdb break only when it is active
2010-01-26 0:11 ` Andrew Morton
@ 2010-01-26 1:57 ` Mike Frysinger
0 siblings, 0 replies; 7+ messages in thread
From: Mike Frysinger @ 2010-01-26 1:57 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-serial, Alan Cox, linux-kernel, Sonic Zhang
On Mon, Jan 25, 2010 at 19:11, Andrew Morton wrote:
> I expect that we want
>
> [PATCH 2/4] serial: bfin_5xx: need to disable DMA TX interrupt too
> and
> [PATCH 3/4] serial: bfin_5xx: kgdboc should accept gdb break only when it is active
>
> in 2.6.33 and the other two in 2.6.34?
>
> If so then should either of the above two also be backported into
> -stable?
sounds OK to me, thanks
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 4/4] serial: bfin_5xx: pull in linux/io.h for ioremap prototypes
2010-01-19 11:13 [PATCH 1/4] serial: bfin_5xx: remove useless gpio handling with hard flow control Mike Frysinger
2010-01-19 11:13 ` [PATCH 2/4] serial: bfin_5xx: need to disable DMA TX interrupt too Mike Frysinger
2010-01-19 11:13 ` [PATCH 3/4] serial: bfin_5xx: kgdboc should accept gdb break only when it is active Mike Frysinger
@ 2010-01-19 11:13 ` Mike Frysinger
2 siblings, 0 replies; 7+ messages in thread
From: Mike Frysinger @ 2010-01-19 11:13 UTC (permalink / raw)
To: linux-serial, Alan Cox; +Cc: linux-kernel, Andrew Morton
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
drivers/serial/bfin_5xx.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 6b87955..fcf273e 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -14,6 +14,7 @@
#include <linux/module.h>
#include <linux/ioport.h>
+#include <linux/io.h>
#include <linux/init.h>
#include <linux/console.h>
#include <linux/sysrq.h>
--
1.6.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 1/4] serial: bfin_5xx: remove useless gpio handling with hard flow control
@ 2009-09-17 21:52 Mike Frysinger
2009-09-17 21:52 ` [PATCH 3/4] serial: bfin_5xx: kgdboc should accept gdb break only when it is active Mike Frysinger
0 siblings, 1 reply; 7+ messages in thread
From: Mike Frysinger @ 2009-09-17 21:52 UTC (permalink / raw)
To: linux-serial, Alan Cox; +Cc: linux-kernel, uclinux-dist-devel, Sonic Zhang
From: Sonic Zhang <sonic.zhang@analog.com>
For UARTs that have dedicated hardware flow control support, there will be
no gpios to request/free as they are part of the normal peripheral pins.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
drivers/serial/bfin_5xx.c | 16 +---------------
1 files changed, 1 insertions(+), 15 deletions(-)
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index b4a7650..1b7fd62 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -742,15 +742,6 @@ static int bfin_serial_startup(struct uart_port *port)
Status interrupt.\n");
}
- if (uart->cts_pin >= 0) {
- gpio_request(uart->cts_pin, DRIVER_NAME);
- gpio_direction_output(uart->cts_pin, 1);
- }
- if (uart->rts_pin >= 0) {
- gpio_request(uart->rts_pin, DRIVER_NAME);
- gpio_direction_output(uart->rts_pin, 0);
- }
-
/* CTS RTS PINs are negative assertive. */
UART_PUT_MCR(uart, ACTS);
UART_SET_IER(uart, EDSSI);
@@ -797,10 +788,6 @@ static void bfin_serial_shutdown(struct uart_port *port)
gpio_free(uart->rts_pin);
#endif
#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
- if (uart->cts_pin >= 0)
- gpio_free(uart->cts_pin);
- if (uart->rts_pin >= 0)
- gpio_free(uart->rts_pin);
if (UART_GET_IER(uart) && EDSSI)
free_irq(uart->status_irq, uart);
#endif
@@ -1405,8 +1392,7 @@ static int bfin_serial_remove(struct platform_device *dev)
continue;
uart_remove_one_port(&bfin_serial_reg, &bfin_serial_ports[i].port);
bfin_serial_ports[i].port.dev = NULL;
-#if defined(CONFIG_SERIAL_BFIN_CTSRTS) || \
- defined(CONFIG_SERIAL_BFIN_HARD_CTSRTS)
+#if defined(CONFIG_SERIAL_BFIN_CTSRTS)
gpio_free(bfin_serial_ports[i].cts_pin);
gpio_free(bfin_serial_ports[i].rts_pin);
#endif
--
1.6.5.rc1
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-01-26 1:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-19 11:13 [PATCH 1/4] serial: bfin_5xx: remove useless gpio handling with hard flow control Mike Frysinger
2010-01-19 11:13 ` [PATCH 2/4] serial: bfin_5xx: need to disable DMA TX interrupt too Mike Frysinger
2010-01-19 11:13 ` [PATCH 3/4] serial: bfin_5xx: kgdboc should accept gdb break only when it is active Mike Frysinger
2010-01-26 0:11 ` Andrew Morton
2010-01-26 1:57 ` Mike Frysinger
2010-01-19 11:13 ` [PATCH 4/4] serial: bfin_5xx: pull in linux/io.h for ioremap prototypes Mike Frysinger
-- strict thread matches above, loose matches on Subject: below --
2009-09-17 21:52 [PATCH 1/4] serial: bfin_5xx: remove useless gpio handling with hard flow control Mike Frysinger
2009-09-17 21:52 ` [PATCH 3/4] serial: bfin_5xx: kgdboc should accept gdb break only when it is active Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).