diff options
author | Helge Deller <deller@gmx.de> | 2024-03-22 11:22:48 +0100 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2024-05-15 15:50:06 +0200 |
commit | 495a7f932b1ac16dc555e97c86d7ae50519ae92e (patch) | |
tree | 26367a887e53675a09410d766fd89b45594ab7c8 | |
parent | ed9637970729647836cf2f28c17418980ac96f98 (diff) | |
download | seabios-hppa-495a7f932b1ac16dc555e97c86d7ae50519ae92e.zip seabios-hppa-495a7f932b1ac16dc555e97c86d7ae50519ae92e.tar.gz seabios-hppa-495a7f932b1ac16dc555e97c86d7ae50519ae92e.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 |