]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
Blackfin Serial Driver: Use timer to poll CTS PIN instead of workqueue.
[linux-2.6-omap-h63xx.git] / include / asm-blackfin / mach-bf537 / bfin_serial_5xx.h
index f79d1a0e9129bb0f3e74e64d8c831227fcf460f1..1bf56ffa22f946236dfcfad9d14b27db6e26d090 100644 (file)
 #define UART_SET_DLAB(uart)     do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
 #define UART_CLEAR_DLAB(uart)   do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
 
+#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
+#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
+#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
+#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
+#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
+
 #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS)
 # define CONFIG_SERIAL_BFIN_CTSRTS
 
@@ -90,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