[U-Boot-Users] [patch] rtl8139.c: use PCI IO map
Masami Komiya
mkomiya at sonare.it
Mon Oct 15 17:56:20 CEST 2007
Dear Lucas,
I used RTL8139 driver on MPC8241 board. It works fine.
The followings are defined in the configuration file.
/* PCI memory */
#define CFG_IBAT2L (0x80000000 | BATL_PP_10 | BATL_CACHEINHIBIT)
#define CFG_IBAT2U (0x80000000 | BATU_BL_256M | BATU_VS | BATU_VP)
#define CFG_DBAT2L CFG_IBAT2L
#define CFG_DBAT2U CFG_IBAT2U
/* PCI Stuff */
#define CONFIG_PCI
#define CONFIG_PCI_PNP
#define CONFIG_NET_MULTI
#define CONFIG_RTL8139
/* for RTL8139 */
#define KSEG1ADDR(x) ({u32 _x=le32_to_cpu(*(u32 *)(x)); (&_x);})
#define _IO_BASE 0x00000000
The result of pci command are
# pci
Scanning PCI devices on bus 0
BusDevFun VendorId DeviceId Device Class Sub-Class
_____________________________________________________________
00.00.00 0x1057 0x0006 Bridge device 0x00
00.0c.00 0x10ec 0x8139 Network controller 0x00
:
# pci header 00.0c.00
vendor ID = 0x10ec
device ID = 0x8139
command register = 0x0007
status register = 0x0290
revision ID = 0x20
class code = 0x02 (Network controller)
sub class code = 0x00
programming interface = 0x00
cache line = 0x08
latency time = 0x20
header type = 0x00
BIST = 0x00
base address 0 = 0x00000001
base address 1 = 0x80000000
base address 2 = 0x00000000
base address 3 = 0x00000000
base address 4 = 0x00000000
base address 5 = 0x00000000
cardBus CIS pointer = 0x00000000
sub system vendor ID = 0x11ec
sub system ID = 0x8139
expansion ROM base address = 0x00000000
interrupt line = 0xff
interrupt pin = 0x01
min Grant = 0x20
max Latency = 0x40
Masami Komiya
More information about the U-Boot
mailing list