@@ -16,7 +16,7 @@ static int do_read_dm9000_eeprom ( cmd_tbl_t *cmdtp,
int flag, int argc, char *
for (i=0; i < 0x40; i++) {
if (!(i % 0x10))
printf("\n%08x:", i);
- dm9000_read_srom_word(i, data);
+ dm9000_read_srom_word(0, i, data);
printf(" %02x%02x", data[1], data[0]);
}
printf ("\n");
@@ -35,7 +35,7 @@ static int do_write_dm9000_eeprom ( cmd_tbl_t
*cmdtp, int flag, int argc, char *
printf("Wrong offset : 0x%x\n",offset);
return cmd_usage(cmdtp);
}
- dm9000_write_srom_word(offset, value);
+ dm9000_write_srom_word(0, offset, value);
return (0);
}
@@ -530,8 +530,10 @@ static int dm9000_rx(struct eth_device *netdev)
Read a word data from SROM
*/
#if !defined(CONFIG_DM9000_NO_SROM)
-void dm9000_read_srom_word(int offset, u8 *to)
+void dm9000_read_srom_word(int adapter_no, int offset, u8 *to)
{
+ struct eth_device *dev = eth_get_dev_by_index(adapter_no);
+
DM9000_iow(DM9000_EPAR, offset);
DM9000_iow(DM9000_EPCR, 0x4);
udelay(8000);
@@ -540,8 +542,10 @@ void dm9000_read_srom_word(int offset, u8 *to)
to[1] = DM9000_ior(DM9000_EPDRH);
}
-void dm9000_write_srom_word(int offset, u16 val)
+void dm9000_write_srom_word(int adapter_no, int offset, u16 val)
{
+ struct eth_device *dev = eth_get_dev_by_index(adapter_no);
+
DM9000_iow(DM9000_EPAR, offset);
DM9000_iow(DM9000_EPDRH, ((val >> 8) & 0xff));
DM9000_iow(DM9000_EPDRL, (val & 0xff));
@@ -10,8 +10,8 @@
/****************** function prototypes **********************/
#if !defined(CONFIG_DM9000_NO_SROM)
-void dm9000_write_srom_word(int offset, u16 val);
-void dm9000_read_srom_word(int offset, u8 *to);
+void dm9000_write_srom_word(int adapter_no, int offset, u16 val);
+void dm9000_read_srom_word(int adapter_no, int offset, u8 *to);
#endif
#endif /* __DM9000_H__ */