PCI: spear: Pass config resource through reg property
authorPratyush Anand <pratyush.anand@st.com>
Wed, 3 Sep 2014 05:20:49 +0000 (10:50 +0530)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 22 Sep 2014 20:19:30 +0000 (14:19 -0600)
PCIe configuration space should be passed through reg property, rather than
through ranges property.  This patch does the correction for SPEAr13XX
SOCs.

Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Mohit Kumar <mohit.kumar@st.com>
arch/arm/boot/dts/spear1310.dtsi
arch/arm/boot/dts/spear1340.dtsi
drivers/pci/host/pcie-spear13xx.c

index fa5f2bb5f106fd29aafddb40be9e821feab4ce86..9d342920695a5f4e465b04332cebddc9ff73c347 100644 (file)
@@ -85,7 +85,8 @@
 
                pcie0: pcie@b1000000 {
                        compatible = "st,spear1340-pcie", "snps,dw-pcie";
-                       reg = <0xb1000000 0x4000>;
+                       reg = <0xb1000000 0x4000>, <0x80000000 0x20000>;
+                       reg-names = "dbi", "config";
                        interrupts = <0 68 0x4>;
                        interrupt-map-mask = <0 0 0 0>;
                        interrupt-map = <0x0 0 &gic 0 68 0x4>;
                        #address-cells = <3>;
                        #size-cells = <2>;
                        device_type = "pci";
-                       ranges = <0x00000800 0 0x80000000 0x80000000 0 0x00020000   /* configuration space */
-                               0x81000000 0 0   0x80020000 0 0x00010000   /* downstream I/O */
+                       ranges = <0x81000000 0 0         0x80020000 0 0x00010000   /* downstream I/O */
                                0x82000000 0 0x80030000 0xc0030000 0 0x0ffd0000>; /* non-prefetchable memory */
                        status = "disabled";
                };
 
                pcie1: pcie@b1800000 {
                        compatible = "st,spear1340-pcie", "snps,dw-pcie";
-                       reg = <0xb1800000 0x4000>;
+                       reg = <0xb1800000 0x4000>, <0x90000000 0x20000>;
+                       reg-names = "dbi", "config";
                        interrupts = <0 69 0x4>;
                        interrupt-map-mask = <0 0 0 0>;
                        interrupt-map = <0x0 0 &gic 0 69 0x4>;
                        #address-cells = <3>;
                        #size-cells = <2>;
                        device_type = "pci";
-                       ranges = <0x00000800 0 0x90000000 0x90000000 0 0x00020000   /* configuration space */
-                               0x81000000 0 0  0x90020000 0 0x00010000   /* downstream I/O */
+                       ranges = <0x81000000 0 0  0x90020000 0 0x00010000   /* downstream I/O */
                                0x82000000 0 0x90030000 0x90030000 0 0x0ffd0000>; /* non-prefetchable memory */
                        status = "disabled";
                };
 
                pcie2: pcie@b4000000 {
                        compatible = "st,spear1340-pcie", "snps,dw-pcie";
-                       reg = <0xb4000000 0x4000>;
+                       reg = <0xb4000000 0x4000>, <0xc0000000 0x20000>;
+                       reg-names = "dbi", "config";
                        interrupts = <0 70 0x4>;
                        interrupt-map-mask = <0 0 0 0>;
                        interrupt-map = <0x0 0 &gic 0 70 0x4>;
                        #address-cells = <3>;
                        #size-cells = <2>;
                        device_type = "pci";
-                       ranges = <0x00000800 0 0xc0000000 0xc0000000 0 0x00020000   /* configuration space */
-                               0x81000000 0 0   0xc0020000 0 0x00010000   /* downstream I/O */
+                       ranges = <0x81000000 0 0         0xc0020000 0 0x00010000   /* downstream I/O */
                                0x82000000 0 0xc0030000 0xc0030000 0 0x0ffd0000>; /* non-prefetchable memory */
                        status = "disabled";
                };
index e71df0f2cb52d579bcfef4d114cba5d6e5acddfb..13e1aa33daa2e379bde1b3cbc2882b1816ba3a39 100644 (file)
@@ -50,7 +50,8 @@
 
                pcie0: pcie@b1000000 {
                        compatible = "st,spear1340-pcie", "snps,dw-pcie";
-                       reg = <0xb1000000 0x4000>;
+                       reg = <0xb1000000 0x4000>, <0x80000000 0x20000>;
+                       reg-names = "dbi", "config";
                        interrupts = <0 68 0x4>;
                        interrupt-map-mask = <0 0 0 0>;
                        interrupt-map = <0x0 0 &gic 0 68 0x4>;
@@ -60,8 +61,7 @@
                        #address-cells = <3>;
                        #size-cells = <2>;
                        device_type = "pci";
-                       ranges = <0x00000800 0 0x80000000 0x80000000 0 0x00020000   /* configuration space */
-                               0x81000000 0 0   0x80020000 0 0x00010000   /* downstream I/O */
+                       ranges = <0x81000000 0 0         0x80020000 0 0x00010000   /* downstream I/O */
                                0x82000000 0 0x80030000 0xc0030000 0 0x0ffd0000>; /* non-prefetchable memory */
                        status = "disabled";
                };
index 6dea9e43a75c1dcc866c2836f3b64cae282c0944..85f594e1708fbc9191864273cc7f093217f7e463 100644 (file)
@@ -340,7 +340,7 @@ static int __init spear13xx_pcie_probe(struct platform_device *pdev)
 
        pp->dev = dev;
 
-       dbi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       dbi_base = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dbi");
        pp->dbi_base = devm_ioremap_resource(dev, dbi_base);
        if (IS_ERR(pp->dbi_base)) {
                dev_err(dev, "couldn't remap dbi base %p\n", dbi_base);
This page took 0.048801 seconds and 5 git commands to generate.