diff --git a/components/drivers/pci/pci.c b/components/drivers/pci/pci.c index 67a5b5b57370..19c9994ca88e 100644 --- a/components/drivers/pci/pci.c +++ b/components/drivers/pci/pci.c @@ -717,7 +717,7 @@ rt_ubase_t rt_pci_get_addr(struct rt_pci_device *pdev, rt_ubase_t flags) for (int i = 0; i < RT_PCI_BAR_NR_MAX; i++) { if (pdev->resource[i].flags == flags) - return pdev->resource[i].base; + return (rt_ubase_t)rt_ioremap((void *)pdev->resource[i].base, pdev->resource[i].size); } return 0; }