[U-Boot-Users] [patch] rtl8139.c: use PCI IO map

Lucas Jin
2007-10-13T13:53:11Z

Signed-off-by: Lucas Jin <lucasjin@gmail.com>

--- ./drivers/rtl8139.c.orig 2007-10-12 22:17:52.000000000 +0800
+++ ./drivers/rtl8139.c 2007-10-13 17:34:40.117515408 +0800
@@ -104,8 +104,8 @@
#undef DEBUG_RX

#define currticks() get_timer(0)
-#define bus_to_phys(a) pci_mem_to_phys((pci_dev_t)dev->priv, a)
-#define phys_to_bus(a) pci_phys_to_mem((pci_dev_t)dev->priv, a)
+#define bus_to_phys(a) pci_io_to_phys((pci_dev_t)dev->priv, a)
+#define phys_to_bus(a) pci_phys_to_io((pci_dev_t)dev->priv, a)

/* Symbolic offsets to registers. */
enum RTL8139_registers {
@@ -213,7 +213,7 @@
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);

--------------
Lucas Jin