Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+170 -11
+135
Documentation/devicetree/bindings/interrupt-controller/msi.txt
··· 1 + This document describes the generic device tree binding for MSI controllers and 2 + their master(s). 3 + 4 + Message Signaled Interrupts (MSIs) are a class of interrupts generated by a 5 + write to an MMIO address. 6 + 7 + MSIs were originally specified by PCI (and are used with PCIe), but may also be 8 + used with other busses, and hence a mechanism is required to relate devices on 9 + those busses to the MSI controllers which they are capable of using, 10 + potentially including additional information. 11 + 12 + MSIs 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 + 31 + MSI controllers: 32 + ================ 33 + 34 + An MSI controller signals interrupts to a CPU when a write is made to an MMIO 35 + address by some master. An MSI controller may feature a number of doorbells. 36 + 37 + Required properties: 38 + -------------------- 39 + 40 + - msi-controller: Identifies the node as an MSI controller. 41 + 42 + Optional 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 + 54 + MSI clients 55 + =========== 56 + 57 + MSI clients are devices which generate MSIs. For each MSI they wish to 58 + generate, the doorbell and payload may be configured, though sideband 59 + information may not be configurable. 60 + 61 + Required 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 + 78 + Example 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 + };
+3
Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
··· 11 11 12 12 Optional properties: 13 13 14 + - dmas: dma data channel, see dma.txt binding doc 14 15 - marvell,nand-enable-arbiter: Set to enable the bus arbiter 15 16 - marvell,nand-keep-config: Set to keep the NAND controller config as set 16 17 by the bootloader ··· 33 32 compatible = "marvell,pxa3xx-nand"; 34 33 reg = <0x43100000 90>; 35 34 interrupts = <45>; 35 + dmas = <&pdma 97 0>; 36 + dma-names = "data"; 36 37 #address-cells = <1>; 37 38 38 39 marvell,nand-enable-arbiter;
+5 -1
Documentation/devicetree/bindings/net/cpsw.txt
··· 2 2 ------------------------------------------------------ 3 3 4 4 Required 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 10 - reg : physical base address and size of the cpsw 7 11 registers map 8 12 - interrupts : property with a value describing the interrupt
+2
Documentation/devicetree/bindings/vendor-prefixes.txt
··· 113 113 intercontrol Inter Control Group 114 114 isee ISEE 2007 S.L. 115 115 isil Intersil 116 + jedec JEDEC Solid State Technology Association 116 117 karo Ka-Ro electronics GmbH 117 118 keymile Keymile GmbH 118 119 kinetic Kinetic Technologies ··· 185 184 schindler Schindler 186 185 seagate Seagate Technology PLC 187 186 semtech Semtech Corporation 187 + sharp Sharp Corporation 188 188 sil Silicon Image 189 189 silabs Silicon Laboratories 190 190 siliconmitus Silicon Mitus, Inc.
+2 -1
MAINTAINERS
··· 7573 7573 F: drivers/i2c/busses/i2c-ocores.c 7574 7574 7575 7575 OPEN FIRMWARE AND FLATTENED DEVICE TREE 7576 - M: Grant Likely <grant.likely@linaro.org> 7577 7576 M: Rob Herring <robh+dt@kernel.org> 7577 + M: Frank Rowand <frowand.list@gmail.com> 7578 + M: Grant Likely <grant.likely@linaro.org> 7578 7579 L: devicetree@vger.kernel.org 7579 7580 W: http://www.devicetree.org/ 7580 7581 T: git git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux.git
+2 -6
drivers/base/platform.c
··· 375 375 376 376 while (--i >= 0) { 377 377 struct resource *r = &pdev->resource[i]; 378 - unsigned long type = resource_type(r); 379 - 380 - if (type == IORESOURCE_MEM || type == IORESOURCE_IO) 378 + if (r->parent) 381 379 release_resource(r); 382 380 } 383 381 ··· 406 408 407 409 for (i = 0; i < pdev->num_resources; i++) { 408 410 struct resource *r = &pdev->resource[i]; 409 - unsigned long type = resource_type(r); 410 - 411 - if (type == IORESOURCE_MEM || type == IORESOURCE_IO) 411 + if (r->parent) 412 412 release_resource(r); 413 413 } 414 414 }
+3 -3
drivers/of/address.c
··· 845 845 struct resource res; 846 846 847 847 while (dn) { 848 - if (of_address_to_resource(dn, 0, &res)) 849 - continue; 850 - if (res.start == base_address) 848 + if (!of_address_to_resource(dn, 0, &res) && 849 + res.start == base_address) 851 850 return dn; 851 + 852 852 dn = of_find_matching_node(dn, matches); 853 853 } 854 854
+9
drivers/of/platform.c
··· 457 457 } 458 458 EXPORT_SYMBOL_GPL(of_platform_populate); 459 459 460 + int 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 + } 467 + EXPORT_SYMBOL_GPL(of_platform_default_populate); 468 + 460 469 static int of_platform_device_destroy(struct device *dev, void *data) 461 470 { 462 471 /* Do not touch devices not populated from the device tree */
+9
include/linux/of_platform.h
··· 72 72 const struct of_device_id *matches, 73 73 const struct of_dev_auxdata *lookup, 74 74 struct device *parent); 75 + extern int of_platform_default_populate(struct device_node *root, 76 + const struct of_dev_auxdata *lookup, 77 + struct device *parent); 75 78 extern void of_platform_depopulate(struct device *parent); 76 79 #else 77 80 static inline int of_platform_populate(struct device_node *root, 78 81 const struct of_device_id *matches, 79 82 const struct of_dev_auxdata *lookup, 80 83 struct device *parent) 84 + { 85 + return -ENODEV; 86 + } 87 + static inline int of_platform_default_populate(struct device_node *root, 88 + const struct of_dev_auxdata *lookup, 89 + struct device *parent) 81 90 { 82 91 return -ENODEV; 83 92 }