2008-04-25 03:09:15 +08:00
/*
2009-09-24 14:11:24 +00:00
* Copyright 2007 - 2009 Analog Devices Inc .
2008-04-25 03:09:15 +08:00
*
2009-09-24 14:11:24 +00:00
* Licensed under the GPL - 2 or later
2008-04-25 03:09:15 +08:00
*/
2007-10-21 16:54:27 +08:00
# include <asm/dma.h>
# include <asm/portmux.h>
# if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS)
# define CONFIG_SERIAL_BFIN_CTSRTS
# ifndef CONFIG_UART0_CTS_PIN
# define CONFIG_UART0_CTS_PIN -1
# endif
# ifndef CONFIG_UART0_RTS_PIN
# define CONFIG_UART0_RTS_PIN -1
# endif
# ifndef CONFIG_UART1_CTS_PIN
# define CONFIG_UART1_CTS_PIN -1
# endif
# ifndef CONFIG_UART1_RTS_PIN
# define CONFIG_UART1_RTS_PIN -1
# endif
# endif
2008-10-13 10:33:42 +01:00
2007-10-21 16:54:27 +08:00
struct bfin_serial_res {
unsigned long uart_base_addr ;
int uart_irq ;
2009-04-07 16:52:26 +01:00
int uart_status_irq ;
2007-10-21 16:54:27 +08:00
# ifdef CONFIG_SERIAL_BFIN_DMA
unsigned int uart_tx_dma_channel ;
unsigned int uart_rx_dma_channel ;
# endif
# ifdef CONFIG_SERIAL_BFIN_CTSRTS
int uart_cts_pin ;
int uart_rts_pin ;
# endif
} ;
struct bfin_serial_res bfin_serial_resource [ ] = {
# ifdef CONFIG_SERIAL_BFIN_UART0
{
0xFFC00400 ,
IRQ_UART0_RX ,
2009-04-07 16:52:26 +01:00
IRQ_UART0_ERROR ,
2007-10-21 16:54:27 +08:00
# ifdef CONFIG_SERIAL_BFIN_DMA
CH_UART0_TX ,
CH_UART0_RX ,
# endif
2009-03-03 17:59:39 +08:00
# ifdef CONFIG_SERIAL_BFIN_CTSRTS
2007-10-21 16:54:27 +08:00
CONFIG_UART0_CTS_PIN ,
CONFIG_UART0_RTS_PIN ,
# endif
} ,
# endif
# ifdef CONFIG_SERIAL_BFIN_UART1
{
0xFFC02000 ,
IRQ_UART1_RX ,
2009-04-07 16:52:26 +01:00
IRQ_UART1_ERROR ,
2007-10-21 16:54:27 +08:00
# ifdef CONFIG_SERIAL_BFIN_DMA
CH_UART1_TX ,
CH_UART1_RX ,
# endif
2009-03-03 17:59:39 +08:00
# ifdef CONFIG_SERIAL_BFIN_CTSRTS
2007-10-21 16:54:27 +08:00
CONFIG_UART1_CTS_PIN ,
CONFIG_UART1_RTS_PIN ,
# endif
} ,
# endif
} ;
# define DRIVER_NAME "bfin-uart"
2009-09-28 03:16:01 +00:00
# include <asm/bfin_serial.h>