3232#include "generic.h"
3333
3434
35- static void __init portuxg20_map_io (void )
35+ void __init stamp9g20_map_io (void )
3636{
3737 /* Initialize processor: 18.432 MHz crystal */
3838 at91sam9260_initialize (18432000 );
3939
4040 /* DGBU on ttyS0. (Rx & Tx only) */
4141 at91_register_uart (0 , 0 , 0 );
4242
43+ /* set serial console to ttyS0 (ie, DBGU) */
44+ at91_set_serial_console (0 );
45+ }
46+
47+ static void __init stamp9g20evb_map_io (void )
48+ {
49+ stamp9g20_map_io ();
50+
51+ /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
52+ at91_register_uart (AT91SAM9260_ID_US0 , 1 , ATMEL_UART_CTS | ATMEL_UART_RTS
53+ | ATMEL_UART_DTR | ATMEL_UART_DSR
54+ | ATMEL_UART_DCD | ATMEL_UART_RI );
55+ }
56+
57+ static void __init portuxg20_map_io (void )
58+ {
59+ stamp9g20_map_io ();
60+
4361 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
4462 at91_register_uart (AT91SAM9260_ID_US0 , 1 , ATMEL_UART_CTS | ATMEL_UART_RTS
4563 | ATMEL_UART_DTR | ATMEL_UART_DSR
@@ -56,26 +74,6 @@ static void __init portuxg20_map_io(void)
5674
5775 /* USART5 on ttyS6. (Rx, Tx only) */
5876 at91_register_uart (AT91SAM9260_ID_US5 , 6 , 0 );
59-
60- /* set serial console to ttyS0 (ie, DBGU) */
61- at91_set_serial_console (0 );
62- }
63-
64- static void __init stamp9g20_map_io (void )
65- {
66- /* Initialize processor: 18.432 MHz crystal */
67- at91sam9260_initialize (18432000 );
68-
69- /* DGBU on ttyS0. (Rx & Tx only) */
70- at91_register_uart (0 , 0 , 0 );
71-
72- /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
73- at91_register_uart (AT91SAM9260_ID_US0 , 1 , ATMEL_UART_CTS | ATMEL_UART_RTS
74- | ATMEL_UART_DTR | ATMEL_UART_DSR
75- | ATMEL_UART_DCD | ATMEL_UART_RI );
76-
77- /* set serial console to ttyS0 (ie, DBGU) */
78- at91_set_serial_console (0 );
7977}
8078
8179static void __init init_irq (void )
@@ -156,7 +154,7 @@ static struct at91_udc_data __initdata portuxg20_udc_data = {
156154 .pullup_pin = 0 , /* pull-up driven by UDC */
157155};
158156
159- static struct at91_udc_data __initdata stamp9g20_udc_data = {
157+ static struct at91_udc_data __initdata stamp9g20evb_udc_data = {
160158 .vbus_pin = AT91_PIN_PA22 ,
161159 .pullup_pin = 0 , /* pull-up driven by UDC */
162160};
@@ -190,7 +188,7 @@ static struct gpio_led portuxg20_leds[] = {
190188 }
191189};
192190
193- static struct gpio_led stamp9g20_leds [] = {
191+ static struct gpio_led stamp9g20evb_leds [] = {
194192 {
195193 .name = "D8" ,
196194 .gpio = AT91_PIN_PB18 ,
@@ -250,7 +248,7 @@ void add_w1(void)
250248}
251249
252250
253- static void __init generic_board_init (void )
251+ void __init stamp9g20_board_init (void )
254252{
255253 /* Serial */
256254 at91_add_device_serial ();
@@ -262,34 +260,40 @@ static void __init generic_board_init(void)
262260#else
263261 at91_add_device_mmc (0 , & mmc_data );
264262#endif
265- /* USB Host */
266- at91_add_device_usbh (& usbh_data );
267- /* Ethernet */
268- at91_add_device_eth (& macb_data );
269- /* I2C */
270- at91_add_device_i2c (NULL , 0 );
271263 /* W1 */
272264 add_w1 ();
273265}
274266
275267static void __init portuxg20_board_init (void )
276268{
277- generic_board_init ();
278- /* SPI */
279- at91_add_device_spi ( portuxg20_spi_devices , ARRAY_SIZE ( portuxg20_spi_devices ) );
269+ stamp9g20_board_init ();
270+ /* USB Host */
271+ at91_add_device_usbh ( & usbh_data );
280272 /* USB Device */
281273 at91_add_device_udc (& portuxg20_udc_data );
274+ /* Ethernet */
275+ at91_add_device_eth (& macb_data );
276+ /* I2C */
277+ at91_add_device_i2c (NULL , 0 );
278+ /* SPI */
279+ at91_add_device_spi (portuxg20_spi_devices , ARRAY_SIZE (portuxg20_spi_devices ));
282280 /* LEDs */
283281 at91_gpio_leds (portuxg20_leds , ARRAY_SIZE (portuxg20_leds ));
284282}
285283
286- static void __init stamp9g20_board_init (void )
284+ static void __init stamp9g20evb_board_init (void )
287285{
288- generic_board_init ();
286+ stamp9g20_board_init ();
287+ /* USB Host */
288+ at91_add_device_usbh (& usbh_data );
289289 /* USB Device */
290- at91_add_device_udc (& stamp9g20_udc_data );
290+ at91_add_device_udc (& stamp9g20evb_udc_data );
291+ /* Ethernet */
292+ at91_add_device_eth (& macb_data );
293+ /* I2C */
294+ at91_add_device_i2c (NULL , 0 );
291295 /* LEDs */
292- at91_gpio_leds (stamp9g20_leds , ARRAY_SIZE (stamp9g20_leds ));
296+ at91_gpio_leds (stamp9g20evb_leds , ARRAY_SIZE (stamp9g20evb_leds ));
293297}
294298
295299MACHINE_START (PORTUXG20 , "taskit PortuxG20" )
@@ -305,7 +309,7 @@ MACHINE_START(STAMP9G20, "taskit Stamp9G20")
305309 /* Maintainer: taskit GmbH */
306310 .boot_params = AT91_SDRAM_BASE + 0x100 ,
307311 .timer = & at91sam926x_timer ,
308- .map_io = stamp9g20_map_io ,
312+ .map_io = stamp9g20evb_map_io ,
309313 .init_irq = init_irq ,
310- .init_machine = stamp9g20_board_init ,
314+ .init_machine = stamp9g20evb_board_init ,
311315MACHINE_END
0 commit comments