blob: 45dcaa4f3e416a2a713ae1bb596ded778a223847 [file] [log] [blame]
Graf Yang5be36d22008-04-25 03:09:15 +08001/*
Robin Getz96f10502009-09-24 14:11:24 +00002 * Copyright 2006-2009 Analog Devices Inc.
Graf Yang5be36d22008-04-25 03:09:15 +08003 *
Robin Getz96f10502009-09-24 14:11:24 +00004 * Licensed under the GPL-2 or later
Graf Yang5be36d22008-04-25 03:09:15 +08005 */
6
Bryan Wu1394f032007-05-06 14:50:22 -07007#include <asm/dma.h>
Michael Hennerichc58c2142007-10-04 00:35:05 +08008#include <asm/portmux.h>
Bryan Wu1394f032007-05-06 14:50:22 -07009
Bryan Wu1394f032007-05-06 14:50:22 -070010#ifdef CONFIG_BFIN_UART0_CTSRTS
11# define CONFIG_SERIAL_BFIN_CTSRTS
12# ifndef CONFIG_UART0_CTS_PIN
13# define CONFIG_UART0_CTS_PIN -1
14# endif
15# ifndef CONFIG_UART0_RTS_PIN
16# define CONFIG_UART0_RTS_PIN -1
17# endif
18#endif
19
Bryan Wu1394f032007-05-06 14:50:22 -070020struct bfin_serial_res {
21 unsigned long uart_base_addr;
22 int uart_irq;
Sonic Zhangd307d362009-04-07 16:52:26 +010023 int uart_status_irq;
Bryan Wu1394f032007-05-06 14:50:22 -070024#ifdef CONFIG_SERIAL_BFIN_DMA
25 unsigned int uart_tx_dma_channel;
26 unsigned int uart_rx_dma_channel;
27#endif
28#ifdef CONFIG_SERIAL_BFIN_CTSRTS
29 int uart_cts_pin;
30 int uart_rts_pin;
31#endif
32};
33
34struct bfin_serial_res bfin_serial_resource[] = {
Mike Frysinger9c8f1722007-06-21 11:34:16 +080035 {
Bryan Wu1394f032007-05-06 14:50:22 -070036 0xFFC00400,
Mike Frysinger8d71e072009-07-27 00:44:25 +000037 IRQ_UART0_RX,
38 IRQ_UART0_ERROR,
Bryan Wu1394f032007-05-06 14:50:22 -070039#ifdef CONFIG_SERIAL_BFIN_DMA
Mike Frysinger8d71e072009-07-27 00:44:25 +000040 CH_UART0_TX,
41 CH_UART0_RX,
Bryan Wu1394f032007-05-06 14:50:22 -070042#endif
Tom Parker97d4b352009-03-03 17:59:39 +080043#ifdef CONFIG_SERIAL_BFIN_CTSRTS
Bryan Wu1394f032007-05-06 14:50:22 -070044 CONFIG_UART0_CTS_PIN,
45 CONFIG_UART0_RTS_PIN,
46#endif
Mike Frysinger9c8f1722007-06-21 11:34:16 +080047 }
Bryan Wu1394f032007-05-06 14:50:22 -070048};
49
Michael Hennerichc58c2142007-10-04 00:35:05 +080050#define DRIVER_NAME "bfin-uart"
Mike Frysingerb1524e22009-09-28 03:16:01 +000051
52#include <asm/bfin_serial.h>