diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-04-24 14:08:07 +0800 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-04-24 18:27:32 +0800 |
commit | 60e03c64b0c7e6f3aedcf2c9328aa105de3ba11d (patch) | |
tree | b4dd016d06221999ae3a664d7420a99035ae3f83 /arch/arm/boards/tny-a926x/init.c | |
parent | f44268517f7ed2c4960027a1dbbd8c0d64502db2 (diff) | |
download | barebox-60e03c64b0c7e6f3aedcf2c9328aa105de3ba11d.tar.gz barebox-60e03c64b0c7e6f3aedcf2c9328aa105de3ba11d.tar.xz |
tny-a926x: fix MOB-TNY-MD2 Motherboard support
The MD2 add:
- uart 2
- ethernet
- usb
- spi
- i2c
so fix just add uart and ethernet
update defconfig
always enable the motherboard and drop the SHA256 support (to fix in the
256KiB).
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'arch/arm/boards/tny-a926x/init.c')
-rw-r--r-- | arch/arm/boards/tny-a926x/init.c | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/arch/arm/boards/tny-a926x/init.c b/arch/arm/boards/tny-a926x/init.c index 2065eae985..eeaca7626f 100644 --- a/arch/arm/boards/tny-a926x/init.c +++ b/arch/arm/boards/tny-a926x/init.c @@ -121,42 +121,10 @@ static struct at91_ether_platform_data macb_pdata = { .phy_addr = 0, }; -static void tny_a9260_phy_reset(void) -{ - unsigned long rstc; - struct clk *clk = clk_get(NULL, "macb_clk"); - - clk_enable(clk); - - at91_set_gpio_input(AT91_PIN_PA14, 0); - at91_set_gpio_input(AT91_PIN_PA15, 0); - at91_set_gpio_input(AT91_PIN_PA17, 0); - at91_set_gpio_input(AT91_PIN_PA25, 0); - at91_set_gpio_input(AT91_PIN_PA26, 0); - at91_set_gpio_input(AT91_PIN_PA28, 0); - - rstc = at91_sys_read(AT91_RSTC_MR) & AT91_RSTC_ERSTL; - - /* Need to reset PHY -> 500ms reset */ - at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY | - (AT91_RSTC_ERSTL & (0x0d << 8)) | - AT91_RSTC_URSTEN); - - at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_EXTRST); - - /* Wait for end hardware reset */ - while (!(at91_sys_read(AT91_RSTC_SR) & AT91_RSTC_NRSTL)); - - /* Restore NRST value */ - at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY | - (rstc) | - AT91_RSTC_URSTEN); -} - static void __init ek_add_device_macb(void) { - tny_a9260_phy_reset(); - at91_add_device_eth(0, &macb_pdata); + if (IS_ENABLED(CONFIG_CALAO_MOB_TNY_MD2)) + at91_add_device_eth(0, &macb_pdata); } #else static void __init ek_add_device_macb(void) {} @@ -240,6 +208,8 @@ device_initcall(tny_a9260_devices_init); static int tny_a9260_console_init(void) { at91_register_uart(0, 0); + if (IS_ENABLED(CONFIG_CALAO_MOB_TNY_MD2)) + at91_register_uart(2, ATMEL_UART_CTS | ATMEL_UART_RTS); return 0; } console_initcall(tny_a9260_console_init); |