Skip to content

Commit 65aaae2

Browse files
Pratyush Anandbjorn-helgaas
authored andcommitted
PCI: spear: Pass config resource through reg property
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>
1 parent 52addcf commit 65aaae2

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

‎arch/arm/boot/dts/spear1310.dtsi‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@
8585

8686
pcie0: pcie@b1000000 {
8787
compatible = "st,spear1340-pcie", "snps,dw-pcie";
88-
reg = <0xb1000000 0x4000>;
88+
reg = <0xb1000000 0x4000>, <0x80000000 0x20000>;
89+
reg-names = "dbi", "config";
8990
interrupts = <0 68 0x4>;
9091
interrupt-map-mask = <0 0 0 0>;
9192
interrupt-map = <0x0 0 &gic 0 68 0x4>;
@@ -95,15 +96,15 @@
9596
#address-cells = <3>;
9697
#size-cells = <2>;
9798
device_type = "pci";
98-
ranges = <0x00000800 0 0x80000000 0x80000000 0 0x00020000 /* configuration space */
99-
0x81000000 0 0 0x80020000 0 0x00010000 /* downstream I/O */
99+
ranges = <0x81000000 0 0 0x80020000 0 0x00010000 /* downstream I/O */
100100
0x82000000 0 0x80030000 0xc0030000 0 0x0ffd0000>; /* non-prefetchable memory */
101101
status = "disabled";
102102
};
103103

104104
pcie1: pcie@b1800000 {
105105
compatible = "st,spear1340-pcie", "snps,dw-pcie";
106-
reg = <0xb1800000 0x4000>;
106+
reg = <0xb1800000 0x4000>, <0x90000000 0x20000>;
107+
reg-names = "dbi", "config";
107108
interrupts = <0 69 0x4>;
108109
interrupt-map-mask = <0 0 0 0>;
109110
interrupt-map = <0x0 0 &gic 0 69 0x4>;
@@ -113,15 +114,15 @@
113114
#address-cells = <3>;
114115
#size-cells = <2>;
115116
device_type = "pci";
116-
ranges = <0x00000800 0 0x90000000 0x90000000 0 0x00020000 /* configuration space */
117-
0x81000000 0 0 0x90020000 0 0x00010000 /* downstream I/O */
117+
ranges = <0x81000000 0 0 0x90020000 0 0x00010000 /* downstream I/O */
118118
0x82000000 0 0x90030000 0x90030000 0 0x0ffd0000>; /* non-prefetchable memory */
119119
status = "disabled";
120120
};
121121

122122
pcie2: pcie@b4000000 {
123123
compatible = "st,spear1340-pcie", "snps,dw-pcie";
124-
reg = <0xb4000000 0x4000>;
124+
reg = <0xb4000000 0x4000>, <0xc0000000 0x20000>;
125+
reg-names = "dbi", "config";
125126
interrupts = <0 70 0x4>;
126127
interrupt-map-mask = <0 0 0 0>;
127128
interrupt-map = <0x0 0 &gic 0 70 0x4>;
@@ -131,8 +132,7 @@
131132
#address-cells = <3>;
132133
#size-cells = <2>;
133134
device_type = "pci";
134-
ranges = <0x00000800 0 0xc0000000 0xc0000000 0 0x00020000 /* configuration space */
135-
0x81000000 0 0 0xc0020000 0 0x00010000 /* downstream I/O */
135+
ranges = <0x81000000 0 0 0xc0020000 0 0x00010000 /* downstream I/O */
136136
0x82000000 0 0xc0030000 0xc0030000 0 0x0ffd0000>; /* non-prefetchable memory */
137137
status = "disabled";
138138
};

‎arch/arm/boot/dts/spear1340.dtsi‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050

5151
pcie0: pcie@b1000000 {
5252
compatible = "st,spear1340-pcie", "snps,dw-pcie";
53-
reg = <0xb1000000 0x4000>;
53+
reg = <0xb1000000 0x4000>, <0x80000000 0x20000>;
54+
reg-names = "dbi", "config";
5455
interrupts = <0 68 0x4>;
5556
interrupt-map-mask = <0 0 0 0>;
5657
interrupt-map = <0x0 0 &gic 0 68 0x4>;
@@ -60,8 +61,7 @@
6061
#address-cells = <3>;
6162
#size-cells = <2>;
6263
device_type = "pci";
63-
ranges = <0x00000800 0 0x80000000 0x80000000 0 0x00020000 /* configuration space */
64-
0x81000000 0 0 0x80020000 0 0x00010000 /* downstream I/O */
64+
ranges = <0x81000000 0 0 0x80020000 0 0x00010000 /* downstream I/O */
6565
0x82000000 0 0x80030000 0xc0030000 0 0x0ffd0000>; /* non-prefetchable memory */
6666
status = "disabled";
6767
};

‎drivers/pci/host/pcie-spear13xx.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ static int __init spear13xx_pcie_probe(struct platform_device *pdev)
340340

341341
pp->dev = dev;
342342

343-
dbi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
343+
dbi_base = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dbi");
344344
pp->dbi_base = devm_ioremap_resource(dev, dbi_base);
345345
if (IS_ERR(pp->dbi_base)) {
346346
dev_err(dev, "couldn't remap dbi base %p\n", dbi_base);

0 commit comments

Comments
 (0)