summaryrefslogtreecommitdiff
path: root/drivers/pci/pci-uclass.c
diff options
context:
space:
mode:
authorAndrew Scull <ascull@google.com>2022-04-21 16:11:12 +0000
committerTom Rini <trini@konsulko.com>2022-05-03 18:33:29 -0400
commita822d1dee4e2a6a035c464426e56d1e5c600d273 (patch)
tree1e625e5b18c13d7357029a5675fc58613ceb237f /drivers/pci/pci-uclass.c
parent7739d93d8288d9b58946ff5c5e46fb9e89599886 (diff)
pci: Update dm_pci_bus_to_virt() parameters
Add mask parameter and reorder length parameter to match the other PCI address conversion functions. Using PCI_REGION_TYPE as the mask gives the old behaviour. It's converted from a macro to an inline function as the length parameter is now used twice, but should only be calculated once. Signed-off-by: Andrew Scull <ascull@google.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/pci/pci-uclass.c')
-rw-r--r--drivers/pci/pci-uclass.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index edcb1a245f0..a193e2511f6 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -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, flags, len,
- MAP_NOCACHE);
+ return dm_pci_bus_to_virt(udev, pci_bus_addr + offset, len,
+ PCI_REGION_TYPE, flags, MAP_NOCACHE);
}
static int _dm_pci_find_next_capability(struct udevice *dev, u8 pos, int cap)