aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorAndrew Scull <ascull@google.com>2022-04-21 16:11:13 +0000
committerTom Rini <trini@konsulko.com>2022-05-03 18:33:29 -0400
commit2635e3b50f8e646fc54c2bb15a017dea61a64a68 (patch)
treeef007c4b53fe0c22569adbb54aeadc9adb854447 /drivers/pci
parenta822d1dee4e2a6a035c464426e56d1e5c600d273 (diff)
downloadu-boot-2635e3b50f8e646fc54c2bb15a017dea61a64a68.zip
u-boot-2635e3b50f8e646fc54c2bb15a017dea61a64a68.tar.gz
u-boot-2635e3b50f8e646fc54c2bb15a017dea61a64a68.tar.bz2
pci: Add mask parameter to dm_pci_map_bar()
Add a mask parameter to control the lookup of the PCI region from which the mapping can be made. Signed-off-by: Andrew Scull <ascull@google.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci-uclass.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index a193e25..bb53e6b 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -1556,7 +1556,7 @@ static void *dm_pci_map_ea_bar(struct udevice *dev, int bar, size_t offset,
}
void *dm_pci_map_bar(struct udevice *dev, int bar, size_t offset, size_t len,
- unsigned long flags)
+ unsigned long mask, unsigned long flags)
{
struct pci_child_plat *pdata = dev_get_parent_plat(dev);
struct udevice *udev = dev;
@@ -1596,8 +1596,8 @@ void *dm_pci_map_bar(struct udevice *dev, int bar, size_t offset, size_t len,
* a PCI range, but a better check would be to probe for the size of
* the bar and prevent overflow more locally.
*/
- return dm_pci_bus_to_virt(udev, pci_bus_addr + offset, len,
- PCI_REGION_TYPE, flags, MAP_NOCACHE);
+ return dm_pci_bus_to_virt(udev, pci_bus_addr + offset, len, mask, flags,
+ MAP_NOCACHE);
}
static int _dm_pci_find_next_capability(struct udevice *dev, u8 pos, int cap)