From: Bin Meng Date: Thu, 25 Feb 2021 09:22:41 +0000 (+0800) Subject: pci: mpc85xx: Support controller register physical address beyond 32-bit X-Git-Tag: v2021.10~275^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=03ff970a1b5a07f0814adf8156e2fb520ffb322a;p=platform%2Fkernel%2Fu-boot.git pci: mpc85xx: Support controller register physical address beyond 32-bit devfdt_get_addr_index() returns fdt_addr_t which might be a 64-bit physical address. Use map_physmem() to return the virtual address that can be used by a 32-bit machine. Signed-off-by: Bin Meng Reviewed-by: Heiko Schocher Reviewed-by: Priyanka Jain --- diff --git a/drivers/pci/pci_mpc85xx.c b/drivers/pci/pci_mpc85xx.c index 7387a1e..f0d469a 100644 --- a/drivers/pci/pci_mpc85xx.c +++ b/drivers/pci/pci_mpc85xx.c @@ -134,9 +134,8 @@ static int mpc85xx_pci_of_to_plat(struct udevice *dev) addr = devfdt_get_addr_index(dev, 0); if (addr == FDT_ADDR_T_NONE) return -EINVAL; - priv->cfg_addr = (void __iomem *)addr; - addr += 4; - priv->cfg_data = (void __iomem *)addr; + priv->cfg_addr = (void __iomem *)map_physmem(addr, 0, MAP_NOCACHE); + priv->cfg_data = (void __iomem *)((ulong)priv->cfg_addr + 4); return 0; }