public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Trizeps IV adaptation to changes in dm9000 driver
@ 2009-05-06  6:55 sbabic at denx.de
  2009-07-17 22:21 ` Wolfgang Denk
  0 siblings, 1 reply; 5+ messages in thread
From: sbabic at denx.de @ 2009-05-06  6:55 UTC (permalink / raw)
  To: u-boot

From: Stefano Babic <sbabic@denx.de>

Last patch in the dm9000 driver breaks the trizeps IV board (PXA).
Reading of eeprom is modified here to reflect the changes in
read_srom_word().

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 board/trizepsiv/eeprom.c |   10 ++++++----
 drivers/net/dm9000x.c    |    4 ++--
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/board/trizepsiv/eeprom.c b/board/trizepsiv/eeprom.c
index 63f1c6c..68fc754 100644
--- a/board/trizepsiv/eeprom.c
+++ b/board/trizepsiv/eeprom.c
@@ -24,16 +24,18 @@
 #include <common.h>
 #include <command.h>
 
-extern u16 read_srom_word(int);
+extern void read_srom_word(int, u8 *);
 extern void write_srom_word(int offset, u16 val);
 
 static int do_read_dm9000_eeprom ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) {
-	int i;
+	unsigned int i;
+	u8 value;
 
 	for (i=0; i < 0x40; i++) {
 		if (!(i % 0x10))
-			printf("\n%08lx:", i);
-		printf(" %04x", read_srom_word(i));
+			printf("\n%08x:", i);
+		read_srom_word(i, &value);
+		printf(" %04x", value);
 	}
 	printf ("\n");
 	return (0);
diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c
index 8ca2bf7..519a11d 100644
--- a/drivers/net/dm9000x.c
+++ b/drivers/net/dm9000x.c
@@ -113,7 +113,7 @@ void eth_halt(void);
 static int dm9000_probe(void);
 static u16 phy_read(int);
 static void phy_write(int, u16);
-static void read_srom_word(int, u8 *);
+void read_srom_word(int, u8 *);
 static u8 DM9000_ior(int);
 static void DM9000_iow(int reg, u8 value);
 
@@ -541,7 +541,7 @@ eth_rx(void)
 /*
   Read a word data from SROM
 */
-static void read_srom_word(int offset, u8 *to)
+void read_srom_word(int offset, u8 *to)
 {
 	DM9000_iow(DM9000_EPAR, offset);
 	DM9000_iow(DM9000_EPCR, 0x4);
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-08-08  9:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-06  6:55 [U-Boot] [PATCH] Trizeps IV adaptation to changes in dm9000 driver sbabic at denx.de
2009-07-17 22:21 ` Wolfgang Denk
2009-08-05 20:46   ` Wolfgang Denk
2009-08-05 20:48     ` Ben Warren
2009-08-08  9:08     ` Ben Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox