From patchwork Sun Nov 25 11:42:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot, 09/22] ARM: sun4i: Enable ethernet support (wemac) on A10 boards From: =?utf-8?q?Henrik_Nordstr=C3=B6m?= X-Patchwork-Id: 201525 Message-Id: <1353843735.17518.20.camel@home.hno.se> To: U-Boot Mailing List Date: Sun, 25 Nov 2012 12:42:15 +0100 From: Stefan Roese Signed-off-by: Stefan Roese Signed-off-by: Henrik Nordstrom --- arch/arm/cpu/armv7/sunxi/board.c | 14 ++++++++++++++ include/configs/sun4i.h | 8 ++++++++ 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c index 5c94110..29cc4bd 100644 --- a/arch/arm/cpu/armv7/sunxi/board.c +++ b/arch/arm/cpu/armv7/sunxi/board.c @@ -32,6 +32,7 @@ #include #include #include +#include int gpio_init(void) { @@ -78,3 +79,16 @@ void enable_caches(void) dcache_enable(); } #endif + +#if defined(CONFIG_SUNXI_WEMAC) +/* + * Initializes on-chip ethernet controllers. + * to override, implement board_eth_init() + */ +int cpu_eth_init(bd_t *bis) +{ + sunxi_wemac_initialize(bis); + + return 0; +} +#endif diff --git a/include/configs/sun4i.h b/include/configs/sun4i.h index 513f618..ad51446 100644 --- a/include/configs/sun4i.h +++ b/include/configs/sun4i.h @@ -44,4 +44,12 @@ #define CONFIG_CONS_INDEX 1 /* UART0 */ +/* Ethernet support on A10 */ +#define CONFIG_SUNXI_WEMAC +#define CONFIG_MII /* MII PHY management */ + +#define CONFIG_CMD_MII +#define CONFIG_CMD_NET +#define CONFIG_CMD_PING + #endif /* __CONFIG_H */