aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-09-01 22:37:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-01 22:37:56 -0400
commitf1a3c0b933e7ff856223d6fcd7456d403e54e4e5 (patch)
tree248904252b10d6685b5a81f2ba4dc5cf35dcec38
parent089b669506ef28fae2c24a0ec21e06c02a38556b (diff)
parentc8fb70a3e8dd60e31c4422bae85783cf1733f038 (diff)
Merge tag 'devicetree-for-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull devicetree updates from Rob Herring: - added Frank Rowand as DT maintainer in preparation for Grant's retirement. - generic MSI binding documentation and a few other minor doc updates - fix long standing issue with DT platorm device unregistration - fix loop forever bug in of_find_matching_node_by_address() * tag 'devicetree-for-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: MAINTAINERS: Add Frank Rowand as DT maintainer mtd: nand: pxa3xx: add optional dma for pxa architecture Documentation: DT: cpsw: document missing compatible Docs: dt: add generic MSI bindings drivercore: Fix unregistration path of platform devices of/address: Don't loop forever in of_find_matching_node_by_address(). of: Add vendor prefix for JEDEC Solid State Technology Association of/platform: add function to populate default bus of: Add vendor prefix for Sharp Corporation
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/msi.txt135
-rw-r--r--Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt3
-rw-r--r--Documentation/devicetree/bindings/net/cpsw.txt6
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.txt2
-rw-r--r--MAINTAINERS3
-rw-r--r--drivers/base/platform.c8
-rw-r--r--drivers/of/address.c6
-rw-r--r--drivers/of/platform.c9
-rw-r--r--include/linux/of_platform.h9
9 files changed, 170 insertions, 11 deletions
diff --git a/Documentation/devicetree/bindings/interrupt-controller/msi.txt b/Documentation/devicetree/bindings/interrupt-controller/msi.txt
new file mode 100644
index 000000000000..c60c034dcf19
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/msi.txt
@@ -0,0 +1,135 @@
1This document describes the generic device tree binding for MSI controllers and
2their master(s).
3
4Message Signaled Interrupts (MSIs) are a class of interrupts generated by a
5write to an MMIO address.
6
7MSIs were originally specified by PCI (and are used with PCIe), but may also be
8used with other busses, and hence a mechanism is required to relate devices on
9those busses to the MSI controllers which they are capable of using,
10potentially including additional information.
11
12MSIs are distinguished by some combination of:
13
14- The doorbell (the MMIO address written to).
15
16 Devices may be configured by software to write to arbitrary doorbells which
17 they can address. An MSI controller may feature a number of doorbells.
18
19- The payload (the value written to the doorbell).
20
21 Devices may be configured to write an arbitrary payload chosen by software.
22 MSI controllers may have restrictions on permitted payloads.
23
24- Sideband information accompanying the write.
25
26 Typically this is neither configurable nor probeable, and depends on the path
27 taken through the memory system (i.e. it is a property of the combination of
28 MSI controller and device rather than a property of either in isolation).
29
30
31MSI controllers:
32================
33
34An MSI controller signals interrupts to a CPU when a write is made to an MMIO
35address by some master. An MSI controller may feature a number of doorbells.
36
37Required properties:
38--------------------
39
40- msi-controller: Identifies the node as an MSI controller.
41
42Optional properties:
43--------------------
44
45- #msi-cells: The number of cells in an msi-specifier, required if not zero.
46
47 Typically this will encode information related to sideband data, and will
48 not encode doorbells or payloads as these can be configured dynamically.
49
50 The meaning of the msi-specifier is defined by the device tree binding of
51 the specific MSI controller.
52
53
54MSI clients
55===========
56
57MSI clients are devices which generate MSIs. For each MSI they wish to
58generate, the doorbell and payload may be configured, though sideband
59information may not be configurable.
60
61Required properties:
62--------------------
63
64- msi-parent: A list of phandle + msi-specifier pairs, one for each MSI
65 controller which the device is capable of using.
66
67 This property is unordered, and MSIs may be allocated from any combination of
68 MSI controllers listed in the msi-parent property.
69
70 If a device has restrictions on the allocation of MSIs, these restrictions
71 must be described with additional properties.
72
73 When #msi-cells is non-zero, busses with an msi-parent will require
74 additional properties to describe the relationship between devices on the bus
75 and the set of MSIs they can potentially generate.
76
77
78Example
79=======
80
81/ {
82 #address-cells = <1>;
83 #size-cells = <1>;
84
85 msi_a: msi-controller@a {
86 reg = <0xa 0xf00>;
87 compatible = "vendor-a,some-controller";
88 msi-controller;
89 /* No sideband data, so #msi-cells omitted */
90 };
91
92 msi_b: msi-controller@b {
93 reg = <0xb 0xf00>;
94 compatible = "vendor-b,another-controller";
95 msi-controller;
96 /* Each device has some unique ID */
97 #msi-cells = <1>;
98 };
99
100 msi_c: msi-controller@c {
101 reg = <0xb 0xf00>;
102 compatible = "vendor-b,another-controller";
103 msi-controller;
104 /* Each device has some unique ID */
105 #msi-cells = <1>;
106 };
107
108 dev@0 {
109 reg = <0x0 0xf00>;
110 compatible = "vendor-c,some-device";
111
112 /* Can only generate MSIs to msi_a */
113 msi-parent = <&msi_a>;
114 };
115
116 dev@1 {
117 reg = <0x1 0xf00>;
118 compatible = "vendor-c,some-device";
119
120 /*
121 * Can generate MSIs to either A or B.
122 */
123 msi-parent = <&msi_a>, <&msi_b 0x17>;
124 };
125
126 dev@2 {
127 reg = <0x2 0xf00>;
128 compatible = "vendor-c,some-device";
129 /*
130 * Has different IDs at each MSI controller.
131 * Can generate MSIs to all of the MSI controllers.
132 */
133 msi-parent = <&msi_a>, <&msi_b 0x17>, <&msi_c 0x53>;
134 };
135};
diff --git a/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt b/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
index 4f833e3c4f51..d9b655f11048 100644
--- a/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
@@ -11,6 +11,7 @@ Required properties:
11 11
12Optional properties: 12Optional properties:
13 13
14 - dmas: dma data channel, see dma.txt binding doc
14 - marvell,nand-enable-arbiter: Set to enable the bus arbiter 15 - marvell,nand-enable-arbiter: Set to enable the bus arbiter
15 - marvell,nand-keep-config: Set to keep the NAND controller config as set 16 - marvell,nand-keep-config: Set to keep the NAND controller config as set
16 by the bootloader 17 by the bootloader
@@ -32,6 +33,8 @@ Example:
32 compatible = "marvell,pxa3xx-nand"; 33 compatible = "marvell,pxa3xx-nand";
33 reg = <0x43100000 90>; 34 reg = <0x43100000 90>;
34 interrupts = <45>; 35 interrupts = <45>;
36 dmas = <&pdma 97 0>;
37 dma-names = "data";
35 #address-cells = <1>; 38 #address-cells = <1>;
36 39
37 marvell,nand-enable-arbiter; 40 marvell,nand-enable-arbiter;
diff --git a/Documentation/devicetree/bindings/net/cpsw.txt b/Documentation/devicetree/bindings/net/cpsw.txt
index 33fe8462edf4..a9df21aaa154 100644
--- a/Documentation/devicetree/bindings/net/cpsw.txt
+++ b/Documentation/devicetree/bindings/net/cpsw.txt
@@ -2,7 +2,11 @@ TI SoC Ethernet Switch Controller Device Tree Bindings
2------------------------------------------------------ 2------------------------------------------------------
3 3
4Required properties: 4Required properties:
5- compatible : Should be "ti,cpsw" 5- compatible : Should be one of the below:-
6 "ti,cpsw" for backward compatible
7 "ti,am335x-cpsw" for AM335x controllers
8 "ti,am4372-cpsw" for AM437x controllers
9 "ti,dra7-cpsw" for DRA7x controllers
6- reg : physical base address and size of the cpsw 10- reg : physical base address and size of the cpsw
7 registers map 11 registers map
8- interrupts : property with a value describing the interrupt 12- interrupts : property with a value describing the interrupt
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index d3fbd1f30eb4..56a6d4e79383 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -113,6 +113,7 @@ intel Intel Corporation
113intercontrol Inter Control Group 113intercontrol Inter Control Group
114isee ISEE 2007 S.L. 114isee ISEE 2007 S.L.
115isil Intersil 115isil Intersil
116jedec JEDEC Solid State Technology Association
116karo Ka-Ro electronics GmbH 117karo Ka-Ro electronics GmbH
117keymile Keymile GmbH 118keymile Keymile GmbH
118kinetic Kinetic Technologies 119kinetic Kinetic Technologies
@@ -184,6 +185,7 @@ sbs Smart Battery System
184schindler Schindler 185schindler Schindler
185seagate Seagate Technology PLC 186seagate Seagate Technology PLC
186semtech Semtech Corporation 187semtech Semtech Corporation
188sharp Sharp Corporation
187sil Silicon Image 189sil Silicon Image
188silabs Silicon Laboratories 190silabs Silicon Laboratories
189siliconmitus Silicon Mitus, Inc. 191siliconmitus Silicon Mitus, Inc.
diff --git a/MAINTAINERS b/MAINTAINERS
index 532bd5dfcc45..6eee6dbf15a4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7573,8 +7573,9 @@ F: Documentation/i2c/busses/i2c-ocores
7573F: drivers/i2c/busses/i2c-ocores.c 7573F: drivers/i2c/busses/i2c-ocores.c
7574 7574
7575OPEN FIRMWARE AND FLATTENED DEVICE TREE 7575OPEN FIRMWARE AND FLATTENED DEVICE TREE
7576M: Grant Likely <grant.likely@linaro.org>
7577M: Rob Herring <robh+dt@kernel.org> 7576M: Rob Herring <robh+dt@kernel.org>
7577M: Frank Rowand <frowand.list@gmail.com>
7578M: Grant Likely <grant.likely@linaro.org>
7578L: devicetree@vger.kernel.org 7579L: devicetree@vger.kernel.org
7579W: http://www.devicetree.org/ 7580W: http://www.devicetree.org/
7580T: git git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux.git 7581T: git git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux.git
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 063f0ab15259..f80aaaf9f610 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -375,9 +375,7 @@ int platform_device_add(struct platform_device *pdev)
375 375
376 while (--i >= 0) { 376 while (--i >= 0) {
377 struct resource *r = &pdev->resource[i]; 377 struct resource *r = &pdev->resource[i];
378 unsigned long type = resource_type(r); 378 if (r->parent)
379
380 if (type == IORESOURCE_MEM || type == IORESOURCE_IO)
381 release_resource(r); 379 release_resource(r);
382 } 380 }
383 381
@@ -408,9 +406,7 @@ void platform_device_del(struct platform_device *pdev)
408 406
409 for (i = 0; i < pdev->num_resources; i++) { 407 for (i = 0; i < pdev->num_resources; i++) {
410 struct resource *r = &pdev->resource[i]; 408 struct resource *r = &pdev->resource[i];
411 unsigned long type = resource_type(r); 409 if (r->parent)
412
413 if (type == IORESOURCE_MEM || type == IORESOURCE_IO)
414 release_resource(r); 410 release_resource(r);
415 } 411 }
416 } 412 }
diff --git a/drivers/of/address.c b/drivers/of/address.c
index 8bfda6ade2c0..384574c3987c 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -845,10 +845,10 @@ struct device_node *of_find_matching_node_by_address(struct device_node *from,
845 struct resource res; 845 struct resource res;
846 846
847 while (dn) { 847 while (dn) {
848 if (of_address_to_resource(dn, 0, &res)) 848 if (!of_address_to_resource(dn, 0, &res) &&
849 continue; 849 res.start == base_address)
850 if (res.start == base_address)
851 return dn; 850 return dn;
851
852 dn = of_find_matching_node(dn, matches); 852 dn = of_find_matching_node(dn, matches);
853 } 853 }
854 854
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 8a002d6151f2..1001efaedcb8 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -457,6 +457,15 @@ int of_platform_populate(struct device_node *root,
457} 457}
458EXPORT_SYMBOL_GPL(of_platform_populate); 458EXPORT_SYMBOL_GPL(of_platform_populate);
459 459
460int of_platform_default_populate(struct device_node *root,
461 const struct of_dev_auxdata *lookup,
462 struct device *parent)
463{
464 return of_platform_populate(root, of_default_bus_match_table, lookup,
465 parent);
466}
467EXPORT_SYMBOL_GPL(of_platform_default_populate);
468
460static int of_platform_device_destroy(struct device *dev, void *data) 469static int of_platform_device_destroy(struct device *dev, void *data)
461{ 470{
462 /* Do not touch devices not populated from the device tree */ 471 /* Do not touch devices not populated from the device tree */
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index 611a691145c4..956a1006aefc 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -72,6 +72,9 @@ extern int of_platform_populate(struct device_node *root,
72 const struct of_device_id *matches, 72 const struct of_device_id *matches,
73 const struct of_dev_auxdata *lookup, 73 const struct of_dev_auxdata *lookup,
74 struct device *parent); 74 struct device *parent);
75extern int of_platform_default_populate(struct device_node *root,
76 const struct of_dev_auxdata *lookup,
77 struct device *parent);
75extern void of_platform_depopulate(struct device *parent); 78extern void of_platform_depopulate(struct device *parent);
76#else 79#else
77static inline int of_platform_populate(struct device_node *root, 80static inline int of_platform_populate(struct device_node *root,
@@ -81,6 +84,12 @@ static inline int of_platform_populate(struct device_node *root,
81{ 84{
82 return -ENODEV; 85 return -ENODEV;
83} 86}
87static inline int of_platform_default_populate(struct device_node *root,
88 const struct of_dev_auxdata *lookup,
89 struct device *parent)
90{
91 return -ENODEV;
92}
84static inline void of_platform_depopulate(struct device *parent) { } 93static inline void of_platform_depopulate(struct device *parent) { }
85#endif 94#endif
86 95