From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luka Perkov Date: Sun, 25 Nov 2012 16:05:40 +0100 Subject: [U-Boot] [PATCH 09/22] ARM: sun4i: Enable ethernet support (wemac) on A10 boards In-Reply-To: <1353843735.17518.20.camel@home.hno.se> References: <1353843735.17518.20.camel@home.hno.se> Message-ID: <20121125150540-9180@mutt-kz> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Henrik, On Sun, Nov 25, 2012 at 12:42:15PM +0100, Henrik Nordstr?m wrote: > 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 */ 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