aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/serial/bfin_5xx.c16
-rw-r--r--include/asm-blackfin/mach-bf527/bfin_serial_5xx.h3
-rw-r--r--include/asm-blackfin/mach-bf533/bfin_serial_5xx.h2
-rw-r--r--include/asm-blackfin/mach-bf537/bfin_serial_5xx.h3
-rw-r--r--include/asm-blackfin/mach-bf548/bfin_serial_5xx.h3
-rw-r--r--include/asm-blackfin/mach-bf561/bfin_serial_5xx.h2
6 files changed, 10 insertions, 19 deletions
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index a07df539e52..af866ab3f5a 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -53,7 +53,6 @@
53#ifdef CONFIG_SERIAL_BFIN_DMA 53#ifdef CONFIG_SERIAL_BFIN_DMA
54static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart); 54static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart);
55#else 55#else
56static void bfin_serial_do_work(struct work_struct *work);
57static void bfin_serial_tx_chars(struct bfin_serial_port *uart); 56static void bfin_serial_tx_chars(struct bfin_serial_port *uart);
58#endif 57#endif
59 58
@@ -372,8 +371,9 @@ static irqreturn_t bfin_serial_tx_int(int irq, void *dev_id)
372 371
373 return IRQ_HANDLED; 372 return IRQ_HANDLED;
374} 373}
374#endif
375 375
376 376#ifdef CONFIG_SERIAL_BFIN_CTSRTS
377static void bfin_serial_do_work(struct work_struct *work) 377static void bfin_serial_do_work(struct work_struct *work)
378{ 378{
379 struct bfin_serial_port *uart = container_of(work, struct bfin_serial_port, cts_workqueue); 379 struct bfin_serial_port *uart = container_of(work, struct bfin_serial_port, cts_workqueue);
@@ -607,22 +607,17 @@ static void bfin_serial_mctrl_check(struct bfin_serial_port *uart)
607{ 607{
608#ifdef CONFIG_SERIAL_BFIN_CTSRTS 608#ifdef CONFIG_SERIAL_BFIN_CTSRTS
609 unsigned int status; 609 unsigned int status;
610# ifdef CONFIG_SERIAL_BFIN_DMA
611 struct uart_info *info = uart->port.info; 610 struct uart_info *info = uart->port.info;
612 struct tty_struct *tty = info->tty; 611 struct tty_struct *tty = info->tty;
613 612
614 status = bfin_serial_get_mctrl(&uart->port); 613 status = bfin_serial_get_mctrl(&uart->port);
614 uart_handle_cts_change(&uart->port, status & TIOCM_CTS);
615 if (!(status & TIOCM_CTS)) { 615 if (!(status & TIOCM_CTS)) {
616 tty->hw_stopped = 1; 616 tty->hw_stopped = 1;
617 schedule_work(&uart->cts_workqueue);
617 } else { 618 } else {
618 tty->hw_stopped = 0; 619 tty->hw_stopped = 0;
619 } 620 }
620# else
621 status = bfin_serial_get_mctrl(&uart->port);
622 uart_handle_cts_change(&uart->port, status & TIOCM_CTS);
623 if (!(status & TIOCM_CTS))
624 schedule_work(&uart->cts_workqueue);
625# endif
626#endif 621#endif
627} 622}
628 623
@@ -939,10 +934,9 @@ static void __init bfin_serial_init_ports(void)
939 bfin_serial_ports[i].rx_dma_channel = 934 bfin_serial_ports[i].rx_dma_channel =
940 bfin_serial_resource[i].uart_rx_dma_channel; 935 bfin_serial_resource[i].uart_rx_dma_channel;
941 init_timer(&(bfin_serial_ports[i].rx_dma_timer)); 936 init_timer(&(bfin_serial_ports[i].rx_dma_timer));
942#else
943 INIT_WORK(&bfin_serial_ports[i].cts_workqueue, bfin_serial_do_work);
944#endif 937#endif
945#ifdef CONFIG_SERIAL_BFIN_CTSRTS 938#ifdef CONFIG_SERIAL_BFIN_CTSRTS
939 INIT_WORK(&bfin_serial_ports[i].cts_workqueue, bfin_serial_do_work);
946 bfin_serial_ports[i].cts_pin = 940 bfin_serial_ports[i].cts_pin =
947 bfin_serial_resource[i].uart_cts_pin; 941 bfin_serial_resource[i].uart_cts_pin;
948 bfin_serial_ports[i].rts_pin = 942 bfin_serial_ports[i].rts_pin =
diff --git a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
index 233c585efc1..c0694ecd2ec 100644
--- a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
@@ -67,10 +67,9 @@ struct bfin_serial_port {
67 unsigned int tx_dma_channel; 67 unsigned int tx_dma_channel;
68 unsigned int rx_dma_channel; 68 unsigned int rx_dma_channel;
69 struct work_struct tx_dma_workqueue; 69 struct work_struct tx_dma_workqueue;
70#else
71 struct work_struct cts_workqueue;
72#endif 70#endif
73#ifdef CONFIG_SERIAL_BFIN_CTSRTS 71#ifdef CONFIG_SERIAL_BFIN_CTSRTS
72 struct work_struct cts_workqueue;
74 int cts_pin; 73 int cts_pin;
75 int rts_pin; 74 int rts_pin;
76#endif 75#endif
diff --git a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
index a1b4f4eebd0..b6f513bee56 100644
--- a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
@@ -56,12 +56,12 @@ struct bfin_serial_port {
56 unsigned int rx_dma_channel; 56 unsigned int rx_dma_channel;
57 struct work_struct tx_dma_workqueue; 57 struct work_struct tx_dma_workqueue;
58#else 58#else
59 struct work_struct cts_workqueue;
60# if ANOMALY_05000230 59# if ANOMALY_05000230
61 unsigned int anomaly_threshold; 60 unsigned int anomaly_threshold;
62# endif 61# endif
63#endif 62#endif
64#ifdef CONFIG_SERIAL_BFIN_CTSRTS 63#ifdef CONFIG_SERIAL_BFIN_CTSRTS
64 struct work_struct cts_workqueue;
65 int cts_pin; 65 int cts_pin;
66 int rts_pin; 66 int rts_pin;
67#endif 67#endif
diff --git a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
index f18c517cc93..8fc672d3105 100644
--- a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
@@ -67,10 +67,9 @@ struct bfin_serial_port {
67 unsigned int tx_dma_channel; 67 unsigned int tx_dma_channel;
68 unsigned int rx_dma_channel; 68 unsigned int rx_dma_channel;
69 struct work_struct tx_dma_workqueue; 69 struct work_struct tx_dma_workqueue;
70#else
71 struct work_struct cts_workqueue;
72#endif 70#endif
73#ifdef CONFIG_SERIAL_BFIN_CTSRTS 71#ifdef CONFIG_SERIAL_BFIN_CTSRTS
72 struct work_struct cts_workqueue;
74 int cts_pin; 73 int cts_pin;
75 int rts_pin; 74 int rts_pin;
76#endif 75#endif
diff --git a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
index 8733d47747e..c459c484646 100644
--- a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
@@ -69,10 +69,9 @@ struct bfin_serial_port {
69 unsigned int tx_dma_channel; 69 unsigned int tx_dma_channel;
70 unsigned int rx_dma_channel; 70 unsigned int rx_dma_channel;
71 struct work_struct tx_dma_workqueue; 71 struct work_struct tx_dma_workqueue;
72#else
73 struct work_struct cts_workqueue;
74#endif 72#endif
75#ifdef CONFIG_SERIAL_BFIN_CTSRTS 73#ifdef CONFIG_SERIAL_BFIN_CTSRTS
74 struct work_struct cts_workqueue;
76 int cts_pin; 75 int cts_pin;
77 int rts_pin; 76 int rts_pin;
78#endif 77#endif
diff --git a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
index a1b4f4eebd0..b6f513bee56 100644
--- a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
@@ -56,12 +56,12 @@ struct bfin_serial_port {
56 unsigned int rx_dma_channel; 56 unsigned int rx_dma_channel;
57 struct work_struct tx_dma_workqueue; 57 struct work_struct tx_dma_workqueue;
58#else 58#else
59 struct work_struct cts_workqueue;
60# if ANOMALY_05000230 59# if ANOMALY_05000230
61 unsigned int anomaly_threshold; 60 unsigned int anomaly_threshold;
62# endif 61# endif
63#endif 62#endif
64#ifdef CONFIG_SERIAL_BFIN_CTSRTS 63#ifdef CONFIG_SERIAL_BFIN_CTSRTS
64 struct work_struct cts_workqueue;
65 int cts_pin; 65 int cts_pin;
66 int rts_pin; 66 int rts_pin;
67#endif 67#endif