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>
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 @@
 }
 
 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 @@
 	 * 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)