* [U-Boot] [RFC][PATCH] Ethernet Support for eNET Board
@ 2009-08-29 11:03 Graeme Russ
2009-09-04 20:00 ` Wolfgang Denk
0 siblings, 1 reply; 2+ messages in thread
From: Graeme Russ @ 2009-08-29 11:03 UTC (permalink / raw)
To: u-boot
OK, after much wailing and gnashing of teeth, I have FINALLY got the
Ethernet chips on my eNET board working. In the end, the critical mod was
in drivers/net/rtl8139.c, line 217 where I needed to change
PCI_BASE_ADDRESS_1 to PCI_BASE_ADDRESS_0 - The big question for me now is
Why? I assume this driver is working for everyone else, and this change
will probably break the driver for everyone else, so now I need to know
what I can do so that Ethernet works on my board WITHOUT modifying rtl8139.c
I also had to move SC520_PCI_IO_PHYS from 0x1000 to 0x2000 because I have
LEDs, Hex Switches and a couple of other board specific I/O at 0x1000
Anyone got any ideas?
diff --git a/board/eNET/eNET.c b/board/eNET/eNET.c
index 29cf295..9359ea6 100644
--- a/board/eNET/eNET.c
+++ b/board/eNET/eNET.c
@@ -24,6 +24,8 @@
#include <common.h>
#include <asm/io.h>
#include <asm/ic/sc520.h>
+#include <net.h>
+#include <netdev.h>
#ifdef CONFIG_HW_WATCHDOG
#include <watchdog.h>
@@ -165,3 +167,10 @@ ulong board_flash_get_legacy (ulong base, int banknum, flash_info_t * info)
} else
return 0;
}
+
+int board_eth_init(bd_t *bis)
+{
+ printf("Initializing Ethernet\n");
+ return pci_eth_init(bis);
+}
+
diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c
index db8a727..a3df564 100644
--- a/drivers/net/rtl8139.c
+++ b/drivers/net/rtl8139.c
@@ -214,7 +214,7 @@ int rtl8139_initialize(bd_t *bis)
if ((devno = pci_find_devices(supported, idx++)) < 0)
break;
- pci_read_config_dword(devno, PCI_BASE_ADDRESS_1, &iobase);
+ pci_read_config_dword(devno, PCI_BASE_ADDRESS_0, &iobase);
iobase &= ~0xf;
debug ("rtl8139: REALTEK RTL8139 @0x%x\n", iobase);
diff --git a/include/asm-i386/ic/sc520.h b/include/asm-i386/ic/sc520.h
index 57c9904..6e2375c 100644
--- a/include/asm-i386/ic/sc520.h
+++ b/include/asm-i386/ic/sc520.h
@@ -306,14 +306,14 @@ extern volatile sc520_mmcr_t *sc520_mmcr;
/* PCI I/O space from 0x1000 to 0xdfff
* (make 0xe000-0xfdff available for stuff like PCCard boot) */
-#define SC520_PCI_IO_PHYS 0x00001000
-#define SC520_PCI_IO_BUS 0x00001000
+#define SC520_PCI_IO_PHYS 0x00002000
+#define SC520_PCI_IO_BUS 0x00002000
#define SC520_PCI_IO_SIZE 0x0000d000
/* system memory from 0x00000000 to 0x0fffffff */
#define SC520_PCI_MEMORY_PHYS 0x00000000
#define SC520_PCI_MEMORY_BUS 0x00000000
-#define SC520_PCI_MEMORY_SIZE 0x10000000
+#define SC520_PCI_MEMORY_SIZE 0x08000000
/* PCI bus memory from 0x10000000 to 0x26ffffff
* (make 0x27000000 - 0x27ffffff available for stuff like PCCard boot) */
diff --git a/include/configs/eNET.h b/include/configs/eNET.h
index c4c38de..df0d586 100644
--- a/include/configs/eNET.h
+++ b/include/configs/eNET.h
@@ -86,9 +86,10 @@
#define CONFIG_CMD_LOADS /* loads */
#define CONFIG_CMD_MEMORY /* md mm nm mw cp cmp crc base loop mtest */
#define CONFIG_CMD_MISC /* Misc functions like sleep etc*/
-#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
+#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
#undef CONFIG_CMD_NFS /* NFS support */
#define CONFIG_CMD_PCI /* PCI support */
+#define CONFIG_CMD_PING /* ICMP echo support */
#define CONFIG_CMD_RUN /* run command in env variable */
#define CONFIG_CMD_SAVEENV /* saveenv */
#define CONFIG_CMD_SETGETDCR /* DCR support on 4xx */
@@ -208,6 +209,12 @@
#define CONFIG_SYS_THIRD_PCI_IRQ 11
#define CONFIG_SYS_FORTH_PCI_IRQ 15
+ /*
+ * Network device (TRL8100B) support
+ */
+#define CONFIG_NET_MULTI
+#define CONFIG_RTL8139
+
/*-----------------------------------------------------------------------
* Hardware watchdog configuration
*/
^ permalink raw reply related [flat|nested] 2+ messages in thread* [U-Boot] [RFC][PATCH] Ethernet Support for eNET Board
2009-08-29 11:03 [U-Boot] [RFC][PATCH] Ethernet Support for eNET Board Graeme Russ
@ 2009-09-04 20:00 ` Wolfgang Denk
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2009-09-04 20:00 UTC (permalink / raw)
To: u-boot
Dear Graeme Russ,
In message <4A990AE7.2080908@gmail.com> you wrote:
> OK, after much wailing and gnashing of teeth, I have FINALLY got the
> Ethernet chips on my eNET board working. In the end, the critical mod was
> in drivers/net/rtl8139.c, line 217 where I needed to change
> PCI_BASE_ADDRESS_1 to PCI_BASE_ADDRESS_0 - The big question for me now is
> Why? I assume this driver is working for everyone else, and this change
> will probably break the driver for everyone else, so now I need to know
> what I can do so that Ethernet works on my board WITHOUT modifying rtl8139.c
>
> I also had to move SC520_PCI_IO_PHYS from 0x1000 to 0x2000 because I have
> LEDs, Hex Switches and a couple of other board specific I/O at 0x1000
>
> Anyone got any ideas?
>
>
> diff --git a/board/eNET/eNET.c b/board/eNET/eNET.c
I understand this is not to apply yet? Signed-off-by: etc are
missing...
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
In an organization, each person rises to the level of his own incom-
petency - The Peter Principle
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-04 20:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-29 11:03 [U-Boot] [RFC][PATCH] Ethernet Support for eNET Board Graeme Russ
2009-09-04 20:00 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox