aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci/pci_mpc85xx.c
diff options
context:
space:
mode:
authorBin Meng2021-02-25 17:22:41 +0800
committerPriyanka Jain2021-03-05 10:25:43 +0530
commit03ff970a1b5a07f0814adf8156e2fb520ffb322a (patch)
treebc57c463934da3ac97544baaf9120d925c0aee93 /drivers/pci/pci_mpc85xx.c
parent5a40f5c09dfdc1ddc9413584d5a99f2879e10de8 (diff)
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 <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Diffstat (limited to 'drivers/pci/pci_mpc85xx.c')
-rw-r--r--drivers/pci/pci_mpc85xx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pci/pci_mpc85xx.c b/drivers/pci/pci_mpc85xx.c
index 7387a1edd9f..f0d469a8fac 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;
}