diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_ace.c | 5 | ||||
-rw-r--r-- | common/cmd_ide.c | 2 | ||||
-rw-r--r-- | common/miiphyutil.c | 5 |
3 files changed, 6 insertions, 6 deletions
diff --git a/common/cmd_ace.c b/common/cmd_ace.c index b6f8604..3512a15 100644 --- a/common/cmd_ace.c +++ b/common/cmd_ace.c @@ -190,16 +190,13 @@ static unsigned long systemace_read(int dev, /* Write sector count | ReadMemCardData. */ ace_writew((trans&0xff) | 0x0300, 0x14); - /* CONTROLREG = CFGRESET|LOCKREQ */ - ace_writew(0x0082, 0x18); - retry = trans * 16; while (retry > 0) { int idx; /* Wait for buffer to become ready. */ while (! (ace_readw(0x04) & 0x0020)) { - udelay(1000); + udelay(100); } /* Read 16 words of 2bytes from the sector buffer. */ diff --git a/common/cmd_ide.c b/common/cmd_ide.c index 3bed194..842a2fd 100644 --- a/common/cmd_ide.c +++ b/common/cmd_ide.c @@ -1417,7 +1417,7 @@ static void ident_cpy (unsigned char *dst, unsigned char *src, unsigned int len) unsigned char *end, *last; last = dst; - end = src + len; + end = src + len - 1; /* reserve space for '\0' */ if (len < 2) diff --git a/common/miiphyutil.c b/common/miiphyutil.c index f6436cf..919de3e 100644 --- a/common/miiphyutil.c +++ b/common/miiphyutil.c @@ -135,6 +135,7 @@ int miiphy_speed (unsigned char addr) { unsigned short reg; +#if defined(CONFIG_PHY_GIGE) if (miiphy_read (addr, PHY_1000BTSR, ®)) { printf ("PHY 1000BT Status read failed\n"); } else { @@ -144,6 +145,7 @@ int miiphy_speed (unsigned char addr) } } } +#endif /* CONFIG_PHY_GIGE */ if (miiphy_read (addr, PHY_ANLPAR, ®)) { puts ("PHY speed1 read failed, assuming 10bT\n"); @@ -165,7 +167,7 @@ int miiphy_duplex (unsigned char addr) { unsigned short reg; - +#if defined(CONFIG_PHY_GIGE) if (miiphy_read (addr, PHY_1000BTSR, ®)) { printf ("PHY 1000BT Status read failed\n"); } else { @@ -178,6 +180,7 @@ int miiphy_duplex (unsigned char addr) } } } +#endif /* CONFIG_PHY_GIGE */ if (miiphy_read (addr, PHY_ANLPAR, ®)) { puts ("PHY duplex read failed, assuming half duplex\n"); |