Blackfin Serial Driver: Change hardware flowcontrol from poll to interrupt driven. - v2
PATCH 4/18 Blackfin Serial Driver: Change hardware flowcontrol from poll to interrupt driven. - v2
Current implementation is polling (busy waiting), the kernel will basically hang when the remote asserts hardware flowcontrol pins. if this is only asserted for short periods (less than 1 char time), then it's not really noticed. This patch changes flowcontrol CTS into interrupt driven.
Signed-off-by Sonic Zhang <[email protected]>
Signed-off-by Bryan Wu <[email protected]>
--- .../mach-bf527/include/mach/bfin_serial_5xx.h | 26 ---- .../mach-bf533/include/mach/bfin_serial_5xx.h | 20 --- .../mach-bf537/include/mach/bfin_serial_5xx.h | 27 ---- .../mach-bf548/include/mach/bfin_serial_5xx.h | 45 ------- .../mach-bf561/include/mach/bfin_serial_5xx.h | 20 --- drivers/serial/bfin_5xx.c | 131 ++++++++++++-------- 6 files changed, 82 insertions(+), 187 deletions(-)
arch/blackfin/mach-bf527/include/mach/bfin_serial_5xx.h +0 -26
@@ -167,29 +167,3 @@ struct bfin_serial_res bfin_serial_resource[] = { };#define DRIVER_NAME "bfin-uart" - -static void bfin_serial_hw_init (struct bfin_serial_port *uart) -{ - -#ifdef CONFIG_SERIAL_BFIN_UART0 -peripheral_request (P_UART0_TX ,DRIVER_NAME ); -peripheral_request (P_UART0_RX ,DRIVER_NAME ); -#endif - -#ifdef CONFIG_SERIAL_BFIN_UART1 -peripheral_request (P_UART1_TX ,DRIVER_NAME ); -peripheral_request (P_UART1_RX ,DRIVER_NAME ); -#endif - -#ifdef CONFIG_SERIAL_BFIN_CTSRTS -if (uart->cts_pin >=0 ) { -gpio_request (uart->cts_pin,DRIVER_NAME ); -gpio_direction_input (uart->cts_pin); - } - -if (uart->rts_pin >=0 ) { -gpio_request (uart->rts_pin,DRIVER_NAME ); -gpio_direction_output (uart->rts_pin,0 ); - } -#endif -}
arch/blackfin/mach-bf533/include/mach/bfin_serial_5xx.h +0 -20
@@ -142,23 +142,3 @@ struct bfin_serial_res bfin_serial_resource[] = { };#define DRIVER_NAME "bfin-uart" - -static void bfin_serial_hw_init (struct bfin_serial_port *uart) -{ - -#ifdef CONFIG_SERIAL_BFIN_UART0 -peripheral_request (P_UART0_TX ,DRIVER_NAME ); -peripheral_request (P_UART0_RX ,DRIVER_NAME ); -#endif - -#ifdef CONFIG_SERIAL_BFIN_CTSRTS -if (uart->cts_pin >=0 ) { -gpio_request (uart->cts_pin,DRIVER_NAME ); -gpio_direction_input (uart->cts_pin); - } -if (uart->rts_pin >=0 ) { -gpio_request (uart->rts_pin,DRIVER_NAME ); -gpio_direction_output (uart->rts_pin,0 ); - } -#endif -}
arch/blackfin/mach-bf537/include/mach/bfin_serial_5xx.h +0 -27
@@ -99,7 +99,6 @@ struct bfin_serial_port {struct work_struct tx_dma_workqueue;#endif #ifdef CONFIG_SERIAL_BFIN_CTSRTS -struct timer_list cts_timer;int cts_pin;int rts_pin;#endif
@@ -167,29 +166,3 @@ struct bfin_serial_res bfin_serial_resource[] = { };#define DRIVER_NAME "bfin-uart" - -static void bfin_serial_hw_init (struct bfin_serial_port *uart) -{ - -#ifdef CONFIG_SERIAL_BFIN_UART0 -peripheral_request (P_UART0_TX ,DRIVER_NAME ); -peripheral_request (P_UART0_RX ,DRIVER_NAME ); -#endif - -#ifdef CONFIG_SERIAL_BFIN_UART1 -peripheral_request (P_UART1_TX ,DRIVER_NAME ); -peripheral_request (P_UART1_RX ,DRIVER_NAME ); -#endif - -#ifdef CONFIG_SERIAL_BFIN_CTSRTS -if (uart->cts_pin >=0 ) { -gpio_request (uart->cts_pin,DRIVER_NAME ); -gpio_direction_input (uart->cts_pin); - } - -if (uart->rts_pin >=0 ) { -gpio_request (uart->rts_pin,DRIVER_NAME ); -gpio_direction_output (uart->rts_pin,0 ); - } -#endif -}
arch/blackfin/mach-bf548/include/mach/bfin_serial_5xx.h +0 -45
48 lines not on this page · raw message
arch/blackfin/mach-bf561/include/mach/bfin_serial_5xx.h +0 -20
@@ -142,23 +142,3 @@ struct bfin_serial_res bfin_serial_resource[] = { };#define DRIVER_NAME "bfin-uart" - -static void bfin_serial_hw_init (struct bfin_serial_port *uart) -{ - -#ifdef CONFIG_SERIAL_BFIN_UART0 -peripheral_request (P_UART0_TX ,DRIVER_NAME ); -peripheral_request (P_UART0_RX ,DRIVER_NAME ); -#endif - -#ifdef CONFIG_SERIAL_BFIN_CTSRTS -if (uart->cts_pin >=0 ) { -gpio_request (uart->cts_pin,DRIVER_NAME ); -gpio_direction_input (uart->cts_pin); - } -if (uart->rts_pin >=0 ) { -gpio_request (uart->rts_pin,DRIVER_NAME ); -gpio_direction_output (uart->rts_pin,0 ); - } -#endif -}
drivers/serial/bfin_5xx.c +82 -49
227 lines not on this page · raw message
Signature · 1 line
1.6.0