ppc4xx: Fix compilation warning for canyonlands & glacier

Signed-off-by: Stefan Roese <sr@denx.de>
master
Stefan Roese 17 years ago
parent 6508f9cd45
commit 725b53ac61
  1. 10
      cpu/ppc4xx/miiphy.c

@ -236,28 +236,24 @@ unsigned int miiphy_getemac_offset(u8 addr)
#endif #endif
#if defined(CONFIG_460EX) || defined(CONFIG_460GT) #if defined(CONFIG_460EX) || defined(CONFIG_460GT)
u32 mode_reg;
u32 eoffset = 0; u32 eoffset = 0;
switch (addr) { switch (addr) {
#if defined(CONFIG_HAS_ETH1) && defined(CONFIG_GPCS_PHY1_ADDR) #if defined(CONFIG_HAS_ETH1) && defined(CONFIG_GPCS_PHY1_ADDR)
case CONFIG_GPCS_PHY1_ADDR: case CONFIG_GPCS_PHY1_ADDR:
mode_reg = in_be32((void *)EMAC_M1 + 0x100); if (addr == EMAC_M1_IPPA_GET(in_be32((void *)EMAC_M1 + 0x100)))
if (addr == EMAC_M1_IPPA_GET(mode_reg))
eoffset = 0x100; eoffset = 0x100;
break; break;
#endif #endif
#if defined(CONFIG_HAS_ETH2) && defined(CONFIG_GPCS_PHY2_ADDR) #if defined(CONFIG_HAS_ETH2) && defined(CONFIG_GPCS_PHY2_ADDR)
case CONFIG_GPCS_PHY2_ADDR: case CONFIG_GPCS_PHY2_ADDR:
mode_reg = in_be32((void *)EMAC_M1 + 0x300); if (addr == EMAC_M1_IPPA_GET(in_be32((void *)EMAC_M1 + 0x300)))
if (addr == EMAC_M1_IPPA_GET(mode_reg))
eoffset = 0x300; eoffset = 0x300;
break; break;
#endif #endif
#if defined(CONFIG_HAS_ETH3) && defined(CONFIG_GPCS_PHY3_ADDR) #if defined(CONFIG_HAS_ETH3) && defined(CONFIG_GPCS_PHY3_ADDR)
case CONFIG_GPCS_PHY3_ADDR: case CONFIG_GPCS_PHY3_ADDR:
mode_reg = in_be32((void *)EMAC_M1 + 0x400); if (addr == EMAC_M1_IPPA_GET(in_be32((void *)EMAC_M1 + 0x400)))
if (addr == EMAC_M1_IPPA_GET(mode_reg))
eoffset = 0x400; eoffset = 0x400;
break; break;
#endif #endif

Loading…
Cancel
Save