]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - cpu/ppc4xx/405gp_enet.c
* Patch by Andre Schwarz, 24 Nov 2003:
[karo-tx-uboot.git] / cpu / ppc4xx / 405gp_enet.c
index a9c7cfe0506731d80c2e694e47520fb3737e31aa..7394c21958243a446521ecaa3f479a8c48ced952 100644 (file)
@@ -67,6 +67,9 @@
  *  17-Jun-02   stefan.roese@esd-electronics.com
  *              - MAL error debug printf 'M' removed (rx de interrupt may
  *                occur upon many incoming packets with only 4 rx buffers).
+ *  21-Nov-03   pavel.bartusek@sysgo.com
+ *              - set ZMII bridge speed on 440
+ *
  *-----------------------------------------------------------------------------*/
 
 #include <common.h>
@@ -414,6 +417,14 @@ static int ppc_4xx_eth_init (struct eth_device *dev, bd_t * bis)
 
        out32 (EMAC_M1, mode_reg);
 
+#if defined(CONFIG_440)
+       /* set speed in the ZMII bridge */
+       if (speed == _100BASET)
+               out32(ZMII_SSR, in32(ZMII_SSR) | 0x10000000);
+       else
+               out32(ZMII_SSR, in32(ZMII_SSR) & ~0x10000000);
+#endif
+
        /* Enable broadcast and indvidual address */
        out32 (EMAC_RXM, EMAC_RMR_BAE | EMAC_RMR_IAE
               /*| EMAC_RMR_ARRP| EMAC_RMR_SFCS | EMAC_RMR_SP */ );