[PATCH] schemas: pci-bus: make reg optional for Marvell PCI controllers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Marvell devices have PCE endpoints, but no PCI controller. The driver
provides an emulated PCI controller. As such, it does not have a reg
property.

Signed-off-by: Andrew Lunn <andrew@xxxxxxx>
---

I've not posted the conversion of the Marvell PCI driver from .txt to
.yaml yet. When i do, i will need something like this.

dtschema/schemas/pci/pci-bus.yaml | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/dtschema/schemas/pci/pci-bus.yaml b/dtschema/schemas/pci/pci-bus.yaml
index 31bc1b9..0481bf6 100644
--- a/dtschema/schemas/pci/pci-bus.yaml
+++ b/dtschema/schemas/pci/pci-bus.yaml
@@ -178,10 +178,23 @@ patternProperties:
 required:
   - device_type
   - ranges
-  - reg
   - "#address-cells"
   - "#size-cells"
 
+if:
+  not:
+    properties:
+      compatible:
+        contains:
+          enum:
+            - marvell,armada-370-pcie
+            - marvell,armada-xp-pcie
+            - marvell,dove-pcie
+            - marvell,kirkwood-pcie
+then:
+  required:
+    - reg
+
 dependentRequired:
   msi-map-mask: [ msi-map ]
 
-- 
2.37.2




[Index of Archives]     [Device Tree]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Photos]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]

  Powered by Linux