mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 13:41:31 +00:00
net: pcnet: Switch to PCI memory access
Replace the PCI IO access with PCI memory access, the card supports both, but the former does not work with QEMU SH4. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
3c0bcb97d6
commit
69529c9120
1 changed files with 3 additions and 3 deletions
|
@ -179,14 +179,14 @@ int pcnet_initialize(bd_t *bis)
|
||||||
/*
|
/*
|
||||||
* Setup the PCI device.
|
* Setup the PCI device.
|
||||||
*/
|
*/
|
||||||
pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_0, &bar);
|
pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_1, &bar);
|
||||||
dev->iobase = pci_io_to_phys(devbusfn, bar);
|
dev->iobase = pci_mem_to_phys(devbusfn, bar);
|
||||||
dev->iobase &= ~0xf;
|
dev->iobase &= ~0xf;
|
||||||
|
|
||||||
PCNET_DEBUG1("%s: devbusfn=0x%x iobase=0x%lx: ",
|
PCNET_DEBUG1("%s: devbusfn=0x%x iobase=0x%lx: ",
|
||||||
dev->name, devbusfn, (unsigned long)dev->iobase);
|
dev->name, devbusfn, (unsigned long)dev->iobase);
|
||||||
|
|
||||||
command = PCI_COMMAND_IO | PCI_COMMAND_MASTER;
|
command = PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER;
|
||||||
pci_write_config_word(devbusfn, PCI_COMMAND, command);
|
pci_write_config_word(devbusfn, PCI_COMMAND, command);
|
||||||
pci_read_config_word(devbusfn, PCI_COMMAND, &status);
|
pci_read_config_word(devbusfn, PCI_COMMAND, &status);
|
||||||
if ((status & command) != command) {
|
if ((status & command) != command) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue