From e5a3bc2401a23f1890611f020f57f94824a534db Mon Sep 17 00:00:00 2001 From: Remy Bohmer Date: Sun, 3 May 2009 12:11:40 +0200 Subject: Add config option for disabling DM9000-SROM support. Some boards do not have SROM support for the DM9000 network adapter. Instead of listing these board names in the driver code, make this option configurable from the board config file. It also removes a build warning for the at91sam9261ek board: 'dm9000x.c:545: warning: 'read_srom_word' defined but not used' And it repaires the trizepsiv board build which was broken around the same routines Signed-off-by: Remy Bohmer Signed-off-by: Ben Warren --- board/trizepsiv/eeprom.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'board') diff --git a/board/trizepsiv/eeprom.c b/board/trizepsiv/eeprom.c index 63f1c6cdf7..9fa7aef9a2 100644 --- a/board/trizepsiv/eeprom.c +++ b/board/trizepsiv/eeprom.c @@ -23,17 +23,17 @@ #include #include - -extern u16 read_srom_word(int); -extern void write_srom_word(int offset, u16 val); +#include static int do_read_dm9000_eeprom ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { - int i; + unsigned int i; + u8 data[2]; for (i=0; i < 0x40; i++) { if (!(i % 0x10)) - printf("\n%08lx:", i); - printf(" %04x", read_srom_word(i)); + printf("\n%08x:", i); + dm9000_read_srom_word(i, data); + printf(" %02x%02x", data[1], data[0]); } printf ("\n"); return (0); @@ -54,7 +54,7 @@ static int do_write_dm9000_eeprom ( cmd_tbl_t *cmdtp, int flag, int argc, char * cmd_usage(cmdtp); return 1; } - write_srom_word(offset, value); + dm9000_write_srom_word(offset, value); return (0); } -- cgit v1.2.1