Use named resources instead of annotating the register with comments.
Signed-off-by: Mathias Kresin <dev@kresin.me>
bus-range = <0x0 0x0>;
ranges = <0x2000000 0 0x8000000 0x8000000 0 0x2000000 /* pci memory */
0x1000000 0 0x00000000 0xae00000 0 0x200000>; /* io space */
- reg = <0x7000000 0x8000 /* config space */
- 0xe105400 0x400>; /* pci bridge */
+
+ reg = <0x7000000 0x8000>, <0xe105400 0x400>;
+ reg-names = "config", "ctrl";
+
lantiq,bus-clock = <33333333>;
interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
interrupt-map = <0x7000 0 0 1 &icu0 30 1>;
bus-range = <0x0 0x0>;
ranges = <0x2000000 0 0x8000000 0x8000000 0 0x2000000 /* pci memory */
0x1000000 0 0x00000000 0xae00000 0 0x200000>; /* io space */
- reg = <0x7000000 0x8000 /* config space */
- 0xe105400 0x400>; /* pci bridge */
+
+ reg = <0x7000000 0x8000>, <0xe105400 0x400>;
+ reg-names = "config", "ctrl";
+
lantiq,bus-clock = <33333333>;
interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
interrupt-map = <0x7000 0 0 1 &icu0 30 1>; /* slot 14, irq 30 */
bus-range = <0x0 0x0>;
ranges = <0x2000000 0 0x8000000 0x8000000 0 0x2000000 /* pci memory */
0x1000000 0 0x00000000 0xae00000 0 0x200000>; /* io space */
- reg = <0x7000000 0x8000 /* config space */
- 0xe105400 0x400>; /* pci bridge */
+
+ reg = <0x7000000 0x8000>, <0xe105400 0x400>;
+ reg-names = "config", "ctrl";
+
lantiq,bus-clock = <33333333>;
interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
interrupt-map = <0x7000 0 0 1 &icu0 30 1>; /* slot 14, irq 30 */
--- /dev/null
+From 605bb59aa560c48d7845aa9cc4ff976a4339560b Mon Sep 17 00:00:00 2001
+From: Mathias Kresin <dev@kresin.me>
+Date: Sun, 27 Jan 2019 11:32:35 +0100
+Subject: [PATCH 5/6] MIPS: lantiq: pci: use named resources
+
+Use named resources instead of annotating the register with comments.
+
+Signed-off-by: Mathias Kresin <dev@kresin.me>
+---
+ arch/mips/boot/dts/lantiq/danube.dtsi | 5 +++--
+ arch/mips/pci/pci-lantiq.c | 4 ++--
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c
+index 187ef82c4154..7061662c3f17 100644
+--- a/arch/mips/pci/pci-lantiq.c
++++ b/arch/mips/pci/pci-lantiq.c
+@@ -215,12 +215,12 @@ static int ltq_pci_probe(struct platform_device *pdev)
+
+ pci_clear_flags(PCI_PROBE_ONLY);
+
+- res_bridge = platform_get_resource(pdev, IORESOURCE_MEM, 1);
++ res_bridge = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl");
+ ltq_pci_membase = devm_ioremap_resource(&pdev->dev, res_bridge);
+ if (IS_ERR(ltq_pci_membase))
+ return PTR_ERR(ltq_pci_membase);
+
+- res_cfg = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ res_cfg = platform_get_resource_byname(pdev, IORESOURCE_MEM, "config");
+ ltq_pci_mapped_cfg = devm_ioremap_resource(&pdev->dev, res_cfg);
+ if (IS_ERR(ltq_pci_mapped_cfg))
+ return PTR_ERR(ltq_pci_mapped_cfg);
+--
+2.17.1
+
--- /dev/null
+From 605bb59aa560c48d7845aa9cc4ff976a4339560b Mon Sep 17 00:00:00 2001
+From: Mathias Kresin <dev@kresin.me>
+Date: Sun, 27 Jan 2019 11:32:35 +0100
+Subject: [PATCH 5/6] MIPS: lantiq: pci: use named resources
+
+Use named resources instead of annotating the register with comments.
+
+Signed-off-by: Mathias Kresin <dev@kresin.me>
+---
+ arch/mips/boot/dts/lantiq/danube.dtsi | 5 +++--
+ arch/mips/pci/pci-lantiq.c | 4 ++--
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c
+index 187ef82c4154..7061662c3f17 100644
+--- a/arch/mips/pci/pci-lantiq.c
++++ b/arch/mips/pci/pci-lantiq.c
+@@ -215,12 +215,12 @@ static int ltq_pci_probe(struct platform_device *pdev)
+
+ pci_clear_flags(PCI_PROBE_ONLY);
+
+- res_bridge = platform_get_resource(pdev, IORESOURCE_MEM, 1);
++ res_bridge = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl");
+ ltq_pci_membase = devm_ioremap_resource(&pdev->dev, res_bridge);
+ if (IS_ERR(ltq_pci_membase))
+ return PTR_ERR(ltq_pci_membase);
+
+- res_cfg = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ res_cfg = platform_get_resource_byname(pdev, IORESOURCE_MEM, "config");
+ ltq_pci_mapped_cfg = devm_ioremap_resource(&pdev->dev, res_cfg);
+ if (IS_ERR(ltq_pci_mapped_cfg))
+ return PTR_ERR(ltq_pci_mapped_cfg);
+--
+2.17.1
+