[U-Boot] [PATCH 6/8] PPC: Fix eepro100_eeprom.c by renaming "debug" to "eedebug"
Marek Vasut
marek.vasut at gmail.com
Mon Oct 3 02:57:28 CEST 2011
From: Marek Vasut <marex at pollux.denx.de>
Also, squash a warning about initialized static data.
Signed-off-by: Marek Vasut <marek.vasut at gmail.com>
---
examples/standalone/eepro100_eeprom.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/examples/standalone/eepro100_eeprom.c b/examples/standalone/eepro100_eeprom.c
index 3c7f380..889ab55 100644
--- a/examples/standalone/eepro100_eeprom.c
+++ b/examples/standalone/eepro100_eeprom.c
@@ -59,7 +59,7 @@ static unsigned short eeprom[256];
static int eeprom_size = 64;
static int eeprom_addr_size = 6;
-static int debug = 0;
+static int eedebug;
static inline unsigned short swap16(unsigned short x)
{
@@ -123,7 +123,7 @@ static int do_eeprom_cmd(long ioaddr, int cmd, int cmd_len)
unsigned retval = 0;
long ee_addr = ioaddr + EE_OFFSET;
- if (debug > 1)
+ if (eedebug > 1)
printf(" EEPROM op 0x%x: ", cmd);
outw(EE_ENB | EE_SHIFT_CLK, ee_addr);
@@ -133,7 +133,7 @@ static int do_eeprom_cmd(long ioaddr, int cmd, int cmd_len)
short dataval = (cmd & (1 << cmd_len)) ? EE_WRITE_1 : EE_WRITE_0;
outw(dataval, ee_addr);
eeprom_delay(ee_addr);
- if (debug > 2)
+ if (eedebug > 2)
printf("%X", inw(ee_addr) & 15);
outw(dataval | EE_SHIFT_CLK, ee_addr);
eeprom_delay(ee_addr);
@@ -144,7 +144,7 @@ static int do_eeprom_cmd(long ioaddr, int cmd, int cmd_len)
#endif
/* Terminate the EEPROM access. */
outw(EE_ENB & ~EE_CS, ee_addr);
- if (debug > 1)
+ if (eedebug > 1)
printf(" EEPROM result is 0x%5.5x.\n", retval);
return retval;
}
@@ -170,7 +170,7 @@ static void write_eeprom(long ioaddr, int index, int value, int addr_len)
3 + addr_len + 16);
/* Poll for write finished. */
i = eeprom_busy_poll(ee_ioaddr); /* Typical 2000 ticks */
- if (debug)
+ if (eedebug)
printf(" Write finished after %d ticks.\n", i);
/* Disable programming. This command is not instantaneous, so we check
for busy before the next op. */
--
1.7.6.2
More information about the U-Boot
mailing list