diff options
author | Ladislav Michl <ladis@linux-mips.org> | 2016-07-12 20:28:28 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-07-22 14:46:16 -0400 |
commit | b0c47633cc550f2ded597aa80240a2d09619f827 (patch) | |
tree | b67869ffd03bf25090a0ccab3657517955003084 /board/isee | |
parent | b7e042d6af8263d03a8770cda999eed308192def (diff) |
igep00x0: reorder lan9221 code to remove ifdefs
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Diffstat (limited to 'board/isee')
-rw-r--r-- | board/isee/igep00x0/igep00x0.c | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c index 0ad5123ff92..4baaee51d09 100644 --- a/board/isee/igep00x0/igep00x0.c +++ b/board/isee/igep00x0/igep00x0.c @@ -39,18 +39,6 @@ const omap3_sysinfo sysinfo = { #endif }; -#if defined(CONFIG_CMD_NET) -/* GPMC definitions for LAN9221 chips */ -static const u32 gpmc_lan_config[] = { - NET_LAN9221_GPMC_CONFIG1, - NET_LAN9221_GPMC_CONFIG2, - NET_LAN9221_GPMC_CONFIG3, - NET_LAN9221_GPMC_CONFIG4, - NET_LAN9221_GPMC_CONFIG5, - NET_LAN9221_GPMC_CONFIG6, -}; -#endif - static const struct ns16550_platdata igep_serial = { .base = OMAP34XX_UART3, .reg_shift = 2, @@ -119,7 +107,6 @@ void get_board_mem_timings(struct board_sdrc_timings *timings) #endif #if defined(CONFIG_CMD_NET) - static void reset_net_chip(int gpio) { if (!gpio_request(gpio, "eth nrst")) { @@ -140,6 +127,14 @@ static void reset_net_chip(int gpio) static void setup_net_chip(void) { struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE; + static const u32 gpmc_lan_config[] = { + NET_LAN9221_GPMC_CONFIG1, + NET_LAN9221_GPMC_CONFIG2, + NET_LAN9221_GPMC_CONFIG3, + NET_LAN9221_GPMC_CONFIG4, + NET_LAN9221_GPMC_CONFIG5, + NET_LAN9221_GPMC_CONFIG6, + }; enable_gpmc_cs_config(gpmc_lan_config, &gpmc_cfg->cs[5], CONFIG_SMC911X_BASE, GPMC_SIZE_16M); @@ -154,6 +149,15 @@ static void setup_net_chip(void) reset_net_chip(64); } + +int board_eth_init(bd_t *bis) +{ +#ifdef CONFIG_SMC911X + return smc911x_initialize(0, CONFIG_SMC911X_BASE); +#else + return 0; +#endif +} #else static inline void setup_net_chip(void) {} #endif @@ -219,14 +223,3 @@ void set_muxconf_regs(void) MUX_IGEP0030(); #endif } - -#if defined(CONFIG_CMD_NET) -int board_eth_init(bd_t *bis) -{ -#ifdef CONFIG_SMC911X - return smc911x_initialize(0, CONFIG_SMC911X_BASE); -#else - return 0; -#endif -} -#endif |