mpc8249eamds support for Gigabit Ethernet works again

initialize PHY registers late enough, so that phy access is possible
This commit is contained in:
Thomas Doerfler
2008-07-18 11:24:39 +00:00
parent e5aa0d1b66
commit 59be902499
4 changed files with 27 additions and 11 deletions

View File

@@ -1,3 +1,8 @@
2008-07-18 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
* network/network.c:
mpc8249eamds support for Gigabit Ethernet works again
2008-07-18 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> 2008-07-18 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
* network/network.c: * network/network.c:

View File

@@ -80,9 +80,9 @@ int BSP_tsec_attach
if (unitNumber == 1) { if (unitNumber == 1) {
/* /*
* init system I/O configuration registers * init system I/O configuration registers
* to ensure proper pin functions for TSEC1_RX_ER and TSEC1_TX_ER * to ensure proper pin functions
*/ */
mpc83xx.syscon.sicrh = mpc83xx.syscon.sicrh & ~0x02800000; mpc83xx.syscon.sicrh = mpc83xx.syscon.sicrh & ~0x1F800000;
/* /*
* init port registers (GPIO2DIR) for TSEC1 * init port registers (GPIO2DIR) for TSEC1
*/ */
@@ -90,6 +90,11 @@ int BSP_tsec_attach
| 0x0000001f); | 0x0000001f);
} }
if (unitNumber == 2) { if (unitNumber == 2) {
/*
* init system I/O configuration registers
* to ensure proper pin functions
*/
mpc83xx.syscon.sicrh = mpc83xx.syscon.sicrh & ~0x007f8000;
/* /*
* init port registers (GPIO2DIR) for TSEC2 * init port registers (GPIO2DIR) for TSEC2
*/ */

View File

@@ -1,3 +1,8 @@
2008-07-18 Thomas Doerfler <thomas.doerfler@embedded-brains.de>
* mpc83xx/network/tsec.c:
initialize PHY registers late enough, so that phy access is possible
2008-07-17 Thomas Doerfler <thomas.doerfler@embedded-brains.de> 2008-07-17 Thomas Doerfler <thomas.doerfler@embedded-brains.de>
* rtems/powerpc/powerpc.h: * rtems/powerpc/powerpc.h:

View File

@@ -1503,6 +1503,16 @@ static void mpc83xx_tsec_init
sc->reg_ptr->rctrl &= ~M83xx_TSEC_RCTRL_PROM; sc->reg_ptr->rctrl &= ~M83xx_TSEC_RCTRL_PROM;
} }
#if defined(HSC_CM01)
/*
* for HSC CM01: we need to configure the PHY to use maximum skew adjust
*/
mpc83xx_tsec_mdio_write(-1,sc,31,1);
mpc83xx_tsec_mdio_write(-1,sc,28,0xf000);
mpc83xx_tsec_mdio_write(-1,sc,31,0);
#endif
/* /*
* init timer so the "watchdog function gets called periodically * init timer so the "watchdog function gets called periodically
*/ */
@@ -1954,15 +1964,6 @@ static int mpc83xx_tsec_driver_attach
ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_snd.ifq_maxlen = ifqmaxlen;
} }
#if defined(HSC_CM01)
/*
* for HSC CM01: we need to configure the PHY to use maximum skew adjust
*/
mpc83xx_tsec_mdio_write(-1,sc,31,1);
mpc83xx_tsec_mdio_write(-1,sc,28,0xf000);
mpc83xx_tsec_mdio_write(-1,sc,31,0);
#endif
/* /*
* Attach the interface * Attach the interface
*/ */