net: Add option to disable fibre on M88E1111 PHY for PPC4xx
PATCH 1/1 net: Add option to disable fibre on M88E1111 PHY for PPC4xx
By defining CONFIG_M88E1111_DISABLE_FIBRE boards can configure the M88E1111 PYH to disable fibre. This is needed for an upcoming PPC460GT based board, which has fibre/copper auto-selection enabled by default. This doesn't seem to work. So we disable fibre in the PHY register.
--- drivers/net/4xx_enet.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/net/4xx_enet.c +5 -0
@@ -1095,6 +1095,11 @@ static int ppc_4xx_eth_init (struct eth_device *dev, bd_t * bis)miiphy_write (dev->name, reg,0x18 ,0x4101 );miiphy_write (dev->name, reg,0x09 ,0x0e00 );miiphy_write (dev->name, reg,0x04 ,0x01e1 ); +#if defined(CONFIG_M88E1111_DISABLE_FIBRE ) +miiphy_read (dev->name, reg,0x1b , ®_short); + reg_short |=0x8000 ; +miiphy_write (dev->name, reg,0x1b , reg_short); +#endif #endif #if defined(CONFIG_M88E1112_PHY )if (bis->bi_phymode[devnum] ==BI_PHYMODE_SGMII ) {
Signature · 1 line
1.7.1
PATCH 1/1 net: Add option to disable fibre on M88E1111 PHY for PPC4xx
Hi Stefan,
Quoted 6 lines · Stefan Roese
By defining
CONFIG_M88E1111_DISABLE_FIBREboards can configure the M88E1111 PYH to disable fibre. This is needed for an upcoming PPC460GT based board, which has fibre/copper auto-selection enabled by default. This doesn't seem to work. So we disable fibre in the PHY register.
I don't mean to be pedantic, but unless this is a Fibre Channel link (and it isn't), the appropriate spelling is 'FIBER'. I say this reluctantly, having been raised using British/European spelling...
Quoted 13 lines
Signed-off-by Stefan Roese<[email protected]>Cc Ben Warren<[email protected]>--- drivers/net/4xx_enet.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)drivers/net/4xx_enet.c +0
-0@@ -1095,6 +1095,11 @@ static int ppc_4xx_eth_init (struct eth_device *dev, bd_t * bis)miiphy_write (dev->name, reg,0x18 ,0x4101 );
drivers/net/4xx_enet.c static int ppc_4xx_eth_init (struct eth_device *dev, bd_t * bis) · line 1105
Quoted 10 lines
drivers/net/4xx_enet.c +5
-0miiphy_write (dev->name, reg,0x09 ,0x0e00 );miiphy_write (dev->name, reg,0x04 ,0x01e1 ); +#if defined(CONFIG_M88E1111_DISABLE_FIBRE ) +miiphy_read (dev->name, reg,0x1b ,®_short); + reg_short |=0x8000 ; +miiphy_write (dev->name, reg,0x1b , reg_short); +#endif #endif #if defined(CONFIG_M88E1112_PHY )if (bis->bi_phymode[devnum] ==BI_PHYMODE_SGMII ) {
regards,
Ben
PATCH 1/1 net: Add option to disable fibre on M88E1111 PHY for PPC4xx
Hi Ben,
Quoted 8 lines · On Monday 21 June 2010 07:56:17 Ben Warren wrote:
Quoted 4 lines
By defining
CONFIG_M88E1111_DISABLE_FIBREboards can configure the M88E1111 PYH to disable fibre. This is needed for an upcoming PPC460GT based board, which has fibre/copper auto-selection enabled by default. This doesn't seem to work. So we disable fibre in the PHY register.I don't mean to be pedantic, but unless this is a Fibre Channel link (and it isn't), the appropriate spelling is 'FIBER'. I say this reluctantly, having been raised using British/European spelling...
Thanks. I'll send an updated patch version tomorrow.
Cheers,
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