|
@@ -138,6 +138,20 @@ void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar)
|
|
|
return ioremap_nocache(res->start, resource_size(res));
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(pci_ioremap_bar);
|
|
|
+
|
|
|
+void __iomem *pci_ioremap_wc_bar(struct pci_dev *pdev, int bar)
|
|
|
+{
|
|
|
+ /*
|
|
|
+ * Make sure the BAR is actually a memory resource, not an IO resource
|
|
|
+ */
|
|
|
+ if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) {
|
|
|
+ WARN_ON(1);
|
|
|
+ return NULL;
|
|
|
+ }
|
|
|
+ return ioremap_wc(pci_resource_start(pdev, bar),
|
|
|
+ pci_resource_len(pdev, bar));
|
|
|
+}
|
|
|
+EXPORT_SYMBOL_GPL(pci_ioremap_wc_bar);
|
|
|
#endif
|
|
|
|
|
|
#define PCI_FIND_CAP_TTL 48
|