0d94edaaaa2e24a6f996f0ecf2554473176e3a50
[linux-2.6.git] / arch / blackfin / mach-bf548 / include / mach / bfin_serial_5xx.h
1 /*
2  * Copyright 2007-2009 Analog Devices Inc.
3  *
4  * Licensed under the GPL-2 or later.
5  */
6
7 #include <asm/dma.h>
8 #include <asm/portmux.h>
9
10 #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) || \
11         defined(CONFIG_BFIN_UART2_CTSRTS) || defined(CONFIG_BFIN_UART3_CTSRTS)
12 # define CONFIG_SERIAL_BFIN_HARD_CTSRTS
13 #endif
14
15 struct bfin_serial_res {
16         unsigned long   uart_base_addr;
17         int             uart_irq;
18         int             uart_status_irq;
19 #ifdef CONFIG_SERIAL_BFIN_DMA
20         unsigned int    uart_tx_dma_channel;
21         unsigned int    uart_rx_dma_channel;
22 #endif
23 #ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
24         int             uart_cts_pin;
25         int             uart_rts_pin;
26 #endif
27 };
28
29 struct bfin_serial_res bfin_serial_resource[] = {
30 #ifdef CONFIG_SERIAL_BFIN_UART0
31         {
32         0xFFC00400,
33         IRQ_UART0_RX,
34         IRQ_UART0_ERROR,
35 #ifdef CONFIG_SERIAL_BFIN_DMA
36         CH_UART0_TX,
37         CH_UART0_RX,
38 #endif
39 #ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
40         0,
41         0,
42 #endif
43         },
44 #endif
45 #ifdef CONFIG_SERIAL_BFIN_UART1
46         {
47         0xFFC02000,
48         IRQ_UART1_RX,
49         IRQ_UART1_ERROR,
50 #ifdef CONFIG_SERIAL_BFIN_DMA
51         CH_UART1_TX,
52         CH_UART1_RX,
53 #endif
54 #ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
55         GPIO_PE10,
56         GPIO_PE9,
57 #endif
58         },
59 #endif
60 #ifdef CONFIG_SERIAL_BFIN_UART2
61         {
62         0xFFC02100,
63         IRQ_UART2_RX,
64         IRQ_UART2_ERROR,
65 #ifdef CONFIG_SERIAL_BFIN_DMA
66         CH_UART2_TX,
67         CH_UART2_RX,
68 #endif
69 #ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
70         0,
71         0,
72 #endif
73         },
74 #endif
75 #ifdef CONFIG_SERIAL_BFIN_UART3
76         {
77         0xFFC03100,
78         IRQ_UART3_RX,
79         IRQ_UART3_ERROR,
80 #ifdef CONFIG_SERIAL_BFIN_DMA
81         CH_UART3_TX,
82         CH_UART3_RX,
83 #endif
84 #ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
85         GPIO_PB3,
86         GPIO_PB2,
87 #endif
88         },
89 #endif
90 };
91
92 #define DRIVER_NAME "bfin-uart"
93
94 #include <asm/bfin_serial.h>