Loading drivers/serial/bfin_5xx.c +18 −22 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ #define DMA_RX_YCOUNT (PAGE_SIZE / DMA_RX_XCOUNT) #define DMA_RX_FLUSH_JIFFIES (HZ / 50) #define CTS_CHECK_JIFFIES (HZ / 50) #ifdef CONFIG_SERIAL_BFIN_DMA static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart); Loading Loading @@ -290,11 +291,6 @@ static void bfin_serial_tx_chars(struct bfin_serial_port *uart) { struct circ_buf *xmit = &uart->port.info->xmit; if (uart->port.x_char) { UART_PUT_CHAR(uart, uart->port.x_char); uart->port.icount.tx++; uart->port.x_char = 0; } /* * Check the modem control lines before * transmitting anything. Loading @@ -306,6 +302,12 @@ static void bfin_serial_tx_chars(struct bfin_serial_port *uart) return; } if (uart->port.x_char) { UART_PUT_CHAR(uart, uart->port.x_char); uart->port.icount.tx++; uart->port.x_char = 0; } while ((UART_GET_LSR(uart) & THRE) && xmit->tail != xmit->head) { UART_PUT_CHAR(uart, xmit->buf[xmit->tail]); xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); Loading Loading @@ -345,15 +347,6 @@ static irqreturn_t bfin_serial_tx_int(int irq, void *dev_id) } #endif #ifdef CONFIG_SERIAL_BFIN_CTSRTS static void bfin_serial_do_work(struct work_struct *work) { struct bfin_serial_port *uart = container_of(work, struct bfin_serial_port, cts_workqueue); bfin_serial_mctrl_check(uart); } #endif #ifdef CONFIG_SERIAL_BFIN_DMA static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart) { Loading @@ -361,6 +354,12 @@ static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart) uart->tx_done = 0; /* * Check the modem control lines before * transmitting anything. */ bfin_serial_mctrl_check(uart); if (uart_circ_empty(xmit) || uart_tx_stopped(&uart->port)) { uart->tx_count = 0; uart->tx_done = 1; Loading @@ -373,12 +372,6 @@ static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart) uart->port.x_char = 0; } /* * Check the modem control lines before * transmitting anything. */ bfin_serial_mctrl_check(uart); uart->tx_count = CIRC_CNT(xmit->head, xmit->tail, UART_XMIT_SIZE); if (uart->tx_count > (UART_XMIT_SIZE - xmit->tail)) uart->tx_count = UART_XMIT_SIZE - xmit->tail; Loading Loading @@ -565,7 +558,10 @@ static void bfin_serial_mctrl_check(struct bfin_serial_port *uart) uart_handle_cts_change(&uart->port, status & TIOCM_CTS); if (!(status & TIOCM_CTS)) { tty->hw_stopped = 1; schedule_work(&uart->cts_workqueue); uart->cts_timer.data = (unsigned long)(uart); uart->cts_timer.function = (void *)bfin_serial_mctrl_check; uart->cts_timer.expires = jiffies + CTS_CHECK_JIFFIES; add_timer(&(uart->cts_timer)); } else { tty->hw_stopped = 0; } Loading Loading @@ -885,7 +881,7 @@ static void __init bfin_serial_init_ports(void) init_timer(&(bfin_serial_ports[i].rx_dma_timer)); #endif #ifdef CONFIG_SERIAL_BFIN_CTSRTS INIT_WORK(&bfin_serial_ports[i].cts_workqueue, bfin_serial_do_work); init_timer(&(bfin_serial_ports[i].cts_timer)); bfin_serial_ports[i].cts_pin = bfin_serial_resource[i].uart_cts_pin; bfin_serial_ports[i].rts_pin = Loading include/asm-blackfin/mach-bf527/bfin_serial_5xx.h +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ struct bfin_serial_port { struct work_struct tx_dma_workqueue; #endif #ifdef CONFIG_SERIAL_BFIN_CTSRTS struct work_struct cts_workqueue; struct timer_list cts_timer; int cts_pin; int rts_pin; #endif Loading include/asm-blackfin/mach-bf533/bfin_serial_5xx.h +1 −1 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ struct bfin_serial_port { # endif #endif #ifdef CONFIG_SERIAL_BFIN_CTSRTS struct work_struct cts_workqueue; struct timer_list cts_timer; int cts_pin; int rts_pin; #endif Loading include/asm-blackfin/mach-bf537/bfin_serial_5xx.h +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ struct bfin_serial_port { struct work_struct tx_dma_workqueue; #endif #ifdef CONFIG_SERIAL_BFIN_CTSRTS struct work_struct cts_workqueue; struct timer_list cts_timer; int cts_pin; int rts_pin; #endif Loading include/asm-blackfin/mach-bf548/bfin_serial_5xx.h +1 −1 Original line number Diff line number Diff line Loading @@ -99,7 +99,7 @@ struct bfin_serial_port { struct work_struct tx_dma_workqueue; #endif #ifdef CONFIG_SERIAL_BFIN_CTSRTS struct work_struct cts_workqueue; struct timer_list cts_timer; int cts_pin; int rts_pin; #endif Loading Loading
drivers/serial/bfin_5xx.c +18 −22 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ #define DMA_RX_YCOUNT (PAGE_SIZE / DMA_RX_XCOUNT) #define DMA_RX_FLUSH_JIFFIES (HZ / 50) #define CTS_CHECK_JIFFIES (HZ / 50) #ifdef CONFIG_SERIAL_BFIN_DMA static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart); Loading Loading @@ -290,11 +291,6 @@ static void bfin_serial_tx_chars(struct bfin_serial_port *uart) { struct circ_buf *xmit = &uart->port.info->xmit; if (uart->port.x_char) { UART_PUT_CHAR(uart, uart->port.x_char); uart->port.icount.tx++; uart->port.x_char = 0; } /* * Check the modem control lines before * transmitting anything. Loading @@ -306,6 +302,12 @@ static void bfin_serial_tx_chars(struct bfin_serial_port *uart) return; } if (uart->port.x_char) { UART_PUT_CHAR(uart, uart->port.x_char); uart->port.icount.tx++; uart->port.x_char = 0; } while ((UART_GET_LSR(uart) & THRE) && xmit->tail != xmit->head) { UART_PUT_CHAR(uart, xmit->buf[xmit->tail]); xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); Loading Loading @@ -345,15 +347,6 @@ static irqreturn_t bfin_serial_tx_int(int irq, void *dev_id) } #endif #ifdef CONFIG_SERIAL_BFIN_CTSRTS static void bfin_serial_do_work(struct work_struct *work) { struct bfin_serial_port *uart = container_of(work, struct bfin_serial_port, cts_workqueue); bfin_serial_mctrl_check(uart); } #endif #ifdef CONFIG_SERIAL_BFIN_DMA static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart) { Loading @@ -361,6 +354,12 @@ static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart) uart->tx_done = 0; /* * Check the modem control lines before * transmitting anything. */ bfin_serial_mctrl_check(uart); if (uart_circ_empty(xmit) || uart_tx_stopped(&uart->port)) { uart->tx_count = 0; uart->tx_done = 1; Loading @@ -373,12 +372,6 @@ static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart) uart->port.x_char = 0; } /* * Check the modem control lines before * transmitting anything. */ bfin_serial_mctrl_check(uart); uart->tx_count = CIRC_CNT(xmit->head, xmit->tail, UART_XMIT_SIZE); if (uart->tx_count > (UART_XMIT_SIZE - xmit->tail)) uart->tx_count = UART_XMIT_SIZE - xmit->tail; Loading Loading @@ -565,7 +558,10 @@ static void bfin_serial_mctrl_check(struct bfin_serial_port *uart) uart_handle_cts_change(&uart->port, status & TIOCM_CTS); if (!(status & TIOCM_CTS)) { tty->hw_stopped = 1; schedule_work(&uart->cts_workqueue); uart->cts_timer.data = (unsigned long)(uart); uart->cts_timer.function = (void *)bfin_serial_mctrl_check; uart->cts_timer.expires = jiffies + CTS_CHECK_JIFFIES; add_timer(&(uart->cts_timer)); } else { tty->hw_stopped = 0; } Loading Loading @@ -885,7 +881,7 @@ static void __init bfin_serial_init_ports(void) init_timer(&(bfin_serial_ports[i].rx_dma_timer)); #endif #ifdef CONFIG_SERIAL_BFIN_CTSRTS INIT_WORK(&bfin_serial_ports[i].cts_workqueue, bfin_serial_do_work); init_timer(&(bfin_serial_ports[i].cts_timer)); bfin_serial_ports[i].cts_pin = bfin_serial_resource[i].uart_cts_pin; bfin_serial_ports[i].rts_pin = Loading
include/asm-blackfin/mach-bf527/bfin_serial_5xx.h +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ struct bfin_serial_port { struct work_struct tx_dma_workqueue; #endif #ifdef CONFIG_SERIAL_BFIN_CTSRTS struct work_struct cts_workqueue; struct timer_list cts_timer; int cts_pin; int rts_pin; #endif Loading
include/asm-blackfin/mach-bf533/bfin_serial_5xx.h +1 −1 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ struct bfin_serial_port { # endif #endif #ifdef CONFIG_SERIAL_BFIN_CTSRTS struct work_struct cts_workqueue; struct timer_list cts_timer; int cts_pin; int rts_pin; #endif Loading
include/asm-blackfin/mach-bf537/bfin_serial_5xx.h +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ struct bfin_serial_port { struct work_struct tx_dma_workqueue; #endif #ifdef CONFIG_SERIAL_BFIN_CTSRTS struct work_struct cts_workqueue; struct timer_list cts_timer; int cts_pin; int rts_pin; #endif Loading
include/asm-blackfin/mach-bf548/bfin_serial_5xx.h +1 −1 Original line number Diff line number Diff line Loading @@ -99,7 +99,7 @@ struct bfin_serial_port { struct work_struct tx_dma_workqueue; #endif #ifdef CONFIG_SERIAL_BFIN_CTSRTS struct work_struct cts_workqueue; struct timer_list cts_timer; int cts_pin; int rts_pin; #endif Loading