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);
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);
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);
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;
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);
}
}
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);
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);