From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sat, 31 Mar 2012 21:45:59 +0200 Subject: [U-Boot] [PATCH] [U-BOOT] Zoom2: Ethernet: Enabling LAN9221 chip and CMD_NET. In-Reply-To: <1281982778-15262-1-git-send-email-aldo.cedillo@ti.com> References: <1281982778-15262-1-git-send-email-aldo.cedillo@ti.com> Message-ID: <201203312145.59649.marek.vasut@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Aldo Brett Cedillo Martinez, > Configures GPMC, adds macros to enable net commands, and adds proper > initialization to board_eth_init function. Tom, are you OK with applying this patch ? > I have a similar patch to enable ethernet in zoom3 after initial support > patch. > > Signed-off-by: Aldo Brett Cedillo Martinez > --- > board/logicpd/zoom2/zoom2.c | 21 +++++++++++++++++++++ > include/configs/omap3_zoom2.h | 10 +++++++++- > 2 files changed, 30 insertions(+), 1 deletions(-) > > diff --git a/board/logicpd/zoom2/zoom2.c b/board/logicpd/zoom2/zoom2.c > index e9f6625..54d3e9f 100644 > --- a/board/logicpd/zoom2/zoom2.c > +++ b/board/logicpd/zoom2/zoom2.c > @@ -60,6 +60,16 @@ static u32 gpmc_serial_TL16CP754C[GPMC_MAX_REG] = { > 0x1D0904C4, 0 > }; > > +/* Ethernet GPMC configuration */ > +static u32 gpmc_eth[GPMC_MAX_REG] = { > + NET_GPMC_CONFIG1, > + NET_GPMC_CONFIG2, > + NET_GPMC_CONFIG3, > + NET_GPMC_CONFIG4, > + NET_GPMC_CONFIG5, > + NET_GPMC_CONFIG6, 0 > +}; > + > /* Used to track the revision of the board */ > static zoom2_revision revision = ZOOM2_REVISION_UNKNOWN; > > @@ -130,6 +140,12 @@ int board_init (void) > enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[3], > SERIAL_TL16CP754C_BASE, GPMC_SIZE_16M); > > +#ifdef CONFIG_CMD_NET > + gpmc_config = gpmc_eth; > + enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[7], > + CONFIG_SMC911X_BASE, GPMC_SIZE_16M); > +#endif /* (CONFIG_CMD_NET) */ > + > /* board id for Linux */ > gd->bd->bi_arch_number = MACH_TYPE_OMAP_ZOOM2; > /* boot param addr */ > @@ -186,6 +202,11 @@ int board_eth_init(bd_t *bis) > #ifdef CONFIG_LAN91C96 > rc = lan91c96_initialize(0, CONFIG_LAN91C96_BASE); > #endif > + > +#ifdef CONFIG_SMC911X > + rc = smc911x_initialize(0, CONFIG_SMC911X_BASE); > +#endif > + > return rc; > } > #endif > diff --git a/include/configs/omap3_zoom2.h b/include/configs/omap3_zoom2.h > index eef95fe..c66d571 100644 > --- a/include/configs/omap3_zoom2.h > +++ b/include/configs/omap3_zoom2.h > @@ -154,7 +154,7 @@ > #undef CONFIG_CMD_FPGA /* FPGA configuration Support */ > #undef CONFIG_CMD_IMI /* iminfo */ > #undef CONFIG_CMD_IMLS /* List all found images */ > -#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ > +#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ > #undef CONFIG_CMD_NFS /* NFS support */ > > #define CONFIG_SYS_NO_FLASH > @@ -165,6 +165,14 @@ > #define CONFIG_SYS_I2C_BUS_SELECT 1 > #define CONFIG_DRIVER_OMAP34XX_I2C 1 > > +/* Ethernet */ > +#ifdef CONFIG_CMD_NET > +#define CONFIG_NET_MULTI > +#define CONFIG_SMC911X > +#define CONFIG_SMC911X_32_BIT > +#define CONFIG_SMC911X_BASE 0x2C000000 > +#endif /* (CONFIG_CMD_NET) */ > + > /* > * TWL4030 > */ Best regards, Marek Vasut