1 --- a/arch/avr32/boards/atngw100/setup.c
2 +++ b/arch/avr32/boards/atngw100/setup.c
3 @@ -118,7 +118,7 @@ static void __init set_hw_addr(struct pl
5 void __init setup_board(void)
7 - at32_map_usart(1, 0, 0); /* USART 1: /dev/ttyS0, DB9 */
8 + at32_map_usart(1, 0); /* USART 1: /dev/ttyS0, DB9 */
9 at32_setup_serial_console(0);
12 --- a/arch/avr32/boards/atstk1000/atstk1002.c
13 +++ b/arch/avr32/boards/atstk1000/atstk1002.c
14 @@ -252,12 +252,12 @@ static void __init atstk1002_setup_extda
15 void __init setup_board(void)
17 #ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM
18 - at32_map_usart(0, 1, 0); /* USART 0/B: /dev/ttyS1, IRDA */
19 + at32_map_usart(0, 1); /* USART 0/B: /dev/ttyS1, IRDA */
21 - at32_map_usart(1, 0, 0); /* USART 1/A: /dev/ttyS0, DB9 */
22 + at32_map_usart(1, 0); /* USART 1/A: /dev/ttyS0, DB9 */
24 /* USART 2/unused: expansion connector */
25 - at32_map_usart(3, 2, 0); /* USART 3/C: /dev/ttyS2, DB9 */
26 + at32_map_usart(3, 2); /* USART 3/C: /dev/ttyS2, DB9 */
28 at32_setup_serial_console(0);
30 --- a/arch/avr32/boards/atstk1000/atstk1003.c
31 +++ b/arch/avr32/boards/atstk1000/atstk1003.c
32 @@ -115,12 +115,12 @@ static void __init atstk1003_setup_extda
33 void __init setup_board(void)
35 #ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM
36 - at32_map_usart(0, 1, 0); /* USART 0/B: /dev/ttyS1, IRDA */
37 + at32_map_usart(0, 1); /* USART 0/B: /dev/ttyS1, IRDA */
39 - at32_map_usart(1, 0, 0); /* USART 1/A: /dev/ttyS0, DB9 */
40 + at32_map_usart(1, 0); /* USART 1/A: /dev/ttyS0, DB9 */
42 /* USART 2/unused: expansion connector */
43 - at32_map_usart(3, 2, 0); /* USART 3/C: /dev/ttyS2, DB9 */
44 + at32_map_usart(3, 2); /* USART 3/C: /dev/ttyS2, DB9 */
46 at32_setup_serial_console(0);
48 --- a/arch/avr32/boards/atstk1000/atstk1004.c
49 +++ b/arch/avr32/boards/atstk1000/atstk1004.c
50 @@ -120,12 +120,12 @@ static void __init atstk1004_setup_extda
51 void __init setup_board(void)
53 #ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM
54 - at32_map_usart(0, 1, 0); /* USART 0/B: /dev/ttyS1, IRDA */
55 + at32_map_usart(0, 1); /* USART 0/B: /dev/ttyS1, IRDA */
57 - at32_map_usart(1, 0, 0); /* USART 1/A: /dev/ttyS0, DB9 */
58 + at32_map_usart(1, 0); /* USART 1/A: /dev/ttyS0, DB9 */
60 /* USART 2/unused: expansion connector */
61 - at32_map_usart(3, 2, 0); /* USART 3/C: /dev/ttyS2, DB9 */
62 + at32_map_usart(3, 2); /* USART 3/C: /dev/ttyS2, DB9 */
64 at32_setup_serial_console(0);
66 --- a/arch/avr32/boards/favr-32/setup.c
67 +++ b/arch/avr32/boards/favr-32/setup.c
68 @@ -250,7 +250,7 @@ static void __init favr32_setup_atmel_pw
70 void __init setup_board(void)
72 - at32_map_usart(3, 0, 0); /* USART 3 => /dev/ttyS0 */
73 + at32_map_usart(3, 0); /* USART 3 => /dev/ttyS0 */
74 at32_setup_serial_console(0);
77 --- a/arch/avr32/boards/hammerhead/setup.c
78 +++ b/arch/avr32/boards/hammerhead/setup.c
79 @@ -165,7 +165,7 @@ static void __init set_hw_addr(struct pl
81 void __init setup_board(void)
83 - at32_map_usart(1, 0, 0); /* USART 1: /dev/ttyS0, DB9 */
84 + at32_map_usart(1, 0); /* USART 1: /dev/ttyS0, DB9 */
85 at32_setup_serial_console(0);
88 --- a/arch/avr32/boards/merisc/setup.c
89 +++ b/arch/avr32/boards/merisc/setup.c
90 @@ -231,9 +231,9 @@ static void detect_merisc_board_id(void)
92 void __init setup_board(void)
94 - at32_map_usart(0, 0, 0);
95 - at32_map_usart(1, 1, 0);
96 - at32_map_usart(3, 3, 0);
97 + at32_map_usart(0, 0);
98 + at32_map_usart(1, 1);
99 + at32_map_usart(3, 3);
100 at32_setup_serial_console(1);
103 @@ -248,7 +248,7 @@ static int __init merisc_init(void)
104 at32_reserve_pin(GPIO_PIOE_BASE, ATMEL_EBI_PE_DATA_ALL | (1 << 26));
106 if (merisc_board_id >= 1)
107 - at32_map_usart(2, 2, 0);
108 + at32_map_usart(2, 2);
110 at32_add_device_usart(0);
111 at32_add_device_usart(1);
112 --- a/arch/avr32/boards/mimc200/setup.c
113 +++ b/arch/avr32/boards/mimc200/setup.c
114 @@ -175,10 +175,10 @@ static void __init set_hw_addr(struct pl
116 void __init setup_board(void)
118 - at32_map_usart(0, 0, 0); /* USART 0: /dev/ttyS0 (TTL --> Altera) */
119 - at32_map_usart(1, 1, 0); /* USART 1: /dev/ttyS1 (RS232) */
120 - at32_map_usart(2, 2, 0); /* USART 2: /dev/ttyS2 (RS485) */
121 - at32_map_usart(3, 3, 0); /* USART 3: /dev/ttyS3 (RS422 Multidrop) */
122 + at32_map_usart(0, 0); /* USART 0: /dev/ttyS0 (TTL --> Altera) */
123 + at32_map_usart(1, 1); /* USART 1: /dev/ttyS1 (RS232) */
124 + at32_map_usart(2, 2); /* USART 2: /dev/ttyS2 (RS485) */
125 + at32_map_usart(3, 3); /* USART 3: /dev/ttyS3 (RS422 Multidrop) */
128 static struct i2c_gpio_platform_data i2c_gpio_data = {
129 --- a/arch/avr32/mach-at32ap/at32ap700x.c
130 +++ b/arch/avr32/mach-at32ap/at32ap700x.c
131 @@ -966,68 +966,56 @@ static struct resource atmel_usart3_reso
132 DEFINE_DEV_DATA(atmel_usart, 3);
133 DEV_CLK(usart, atmel_usart3, pba, 6);
135 -static inline void configure_usart0_pins(int flags)
136 +static inline void configure_usart0_pins(void)
138 u32 pin_mask = (1 << 8) | (1 << 9); /* RXD & TXD */
139 - if (flags & ATMEL_USART_RTS) pin_mask |= (1 << 6);
140 - if (flags & ATMEL_USART_CTS) pin_mask |= (1 << 7);
141 - if (flags & ATMEL_USART_CLK) pin_mask |= (1 << 10);
143 select_peripheral(PIOA, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
146 -static inline void configure_usart1_pins(int flags)
147 +static inline void configure_usart1_pins(void)
149 u32 pin_mask = (1 << 17) | (1 << 18); /* RXD & TXD */
150 - if (flags & ATMEL_USART_RTS) pin_mask |= (1 << 19);
151 - if (flags & ATMEL_USART_CTS) pin_mask |= (1 << 20);
152 - if (flags & ATMEL_USART_CLK) pin_mask |= (1 << 16);
154 select_peripheral(PIOA, pin_mask, PERIPH_A, AT32_GPIOF_PULLUP);
157 -static inline void configure_usart2_pins(int flags)
158 +static inline void configure_usart2_pins(void)
160 u32 pin_mask = (1 << 26) | (1 << 27); /* RXD & TXD */
161 - if (flags & ATMEL_USART_RTS) pin_mask |= (1 << 30);
162 - if (flags & ATMEL_USART_CTS) pin_mask |= (1 << 29);
163 - if (flags & ATMEL_USART_CLK) pin_mask |= (1 << 28);
165 select_peripheral(PIOB, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
168 -static inline void configure_usart3_pins(int flags)
169 +static inline void configure_usart3_pins(void)
171 u32 pin_mask = (1 << 18) | (1 << 17); /* RXD & TXD */
172 - if (flags & ATMEL_USART_RTS) pin_mask |= (1 << 16);
173 - if (flags & ATMEL_USART_CTS) pin_mask |= (1 << 15);
174 - if (flags & ATMEL_USART_CLK) pin_mask |= (1 << 19);
176 select_peripheral(PIOB, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
179 static struct platform_device *__initdata at32_usarts[4];
181 -void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags)
182 +void __init at32_map_usart(unsigned int hw_id, unsigned int line)
184 struct platform_device *pdev;
188 pdev = &atmel_usart0_device;
189 - configure_usart0_pins(flags);
190 + configure_usart0_pins();
193 pdev = &atmel_usart1_device;
194 - configure_usart1_pins(flags);
195 + configure_usart1_pins();
198 pdev = &atmel_usart2_device;
199 - configure_usart2_pins(flags);
200 + configure_usart2_pins();
203 pdev = &atmel_usart3_device;
204 - configure_usart3_pins(flags);
205 + configure_usart3_pins();
209 --- a/arch/avr32/mach-at32ap/include/mach/board.h
210 +++ b/arch/avr32/mach-at32ap/include/mach/board.h
211 @@ -26,17 +26,12 @@ static inline void __deprecated at32_add
212 #define ATMEL_MAX_UART 4
213 extern struct platform_device *atmel_default_console_device;
215 -/* Flags for selecting USART extra pins */
216 -#define ATMEL_USART_RTS 0x01
217 -#define ATMEL_USART_CTS 0x02
218 -#define ATMEL_USART_CLK 0x03
220 struct atmel_uart_data {
221 short use_dma_tx; /* use transmit DMA? */
222 short use_dma_rx; /* use receive DMA? */
223 void __iomem *regs; /* virtual base address, if any */
225 -void at32_map_usart(unsigned int hw_id, unsigned int line, int flags);
226 +void at32_map_usart(unsigned int hw_id, unsigned int line);
227 struct platform_device *at32_add_device_usart(unsigned int id);
229 struct eth_platform_data {