From: wdenk Date: Tue, 24 Apr 2001 11:06:15 +0000 (+0000) Subject: Fix for ppc405gp ethernet code X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0510d6d48c31f236f75ae10088b8cd3da4f30a57;p=users%2Frw%2Fppcboot.git Fix for ppc405gp ethernet code (Patch by Stefan Roese 24 Apr 2001) --- diff --git a/CHANGELOG b/CHANGELOG index 9198120..bd95537 100644 --- 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) diff --git a/cpu/ppc4xx/405gp_enet.c b/cpu/ppc4xx/405gp_enet.c index ad328b5..13e2d7b 100644 --- a/cpu/ppc4xx/405gp_enet.c +++ b/cpu/ppc4xx/405gp_enet.c @@ -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 @@ -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"); diff --git a/include/config_CANBT.h b/include/config_CANBT.h index fbd26df..09f0aad 100644 --- a/include/config_CANBT.h +++ b/include/config_CANBT.h @@ -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