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

BALATON Zoltan balaton at eik.bme.hu
Mon May 21 23:00:25 CEST 2018


On Mon, 21 May 2018, Mark Cave-Ayland wrote:
> 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

Used on all but Sparc64 apparently.

> PCI_ADDR() macro.
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>

Reviewed-by: BALATON Zoltan <balaton at eik.bme.hu>

> ---
> 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;
> }
>



More information about the OpenBIOS mailing list