* Code cleanup:
- remove trailing white space, trailing empty lines, C++ comments, etc.
- split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)
* Patches by Kenneth Johansson, 25 Jun 2003:
- major rework of command structure
(work done mostly by Michal Cendrowski and Joakim Kristiansen)
diff --git a/board/eltec/bab7xx/dc_srom.c b/board/eltec/bab7xx/dc_srom.c
index ef956e6..a44af6e 100644
--- a/board/eltec/bab7xx/dc_srom.c
+++ b/board/eltec/bab7xx/dc_srom.c
@@ -118,7 +118,7 @@
a = (char)(offset << 2);
for (i=0; i<6; i++, a <<= 1)
{
- srom_latch(command | ((a < 0) ? DT_IN : 0), addr);
+ srom_latch(command | ((a < 0) ? DT_IN : 0), addr);
}
udelay(1);
@@ -136,11 +136,11 @@
for (i=0; i<16; i++)
{
- sendto_srom(command | DT_CLK, addr);
- tmp = getfrom_srom(addr);
- sendto_srom(command, addr);
+ sendto_srom(command | DT_CLK, addr);
+ tmp = getfrom_srom(addr);
+ sendto_srom(command, addr);
- word = (word << 1) | ((tmp >> 3) & 0x01);
+ word = (word << 1) | ((tmp >> 3) & 0x01);
}
sendto_srom(command & 0x0000ff00, addr);
@@ -160,13 +160,13 @@
for (i=0; i<16; i++)
{
- tmp = (longVal & 0x8000)>>13;
+ tmp = (longVal & 0x8000)>>13;
- sendto_srom (tmp | command, addr);
- sendto_srom (tmp | command | DT_CLK, addr);
- sendto_srom (tmp | command, addr);
+ sendto_srom (tmp | command, addr);
+ sendto_srom (tmp | command | DT_CLK, addr);
+ sendto_srom (tmp | command, addr);
- longVal = longVal<<1;
+ longVal = longVal<<1;
}
sendto_srom(command & 0x0000ff00, addr);
@@ -175,15 +175,15 @@
tmp = 100;
do
{
- if ((getfrom_srom(dc_srom_iobase) & 0x8) == 0x8)
- break;
- udelay(1000);
+ if ((getfrom_srom(dc_srom_iobase) & 0x8) == 0x8)
+ break;
+ udelay(1000);
} while (--tmp);
if (tmp == 0)
{
- printf("Write DEC21143 SRom timed out !\n");
- return (-1);
+ printf("Write DEC21143 SRom timed out !\n");
+ return (-1);
}
return 0;
@@ -218,7 +218,7 @@
for (i=0; i<6; i++)
{
- srom_latch (SROM_WR | SROM_SR | DT_IN | DT_CS, addr);
+ srom_latch (SROM_WR | SROM_SR | DT_IN | DT_CS, addr);
}
}
@@ -256,8 +256,8 @@
memset (dest, 0, 128);
for (offset=0; offset<64; offset++)
{
- tmp = srom_rd (dc_srom_iobase, offset);
- *dest++ = le16_to_cpu(tmp);
+ tmp = srom_rd (dc_srom_iobase, offset);
+ *dest++ = le16_to_cpu(tmp);
}
return (0);
@@ -280,9 +280,9 @@
for (offset=0; offset<64; offset++)
{
- if (srom_wr (dc_srom_iobase, offset, *src) == -1)
- return (-1);
- src++;
+ if (srom_wr (dc_srom_iobase, offset, *src) == -1)
+ return (-1);
+ src++;
}
return (0);