ppc4xx: Fix compilation warning for PIP405
PATCH 1/1 ppc4xx: Fix compilation warning for PIP405
This patch fixes a compilation warning for the PIP405 board. It moves the #ifndef CONFIG_CS8952_PHY define a little so that the warning doesn't occur anymore. I am a little unsure if this #ifdef is at the correct place now or if it could be removed completely. This needs to get tested on the PIP405 board.
---
Denis, could you please take a look at this patch and let me know if this is ok? Or if the define and #ifdef can be removed completely?
Thanks.
cpu/ppc4xx/4xx_enet.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-)
cpu/ppc4xx/4xx_enet.c +5 -6
@@ -1061,7 +1061,6 @@ static int ppc_4xx_eth_init (struct eth_device *dev, bd_t * bis)/* wait for PHY to complete auto negotiation */ reg_short =0 ; -#ifndef CONFIG_CS8952_PHY switch (devnum) {case 0 : reg =CONFIG_PHY_ADDR ;
@@ -1160,7 +1159,7 @@ static int ppc_4xx_eth_init (struct eth_device *dev, bd_t * bis)miiphy_write (dev->name, reg,0x1f ,0x0000 ); /* end Vitesse/Cicada errata */ } -#endif +#endif /* defined(CONFIG_CIS8201_PHY) */ #if defined(CONFIG_ET1011C_PHY )/*
@@ -1179,15 +1178,16 @@ static int ppc_4xx_eth_init (struct eth_device *dev, bd_t * bis)miiphy_write (dev->name, reg,0x1c ,0x74f0 ); } -#endif +#endif /* defined(CONFIG_ET1011C_PHY) */ -#endif +#endif /* defined(CONFIG_440GX) ... */ /* Start/Restart autonegotiation */ phy_setup_aneg (dev->name, reg);udelay (1000 ); }#endif /* defined(CONFIG_PHY_RESET) */ +#if !defined(CONFIG_CS8952_PHY )miiphy_read (dev->name, reg,PHY_BMSR , ®_short);/*
@@ -1211,12 +1211,11 @@ static int ppc_4xx_eth_init (struct eth_device *dev, bd_t * bis) }udelay (1000 );/* 1 ms */ miiphy_read (dev->name, reg,PHY_BMSR , ®_short); - }puts (" done\n" );udelay (500000 );/* another 500 ms (results in faster booting) */ } -#endif /* #ifndef CONFIG_CS8952_PHY */ +#endif /* !defined(CONFIG_CS8952_PHY) */ get_speed:if (reg ==CONFIG_FIXED_PHY ) {
Signature · 1 line
1.5.6.5
PATCH 1/1 ppc4xx: Fix compilation warning for PIP405
Hello Stefan,
Stefan Roese <[email protected]> wrote on 05.09.2008 14:15:10:
Quoted 1 line
This patch fixes a compilation warning for the PIP405 board. It moves
the
Quoted 8 lines
#ifndef
CONFIG_CS8952_PHYdefine a little so that the warning doesn't occur anymore. I am a little unsure if this #ifdef is at the correct place now or if it could be removed completely. This needs to get tested on the PIP405 board.Signed-off-by Stefan Roese <[email protected]>---
Denis, could you please take a look at this patch and let me know if
this
Quoted 4 lines
is ok? Or if the define and #ifdef can be removed completely?
Thanks.
The PIP405 is a "dead" board. Only some prototypes have been produced. Currently I don't have a board to test it, but since I don't think that the PIP405 will ever become active again, I think it is save to remove the #ifdef completely.
With best regards,
Denis
Quoted 48 lines
cpu/ppc4xx/4xx_enet.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-)cpu/ppc4xx/4xx_enet.c +0
-1@@ -1061,7 +1061,6 @@ static int ppc_4xx_eth_init (struct eth_device *dev, bd_t * bis)/* wait for PHY to complete auto negotiation */ reg_short =0 ; -#ifndef CONFIG_CS8952_PHY switch (devnum) {case 0 :reg = CONFIG_PHY_ADDR;cpu/ppc4xx/4xx_enet.c +1
-1@@ -1160,7 +1159,7 @@ static int ppc_4xx_eth_init (struct eth_device *dev, bd_t * bis)miiphy_write (dev->name, reg,0x1f ,0x0000 ); /* end Vitesse/Cicada errata */ } -#endif +#endif /* defined(CONFIG_CIS8201_PHY) */ #if defined(CONFIG_ET1011C_PHY )/*cpu/ppc4xx/4xx_enet.c +3
-2@@ -1179,15 +1178,16 @@ static int ppc_4xx_eth_init (struct eth_device *dev, bd_t * bis)miiphy_write (dev->name, reg,0x1c ,0x74f0 ); } -#endif +#endif /* defined(CONFIG_ET1011C_PHY) */ -#endif +#endif /* defined(CONFIG_440GX) ... */ /* Start/Restart autonegotiation */ phy_setup_aneg (dev->name, reg);udelay (1000 ); }#endif /* defined(CONFIG_PHY_RESET) */ +#if !defined(CONFIG_CS8952_PHY )miiphy_read (dev->name, reg,PHY_BMSR , ®_short);/*
cpu/ppc4xx/4xx_enet.c static int ppc_4xx_eth_init (struct · line 1217
Quoted 8 lines
cpu/ppc4xx/4xx_enet.c +0
-1@@ -1211,12 +1211,11 @@ static int ppc_4xx_eth_init (struct eth_device *dev, bd_t * bis) }udelay (1000 );/* 1 ms */ miiphy_read (dev->name, reg,PHY_BMSR , ®_short); - }puts (" done\n" );udelay (500000 );/* another 500 ms (results in faster booting)
*/
Quoted 9 lines
cpu/ppc4xx/4xx_enet.c +1
-1} -#endif /* #ifndef CONFIG_CS8952_PHY */ +#endif /* !defined(CONFIG_CS8952_PHY) */ get_speed:if (reg == CONFIG_FIXED_PHY) {Signature · 1 line
1.5.6.5
PATCH 1/1 ppc4xx: Fix compilation warning for PIP405
Hi Denis,
Quoted 10 lines · Denis Peter
Quoted 5 lines
Denis, could you please take a look at this patch and let me know if this
is ok? Or if the define and #ifdef can be removed completely?Thanks.
The PIP405 is a "dead" board. Only some prototypes have been produced. Currently I don't have a board to test it, but since I don't think that the PIP405 will ever become active again, I think it is save to remove the #ifdef completely.
OK, I'll remove it then. This will make the code a little bit more readable.
Thanks.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================