|
|
@@ -1,15 +1,16 @@
|
|
|
-From patchwork Fri Aug 9 16:03:32 2013
|
|
|
+From patchwork Fri Aug 23 12:03:20 2013
|
|
|
Content-Type: text/plain; charset="utf-8"
|
|
|
MIME-Version: 1.0
|
|
|
Content-Transfer-Encoding: 7bit
|
|
|
-Subject: MIPS: add driver for the built-in PCI controller of the RT3883 SoC
|
|
|
+Subject: [v3] MIPS: add driver for the built-in PCI controller of the RT3883
|
|
|
+ SoC
|
|
|
From: Gabor Juhos <[email protected]>
|
|
|
-X-Patchwork-Id: 5687
|
|
|
-Message-Id: <1376064212-28415[email protected]>
|
|
|
+X-Patchwork-Id: 5758
|
|
|
+Message-Id: <1377259400-21211[email protected]>
|
|
|
To: Ralf Baechle <[email protected]>
|
|
|
-Cc: [email protected], John Crispin <blogic@openwrt.org>,
|
|
|
- Gabor Juhos <[email protected]>, [email protected]
|
|
|
-Date: Fri, 9 Aug 2013 18:03:32 +0200
|
|
|
+Cc: [email protected], Gabor Juhos <juhosg@openwrt.org>,
|
|
|
+ [email protected]
|
|
|
+Date: Fri, 23 Aug 2013 14:03:20 +0200
|
|
|
|
|
|
The Ralink RT3883 SoCs have a built-in PCI Host Controller
|
|
|
device. The patch adds a platform driver and device tree
|
|
|
@@ -23,17 +24,32 @@ Signed-off-by: Gabor Juhos <[email protected]>
|
|
|
Acked-by: John Crispin <[email protected]>
|
|
|
|
|
|
---
|
|
|
-.../devicetree/bindings/pci/ralink,rt3883-pci.txt | 169 ++++++
|
|
|
+Changes since v2:
|
|
|
+ - fix compiler warning:
|
|
|
+
|
|
|
+ CC arch/mips/pci/pci-rt3883.o
|
|
|
+ arch/mips/pci/pci-rt3883.c: In function 'rt3883_pci_probe':
|
|
|
+ arch/mips/pci/pci-rt3883.c:458:4: warning: use of 'h' length modifier with 'a' type character [-Wformat]
|
|
|
+
|
|
|
+Changes since v1:
|
|
|
+ - change the 'status' property to optional in the binding doc
|
|
|
+ - add board specific example to the binding doc
|
|
|
+
|
|
|
+rt3883-pci: fix-build-warning
|
|
|
+
|
|
|
+Signed-off-by: Gabor Juhos <[email protected]>
|
|
|
+---
|
|
|
+ .../devicetree/bindings/pci/ralink,rt3883-pci.txt | 190 ++++++
|
|
|
arch/mips/pci/Makefile | 1 +
|
|
|
arch/mips/pci/pci-rt3883.c | 636 ++++++++++++++++++++
|
|
|
arch/mips/ralink/Kconfig | 1 +
|
|
|
- 4 files changed, 807 insertions(+)
|
|
|
+ 4 files changed, 828 insertions(+)
|
|
|
create mode 100644 Documentation/devicetree/bindings/pci/ralink,rt3883-pci.txt
|
|
|
create mode 100644 arch/mips/pci/pci-rt3883.c
|
|
|
|
|
|
--- /dev/null
|
|
|
+++ b/Documentation/devicetree/bindings/pci/ralink,rt3883-pci.txt
|
|
|
-@@ -0,0 +1,169 @@
|
|
|
+@@ -0,0 +1,190 @@
|
|
|
+* Mediatek/Ralink RT3883 PCI controller
|
|
|
+
|
|
|
+1) Main node
|
|
|
@@ -54,7 +70,10 @@ Acked-by: John Crispin <[email protected]>
|
|
|
+ - ranges: specifies the translation between child address space and parent
|
|
|
+ address space
|
|
|
+
|
|
|
-+ - status: either "disabled" or "okay"
|
|
|
++ Optional properties:
|
|
|
++
|
|
|
++ - status: indicates the operational status of the device.
|
|
|
++ Value must be either "disabled" or "okay".
|
|
|
+
|
|
|
+2) Child nodes
|
|
|
+
|
|
|
@@ -113,8 +132,6 @@ Acked-by: John Crispin <[email protected]>
|
|
|
+
|
|
|
+ - device_type: must be "pci"
|
|
|
+
|
|
|
-+ - status: either "disabled" or "okay"
|
|
|
-+
|
|
|
+ If a given sub-node represents a PCI bridge it must have following
|
|
|
+ mandatory properties as well:
|
|
|
+
|
|
|
@@ -128,8 +145,16 @@ Acked-by: John Crispin <[email protected]>
|
|
|
+ - interrupt-map: standard PCI properties to define the mapping of the
|
|
|
+ PCI interface to interrupt numbers.
|
|
|
+
|
|
|
++ Besides the required properties the sub-nodes may have these optional
|
|
|
++ properties:
|
|
|
++
|
|
|
++ - status: indicates the operational status of the sub-node.
|
|
|
++ Value must be either "disabled" or "okay".
|
|
|
++
|
|
|
+3) Example:
|
|
|
+
|
|
|
++ a) SoC specific dtsi file:
|
|
|
++
|
|
|
+ pci@10140000 {
|
|
|
+ compatible = "ralink,rt3883-pci";
|
|
|
+ reg = <0x10140000 0x20000>;
|
|
|
@@ -203,6 +228,18 @@ Acked-by: John Crispin <[email protected]>
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
++
|
|
|
++ b) Board specific dts file:
|
|
|
++
|
|
|
++ pci@10140000 {
|
|
|
++ status = "okay";
|
|
|
++
|
|
|
++ host-bridge {
|
|
|
++ pci-bridge@1 {
|
|
|
++ status = "okay";
|
|
|
++ };
|
|
|
++ };
|
|
|
++ };
|
|
|
--- a/arch/mips/pci/Makefile
|
|
|
+++ b/arch/mips/pci/Makefile
|
|
|
@@ -41,6 +41,7 @@ obj-$(CONFIG_SIBYTE_BCM1x80) += pci-bcm1
|
|
|
@@ -671,7 +708,7 @@ Acked-by: John Crispin <[email protected]>
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!rpc->intc_of_node) {
|
|
|
-+ dev_err(dev, "% has no %s child node",
|
|
|
++ dev_err(dev, "%s has no %s child node",
|
|
|
+ of_node_full_name(rpc->intc_of_node),
|
|
|
+ "interrupt controller");
|
|
|
+ return -EINVAL;
|