From: Marek Vasut Date: Sat, 18 Apr 2020 03:11:05 +0000 (+0200) Subject: net: pcnet: Switch to PCI memory access X-Git-Tag: v2020.07-rc2~18^2~43 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=69529c912059ed4585f648cc6cde1a2fbd5b722b;p=oweals%2Fu-boot.git 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 Cc: Daniel Schwierzeck Cc: Joe Hershberger --- diff --git a/drivers/net/pcnet.c b/drivers/net/pcnet.c index e7d6c8d714..34a5a16cfe 100644 --- a/drivers/net/pcnet.c +++ b/drivers/net/pcnet.c @@ -179,14 +179,14 @@ int pcnet_initialize(bd_t *bis) /* * Setup the PCI device. */ - pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_0, &bar); - dev->iobase = pci_io_to_phys(devbusfn, bar); + pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_1, &bar); + dev->iobase = pci_mem_to_phys(devbusfn, bar); dev->iobase &= ~0xf; PCNET_DEBUG1("%s: devbusfn=0x%x iobase=0x%lx: ", 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_read_config_word(devbusfn, PCI_COMMAND, &status); if ((status & command) != command) {