[OpenBIOS] [PATCH] pci: fix OHCI driver PCI address

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Mon May 21 22:47:04 CEST 2018


Commit a1c2e4f "Add USB OHCI + HID driver" hardcoded the high order bit of
the PCI address to that used on PPC machines instead of using the correct
PCI_ADDR() macro.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
 drivers/pci.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/pci.c b/drivers/pci.c
index 295be7e..7085a3a 100644
--- a/drivers/pci.c
+++ b/drivers/pci.c
@@ -1111,7 +1111,10 @@ int i82378_config_cb(const pci_config_t *config)
 int usb_ohci_config_cb(const pci_config_t *config)
 {
 #ifdef CONFIG_DRIVER_USB
-    ob_usb_ohci_init(config->path, 0x80000000 | config->dev);
+    pci_addr addr = PCI_ADDR(
+        PCI_BUS(config->dev), PCI_DEV(config->dev), PCI_FN(config->dev));
+
+    ob_usb_ohci_init(config->path, addr);
 #endif
     return 0;
 }
-- 
2.11.0




More information about the OpenBIOS mailing list