[U-Boot] [PATCH 09/22] ARM: sun4i: Enable ethernet support (wemac) on A10 boards

Luka Perkov
2012-11-25T15:05:40Z

Hi Henrik,

On Sun, Nov 25, 2012 at 12:42:15PM +0100, Henrik Nordstr?m wrote:
> From: Stefan Roese <sr@denx.de>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Signed-off-by: Henrik Nordstrom <henrik@henriknordstrom.net>
> ---
> 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 <asm/arch/timer.h>
> #include <asm/arch/gpio.h>
> #include <asm/arch/sys_proto.h>
> +#include <netdev.h>
>
> 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 */

I would remove trailing tab and use one space.

> +
> +#define CONFIG_CMD_MII
> +#define CONFIG_CMD_NET
> +#define CONFIG_CMD_PING
> +
> #endif /* __CONFIG_H */
> --
> 1.7.7.6

Luka