]> www.infradead.org Git - users/rw/ppcboot.git/commitdiff
Fix for ppc405gp ethernet code
authorwdenk <wdenk>
Tue, 24 Apr 2001 11:06:15 +0000 (11:06 +0000)
committerwdenk <wdenk>
Tue, 24 Apr 2001 11:06:15 +0000 (11:06 +0000)
(Patch by Stefan Roese 24 Apr 2001)

CHANGELOG
cpu/ppc4xx/405gp_enet.c
include/config_CANBT.h

index 91981202a484c6255148be6b7fff65abe04815d4..bd9553793d2104b7bb61f84dbc52db2e76db4877 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -56,6 +56,9 @@ To do:
 Modifications for 0.9.1:
 ======================================================================
 
+* Fix for ppc405gp ethernet code
+  (Patch by Stefan Roese 24 Apr 2001)
+
 * Fixes for HYMOD board
   (Patch by Murray Jensen, 23 Apr 2001)
   
index ad328b5b1bd464599b2bbaa7aa41141cf99056b0..13e2d7bf3c826765ac8148c8aab6e2df51132535 100644 (file)
@@ -50,6 +50,9 @@
   |                to the user
   |              - Info print about send/received/handled packet number if 
   |                INFO_405_ENET is set
+  |  17-Apr-01   stefan.roese@esd-electronics.com
+  |              - MAL reset in "eth_halt" included
+  |              - Enet speed and duplex output now in one line
   +-----------------------------------------------------------------------------*/
 
 #include <ppcboot.h>
@@ -201,6 +204,12 @@ void emac_err (unsigned long isr);
 
 void eth_halt(void)
 {
+  /* 1st reset MAL */
+  mtdcr(malmcr, MAL_CR_MMSR);
+
+  /* wait for reset */
+  while (mfdcr(malmcr) & MAL_CR_MMSR) {};
+
   /* EMAC RESET */
   out32 (EMAC_M0, EMAC_M0_SRST);
 }
@@ -255,7 +264,7 @@ int eth_init (bd_t *bis)
   out32 (EMAC_M0, in32 (EMAC_M0) & ~EMAC_M0_SRST);
 
   speed = miiphy_speed();
-  printf("ENET Speed is %d Mbs... \n", (int)speed);
+  printf("ENET Speed is %d Mbps - ", (int)speed);
   duplex = miiphy_duplex();
   if( duplex == HALF)
     printf("HALF duplex connection\n");
index fbd26df7f1473bdc9eadd9efac700f106efeb6f8..09f0aad749d9ae9af172a5f7967b5effa73d58b2 100644 (file)
@@ -65,8 +65,9 @@
 
 #define        CONFIG_PHY_ADDR         0       /* PHY address                  */
 
-#define CONFIG_COMMANDS                ((CONFIG_CMD_DFL | CFG_CMD_IRQ | CFG_CMD_ASKENV) \
-                                 & ~CFG_CMD_NET)
+#define CONFIG_COMMANDS                \
+        ((CONFIG_CMD_DFL | CFG_CMD_IRQ | CFG_CMD_ASKENV | CFG_CMD_EEPROM) \
+         & ~CFG_CMD_NET)
 
 /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
 #include <cmd_confdefs.h>