[U-Boot] [PATCH 3/4] NetStar: fix eeprom utility indentation and spelling
Ladislav Michl
ladis at linux-mips.org
Tue Apr 21 02:51:41 CEST 2009
Signed-off-by: Ladislav Michl <ladis at linux-mips.org>
---
board/netstar/eeprom.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/board/netstar/eeprom.c b/board/netstar/eeprom.c
index 5783bed..5ee89e1 100644
--- a/board/netstar/eeprom.c
+++ b/board/netstar/eeprom.c
@@ -37,17 +37,16 @@ static u16 read_eeprom_reg(u16 reg)
SMC_outw(reg, PTR_REG);
SMC_SELECT_BANK(1);
- SMC_outw(SMC_inw (CTL_REG) | CTL_EEPROM_SELECT | CTL_RELOAD,
- CTL_REG);
+ SMC_outw(SMC_inw(CTL_REG) | CTL_EEPROM_SELECT | CTL_RELOAD, CTL_REG);
timeout = 100;
- while((SMC_inw (CTL_REG) & CTL_RELOAD) && --timeout)
+ while ((SMC_inw(CTL_REG) & CTL_RELOAD) && --timeout)
udelay(100);
if (timeout == 0) {
- printf("Timeout Reading EEPROM register %02x\n", reg);
+ printf("Timeout reading EEPROM register %02x\n", reg);
return 0;
}
- return SMC_inw (GP_REG);
+ return SMC_inw(GP_REG);
}
static int write_eeprom_reg(u16 value, u16 reg)
@@ -59,12 +58,12 @@ static int write_eeprom_reg(u16 value, u16 reg)
SMC_SELECT_BANK(1);
SMC_outw(value, GP_REG);
- SMC_outw(SMC_inw (CTL_REG) | CTL_EEPROM_SELECT | CTL_STORE, CTL_REG);
+ SMC_outw(SMC_inw(CTL_REG) | CTL_EEPROM_SELECT | CTL_STORE, CTL_REG);
timeout = 100;
while ((SMC_inw(CTL_REG) & CTL_STORE) && --timeout)
- udelay (100);
+ udelay(100);
if (timeout == 0) {
- printf("Timeout Writing EEPROM register %02x\n", reg);
+ printf("Timeout writing EEPROM register %02x\n", reg);
return 0;
}
@@ -154,7 +153,7 @@ int eeprom(int argc, char *argv[])
return 1;
}
- if ((SMC_inw (BANK_SELECT) & 0xFF00) != 0x3300) {
+ if ((SMC_inw(BANK_SELECT) & 0xFF00) != 0x3300) {
printf("SMSC91111 not found.\n");
return 2;
}
--
1.5.3.8
More information about the U-Boot
mailing list