diff options
author | wdenk <wdenk> | 2004-12-31 09:32:47 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2004-12-31 09:32:47 +0000 |
commit | e2ffd59b4d93c9149de1caaa087371b0cfc512c9 (patch) | |
tree | 86cfb6e30bec1686253b0542d76f57c5d62d183a /cpu/ppc4xx/440gx_enet.c | |
parent | 400ab719c6025c176c50bcdff342384222d7424b (diff) | |
download | u-boot-imx-e2ffd59b4d93c9149de1caaa087371b0cfc512c9.zip u-boot-imx-e2ffd59b4d93c9149de1caaa087371b0cfc512c9.tar.gz u-boot-imx-e2ffd59b4d93c9149de1caaa087371b0cfc512c9.tar.bz2 |
* Code cleanup, mostly for GCC-3.3.x
* Cleanup confusing use of CONFIG_ETH*ADDR - ust his only to
pre-define a MAC address; use CONFIG_HAS_ETH* to enable support for
additional ethernet addresses.
* Cleanup drivers/i82365.c - avoid duplication of code
* Fix bogus "cannot span across banks" flash error message
* Add support for CompactFlash for the CPC45 Board.
Diffstat (limited to 'cpu/ppc4xx/440gx_enet.c')
-rw-r--r-- | cpu/ppc4xx/440gx_enet.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/cpu/ppc4xx/440gx_enet.c b/cpu/ppc4xx/440gx_enet.c index 1fa84be..d1f4b76 100644 --- a/cpu/ppc4xx/440gx_enet.c +++ b/cpu/ppc4xx/440gx_enet.c @@ -1176,36 +1176,37 @@ int ppc_440x_eth_initialize (bd_t * bis) /* See if we can actually bring up the interface, otherwise, skip it */ switch (eth_num) { + default: /* fall through */ case 0: if (memcmp (bis->bi_enetaddr, "\0\0\0\0\0\0", 6) == 0) { bis->bi_phymode[eth_num] = BI_PHYMODE_NONE; continue; } break; +#ifdef CONFIG_HAS_ETH1 case 1: if (memcmp (bis->bi_enet1addr, "\0\0\0\0\0\0", 6) == 0) { bis->bi_phymode[eth_num] = BI_PHYMODE_NONE; continue; } break; +#endif +#ifdef CONFIG_HAS_ETH2 case 2: if (memcmp (bis->bi_enet2addr, "\0\0\0\0\0\0", 6) == 0) { bis->bi_phymode[eth_num] = BI_PHYMODE_NONE; continue; } break; +#endif +#ifdef CONFIG_HAS_ETH3 case 3: if (memcmp (bis->bi_enet3addr, "\0\0\0\0\0\0", 6) == 0) { bis->bi_phymode[eth_num] = BI_PHYMODE_NONE; continue; } break; - default: - if (memcmp (bis->bi_enetaddr, "\0\0\0\0\0\0", 6) == 0) { - bis->bi_phymode[eth_num] = BI_PHYMODE_NONE; - continue; - } - break; +#endif } /* Allocate device structure */ @@ -1227,26 +1228,29 @@ int ppc_440x_eth_initialize (bd_t * bis) } switch (eth_num) { + default: /* fall through */ case 0: hw->hw_addr = 0; memcpy (dev->enetaddr, bis->bi_enetaddr, 6); break; +#ifdef CONFIG_HAS_ETH1 case 1: hw->hw_addr = 0x100; memcpy (dev->enetaddr, bis->bi_enet1addr, 6); break; +#endif +#ifdef CONFIG_HAS_ETH2 case 2: hw->hw_addr = 0x400; memcpy (dev->enetaddr, bis->bi_enet2addr, 6); break; +#endif +#ifdef CONFIG_HAS_ETH3 case 3: hw->hw_addr = 0x600; memcpy (dev->enetaddr, bis->bi_enet3addr, 6); break; - default: - hw->hw_addr = 0; - memcpy (dev->enetaddr, bis->bi_enetaddr, 6); - break; +#endif } hw->devnum = eth_num; |