Changes since U-Boot 0.3.1:
======================================================================
+* Patch by Robert Schwebel, April 02, 2003:
+ fix for SMSC91111 driver
+
* Patch by Vladimir Gurevich, 04 Jun 2003:
make ppc405 ethernet driver compatible with CONFIG_NET_MULTI option
return 0;
}
+/* Only one release command at a time, please */
+static inline void smc_wait_mmu_release_complete(void)
+{
+ int count = 0;
+ /* assume bank 2 selected */
+ while ( SMC_inw(MMU_CMD_REG) & MC_BUSY ) {
+ udelay(1); // Wait until not busy
+ if( ++count > 200) break;
+ }
+}
+
/*
. Function: smc_reset( void )
. Purpose:
/* Reset the MMU */
SMC_SELECT_BANK( 2 );
+ smc_wait_mmu_release_complete();
SMC_outw( MC_RESET, MMU_CMD_REG );
while ( SMC_inw( MMU_CMD_REG ) & MC_BUSY )
udelay(1); /* Wait until not busy */
/* SMC_SELECT_BANK(0); */
/* SMC_outw(0, RPC_REG); */
+ SMC_SELECT_BANK(1);
+
#ifdef USE_32_BIT
for ( i = 0; i < 6; i += 2 ) {
word address;
#define SMC_inw(r) (*((volatile word *)(SMC_BASE_ADDRESS+(r))))
#define SMC_inb(p) ({ \
unsigned int __p = (unsigned int)(SMC_BASE_ADDRESS + (p)); \
- unsigned int __v = *(volatile unsigned short *)((SMC_BASE_ADDRESS + __p) & ~1); \
+ unsigned int __v = *(volatile unsigned short *)((__p) & ~1); \
if (__p & 1) __v >>= 8; \
else __v &= 0xff; \
__v; })