diff options
author | Helge Deller <deller@gmx.de> | 2024-03-22 11:22:48 +0100 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2024-04-02 14:22:45 +0200 |
commit | ba86419d9d307e044ccb41543b53cb8818d6e6af (patch) | |
tree | 26367a887e53675a09410d766fd89b45594ab7c8 | |
parent | f4e57acfc592ff6f93409450e8ff1869a48368fc (diff) | |
download | seabios-hppa-ba86419d9d307e044ccb41543b53cb8818d6e6af.zip seabios-hppa-ba86419d9d307e044ccb41543b53cb8818d6e6af.tar.gz seabios-hppa-ba86419d9d307e044ccb41543b53cb8818d6e6af.tar.bz2 |
pcidevice: Use portaddr_t for io port addresses
This is needed on parisc, since parisc uses 32-bit I/O port addressses
while Intel uses just 16 bits.
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r-- | src/hw/pcidevice.c | 4 | ||||
-rw-r--r-- | src/hw/pcidevice.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/hw/pcidevice.c b/src/hw/pcidevice.c index ed3e15d..bbfafa4 100644 --- a/src/hw/pcidevice.c +++ b/src/hw/pcidevice.c @@ -145,11 +145,11 @@ pci_enable_busmaster(struct pci_device *pci) } // Verify an IO bar and return it to the caller -u16 +portaddr_t pci_enable_iobar(struct pci_device *pci, u32 addr) { wait_preempt(); - u32 bar = pci_config_readl(pci->bdf, addr); + portaddr_t bar = pci_config_readl(pci->bdf, addr); if (!(bar & PCI_BASE_ADDRESS_SPACE_IO)) { warn_internalerror(); return 0; diff --git a/src/hw/pcidevice.h b/src/hw/pcidevice.h index eb3de39..727e50b 100644 --- a/src/hw/pcidevice.h +++ b/src/hw/pcidevice.h @@ -71,7 +71,7 @@ int pci_init_device(const struct pci_device_id *ids struct pci_device *pci_find_init_device(const struct pci_device_id *ids , void *arg); void pci_enable_busmaster(struct pci_device *pci); -u16 pci_enable_iobar(struct pci_device *pci, u32 addr); +portaddr_t pci_enable_iobar(struct pci_device *pci, u32 addr); void *pci_enable_membar(struct pci_device *pci, u32 addr); #endif // pcidevice.h |