aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-01-14 14:13:28 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-14 14:13:28 -0500
commit5339f9d4c2ceccab00b28d65bd5c2b2cd6a3de05 (patch)
tree765564f61fc270c415de903b0dfb1e040c02944a
parentcf8d7e3850ee44dc2f0a69405d731af62528a948 (diff)
parent183223770ae8625df8966ed15811d1b3ee8720aa (diff)
Merge tag 'devicetree-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull DeviceTree updates from Rob Herring: - Rework and export the changeset API to make it available to users other than DT overlays - ARM secure devices binding - OCTEON USB binding - Clean-up of various SRAM binding docs - Various other binding doc updates * tag 'devicetree-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (21 commits) drivers/of: Export OF changeset functions Fix documentation for adp1653 DT ARM: psci: Fix indentation in DT bindings of/platform: export of_default_bus_match_table of/unittest: Show broken behaviour in the platform bus of: fix declaration of of_io_request_and_map of/address: replace printk(KERN_ERR ...) with pr_err(...) of/irq: optimize device node matching loop in of_irq_init() dt-bindings: tda998x: Document the required 'port' node. net/macb: bindings doc: Merge cdns-emac to macb dt-bindings: Misc fix for the ATH79 DDR controllers dt-bindings: Misc fix for the ATH79 MISC interrupt controllers Documentation: dt: Add bindings for Secure-only devices dt-bindings: ARM: add arm,cortex-a72 compatible string ASoC: Atmel: ClassD: add GCK's parent clock in DT binding DT: add Olimex to vendor prefixes Documentation: fsl-quadspi: Add fsl,ls1021-qspi compatible string Documentation/devicetree: document OCTEON USB bindings usb: misc: usb3503: Describe better how to bind clock to the hub dt-bindings: Consolidate SRAM bindings from all vendors ...
-rw-r--r--Documentation/devicetree/bindings/arm/arm,scpi.txt2
-rw-r--r--Documentation/devicetree/bindings/arm/cpus.txt1
-rw-r--r--Documentation/devicetree/bindings/arm/psci.txt25
-rw-r--r--Documentation/devicetree/bindings/arm/secure.txt53
-rw-r--r--Documentation/devicetree/bindings/display/bridge/tda998x.txt4
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt2
-rw-r--r--Documentation/devicetree/bindings/media/i2c/adp1653.txt7
-rw-r--r--Documentation/devicetree/bindings/memory-controllers/ath79-ddr-controller.txt8
-rw-r--r--Documentation/devicetree/bindings/mtd/fsl-quadspi.txt3
-rw-r--r--Documentation/devicetree/bindings/net/cdns-emac.txt20
-rw-r--r--Documentation/devicetree/bindings/net/macb.txt3
-rw-r--r--Documentation/devicetree/bindings/sound/atmel-classd.txt6
-rw-r--r--Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt (renamed from Documentation/devicetree/bindings/arm/rockchip/pmu-sram.txt)0
-rw-r--r--Documentation/devicetree/bindings/sram/rockchip-smp-sram.txt (renamed from Documentation/devicetree/bindings/arm/rockchip/smp-sram.txt)2
-rw-r--r--Documentation/devicetree/bindings/sram/samsung-sram.txt (renamed from Documentation/devicetree/bindings/arm/exynos/smp-sysram.txt)2
-rw-r--r--Documentation/devicetree/bindings/sram/sram.txt (renamed from Documentation/devicetree/bindings/misc/sram.txt)0
-rw-r--r--Documentation/devicetree/bindings/sram/sunxi-sram.txt (renamed from Documentation/devicetree/bindings/soc/sunxi/sram.txt)2
-rw-r--r--Documentation/devicetree/bindings/usb/octeon-usb.txt62
-rw-r--r--Documentation/devicetree/bindings/usb/usb3503.txt5
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.txt1
-rw-r--r--drivers/of/address.c2
-rw-r--r--drivers/of/dynamic.c65
-rw-r--r--drivers/of/irq.c27
-rw-r--r--drivers/of/of_private.h2
-rw-r--r--drivers/of/overlay.c8
-rw-r--r--drivers/of/platform.c1
-rw-r--r--drivers/of/unittest.c18
-rw-r--r--include/linux/of_address.h19
28 files changed, 252 insertions, 98 deletions
diff --git a/Documentation/devicetree/bindings/arm/arm,scpi.txt b/Documentation/devicetree/bindings/arm/arm,scpi.txt
index 86302de67c2c..313dabdc14f9 100644
--- a/Documentation/devicetree/bindings/arm/arm,scpi.txt
+++ b/Documentation/devicetree/bindings/arm/arm,scpi.txt
@@ -63,7 +63,7 @@ Required properties:
63- compatible : should be "arm,juno-sram-ns" for Non-secure SRAM on Juno 63- compatible : should be "arm,juno-sram-ns" for Non-secure SRAM on Juno
64 64
65The rest of the properties should follow the generic mmio-sram description 65The rest of the properties should follow the generic mmio-sram description
66found in ../../misc/sysram.txt 66found in ../../sram/sram.txt
67 67
68Each sub-node represents the reserved area for SCPI. 68Each sub-node represents the reserved area for SCPI.
69 69
diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt
index 6aca64f289b6..c352c11bd641 100644
--- a/Documentation/devicetree/bindings/arm/cpus.txt
+++ b/Documentation/devicetree/bindings/arm/cpus.txt
@@ -157,6 +157,7 @@ nodes to be present and contain the properties described below.
157 "arm,cortex-a17" 157 "arm,cortex-a17"
158 "arm,cortex-a53" 158 "arm,cortex-a53"
159 "arm,cortex-a57" 159 "arm,cortex-a57"
160 "arm,cortex-a72"
160 "arm,cortex-m0" 161 "arm,cortex-m0"
161 "arm,cortex-m0+" 162 "arm,cortex-m0+"
162 "arm,cortex-m1" 163 "arm,cortex-m1"
diff --git a/Documentation/devicetree/bindings/arm/psci.txt b/Documentation/devicetree/bindings/arm/psci.txt
index a9adab84e2fe..a2c4f1d52492 100644
--- a/Documentation/devicetree/bindings/arm/psci.txt
+++ b/Documentation/devicetree/bindings/arm/psci.txt
@@ -23,17 +23,20 @@ Main node required properties:
23 23
24 - compatible : should contain at least one of: 24 - compatible : should contain at least one of:
25 25
26 * "arm,psci" : for implementations complying to PSCI versions prior to 26 * "arm,psci" : For implementations complying to PSCI versions prior
27 0.2. For these cases function IDs must be provided. 27 to 0.2.
28 28 For these cases function IDs must be provided.
29 * "arm,psci-0.2" : for implementations complying to PSCI 0.2. Function 29
30 IDs are not required and should be ignored by an OS with PSCI 0.2 30 * "arm,psci-0.2" : For implementations complying to PSCI 0.2.
31 support, but are permitted to be present for compatibility with 31 Function IDs are not required and should be ignored by
32 existing software when "arm,psci" is later in the compatible list. 32 an OS with PSCI 0.2 support, but are permitted to be
33 33 present for compatibility with existing software when
34 * "arm,psci-1.0" : for implementations complying to PSCI 1.0. PSCI 1.0 is 34 "arm,psci" is later in the compatible list.
35 backward compatible with PSCI 0.2 with minor specification updates, 35
36 as defined in the PSCI specification[2]. 36 * "arm,psci-1.0" : For implementations complying to PSCI 1.0.
37 PSCI 1.0 is backward compatible with PSCI 0.2 with
38 minor specification updates, as defined in the PSCI
39 specification[2].
37 40
38 - method : The method of calling the PSCI firmware. Permitted 41 - method : The method of calling the PSCI firmware. Permitted
39 values are: 42 values are:
diff --git a/Documentation/devicetree/bindings/arm/secure.txt b/Documentation/devicetree/bindings/arm/secure.txt
new file mode 100644
index 000000000000..e31303fb233a
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/secure.txt
@@ -0,0 +1,53 @@
1* ARM Secure world bindings
2
3ARM CPUs with TrustZone support have two distinct address spaces,
4"Normal" and "Secure". Most devicetree consumers (including the Linux
5kernel) are not TrustZone aware and run entirely in either the Normal
6world or the Secure world. However some devicetree consumers are
7TrustZone aware and need to be able to determine whether devices are
8visible only in the Secure address space, only in the Normal address
9space, or visible in both. (One example of that situation would be a
10virtual machine which boots Secure firmware and wants to tell the
11firmware about the layout of the machine via devicetree.)
12
13The general principle of the naming scheme for Secure world bindings
14is that any property that needs a different value in the Secure world
15can be supported by prefixing the property name with "secure-". So for
16instance "secure-foo" would override "foo". For property names with
17a vendor prefix, the Secure variant of "vendor,foo" would be
18"vendor,secure-foo". If there is no "secure-" property then the Secure
19world value is the same as specified for the Normal world by the
20non-prefixed property. However, only the properties listed below may
21validly have "secure-" versions; this list will be enlarged on a
22case-by-case basis.
23
24Defining the bindings in this way means that a device tree which has
25been annotated to indicate the presence of Secure-only devices can
26still be processed unmodified by existing Non-secure software (and in
27particular by the kernel).
28
29Note that it is still valid for bindings intended for purely Secure
30world consumers (like kernels that run entirely in Secure) to simply
31describe the view of Secure world using the standard bindings. These
32secure- bindings only need to be used where both the Secure and Normal
33world views need to be described in a single device tree.
34
35Valid Secure world properties:
36
37- secure-status : specifies whether the device is present and usable
38 in the secure world. The combination of this with "status" allows
39 the various possible combinations of device visibility to be
40 specified. If "secure-status" is not specified it defaults to the
41 same value as "status"; if "status" is not specified either then
42 both default to "okay". This means the following combinations are
43 possible:
44
45 /* Neither specified: default to visible in both S and NS */
46 secure-status = "okay"; /* visible in both */
47 status = "okay"; /* visible in both */
48 status = "okay"; secure-status = "okay"; /* visible in both */
49 secure-status = "disabled"; /* NS-only */
50 status = "okay"; secure-status = "disabled"; /* NS-only */
51 status = "disabled"; secure-status = "okay"; /* S-only */
52 status = "disabled"; /* disabled in both */
53 status = "disabled"; secure-status = "disabled"; /* disabled in both */
diff --git a/Documentation/devicetree/bindings/display/bridge/tda998x.txt b/Documentation/devicetree/bindings/display/bridge/tda998x.txt
index e9e4bce40760..e178e6b9f9ee 100644
--- a/Documentation/devicetree/bindings/display/bridge/tda998x.txt
+++ b/Documentation/devicetree/bindings/display/bridge/tda998x.txt
@@ -5,6 +5,10 @@ Required properties;
5 5
6 - reg: I2C address 6 - reg: I2C address
7 7
8Required node:
9 - port: Input port node with endpoint definition, as described
10 in Documentation/devicetree/bindings/graph.txt
11
8Optional properties: 12Optional properties:
9 - interrupts: interrupt number and trigger type 13 - interrupts: interrupt number and trigger type
10 default: polling 14 default: polling
diff --git a/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt
index ec96b1f01478..475ae9bd562b 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt
@@ -22,7 +22,7 @@ Interrupt Controllers bindings used by client devices.
22Example: 22Example:
23 23
24 interrupt-controller@18060010 { 24 interrupt-controller@18060010 {
25 compatible = "qca,ar9132-misc-intc", qca,ar7100-misc-intc"; 25 compatible = "qca,ar9132-misc-intc", "qca,ar7100-misc-intc";
26 reg = <0x18060010 0x4>; 26 reg = <0x18060010 0x4>;
27 27
28 interrupt-parent = <&cpuintc>; 28 interrupt-parent = <&cpuintc>;
diff --git a/Documentation/devicetree/bindings/media/i2c/adp1653.txt b/Documentation/devicetree/bindings/media/i2c/adp1653.txt
index 5ce66f2104e3..4cce0de40ee9 100644
--- a/Documentation/devicetree/bindings/media/i2c/adp1653.txt
+++ b/Documentation/devicetree/bindings/media/i2c/adp1653.txt
@@ -12,12 +12,13 @@ There are two LED outputs available - flash and indicator. One LED is
12represented by one child node, nodes need to be named "flash" and "indicator". 12represented by one child node, nodes need to be named "flash" and "indicator".
13 13
14Required properties of the LED child node: 14Required properties of the LED child node:
15- max-microamp : see Documentation/devicetree/bindings/leds/common.txt 15- led-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
16 16
17Required properties of the flash LED child node: 17Required properties of the flash LED child node:
18 18
19- flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt 19- flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
20- flash-timeout-us : see Documentation/devicetree/bindings/leds/common.txt 20- flash-timeout-us : see Documentation/devicetree/bindings/leds/common.txt
21- led-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
21 22
22Example: 23Example:
23 24
@@ -29,9 +30,9 @@ Example:
29 flash { 30 flash {
30 flash-timeout-us = <500000>; 31 flash-timeout-us = <500000>;
31 flash-max-microamp = <320000>; 32 flash-max-microamp = <320000>;
32 max-microamp = <50000>; 33 led-max-microamp = <50000>;
33 }; 34 };
34 indicator { 35 indicator {
35 max-microamp = <17500>; 36 led-max-microamp = <17500>;
36 }; 37 };
37 }; 38 };
diff --git a/Documentation/devicetree/bindings/memory-controllers/ath79-ddr-controller.txt b/Documentation/devicetree/bindings/memory-controllers/ath79-ddr-controller.txt
index efe35a065714..c81af75bcd88 100644
--- a/Documentation/devicetree/bindings/memory-controllers/ath79-ddr-controller.txt
+++ b/Documentation/devicetree/bindings/memory-controllers/ath79-ddr-controller.txt
@@ -1,6 +1,6 @@
1Binding for Qualcomm Atheros AR7xxx/AR9xxx DDR controller 1Binding for Qualcomm Atheros AR7xxx/AR9xxx DDR controller
2 2
3The DDR controller of the ARxxx and AR9xxx families provides an interface 3The DDR controller of the AR7xxx and AR9xxx families provides an interface
4to flush the FIFO between various devices and the DDR. This is mainly used 4to flush the FIFO between various devices and the DDR. This is mainly used
5by the IRQ controller to flush the FIFO before running the interrupt handler 5by the IRQ controller to flush the FIFO before running the interrupt handler
6of such devices. 6of such devices.
@@ -11,9 +11,9 @@ Required properties:
11 "qca,[ar7100|ar7240]-ddr-controller" as fallback. 11 "qca,[ar7100|ar7240]-ddr-controller" as fallback.
12 On SoC with PCI support "qca,ar7100-ddr-controller" should be used as 12 On SoC with PCI support "qca,ar7100-ddr-controller" should be used as
13 fallback, otherwise "qca,ar7240-ddr-controller" should be used. 13 fallback, otherwise "qca,ar7240-ddr-controller" should be used.
14- reg: Base address and size of the controllers memory area 14- reg: Base address and size of the controller's memory area
15- #qca,ddr-wb-channel-cells: has to be 1, the index of the write buffer 15- #qca,ddr-wb-channel-cells: Specifies the number of cells needed to encode
16 channel 16 the write buffer channel index, should be 1.
17 17
18Example: 18Example:
19 19
diff --git a/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt b/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
index 862aa2f8837a..00c587b3d3ae 100644
--- a/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
+++ b/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
@@ -2,7 +2,8 @@
2 2
3Required properties: 3Required properties:
4 - compatible : Should be "fsl,vf610-qspi", "fsl,imx6sx-qspi", 4 - compatible : Should be "fsl,vf610-qspi", "fsl,imx6sx-qspi",
5 "fsl,imx7d-qspi", "fsl,imx6ul-qspi" 5 "fsl,imx7d-qspi", "fsl,imx6ul-qspi",
6 "fsl,ls1021-qspi"
6 - reg : the first contains the register location and length, 7 - reg : the first contains the register location and length,
7 the second contains the memory mapping address and length 8 the second contains the memory mapping address and length
8 - reg-names: Should contain the reg names "QuadSPI" and "QuadSPI-memory" 9 - reg-names: Should contain the reg names "QuadSPI" and "QuadSPI-memory"
diff --git a/Documentation/devicetree/bindings/net/cdns-emac.txt b/Documentation/devicetree/bindings/net/cdns-emac.txt
deleted file mode 100644
index 4451ee973223..000000000000
--- a/Documentation/devicetree/bindings/net/cdns-emac.txt
+++ /dev/null
@@ -1,20 +0,0 @@
1* Cadence EMAC Ethernet controller
2
3Required properties:
4- compatible: Should be "cdns,[<chip>-]{emac}"
5 Use "cdns,at91rm9200-emac" Atmel at91rm9200 SoC.
6 Use "cdns,zynq-gem" Xilinx Zynq-7xxx SoC.
7 Or the generic form: "cdns,emac".
8- reg: Address and length of the register set for the device
9- interrupts: Should contain macb interrupt
10- phy-mode: see ethernet.txt file in the same directory.
11
12Examples:
13
14 macb0: ethernet@fffc4000 {
15 compatible = "cdns,at91rm9200-emac";
16 reg = <0xfffc4000 0x4000>;
17 interrupts = <21>;
18 phy-mode = "rmii";
19 local-mac-address = [3a 0e 03 04 05 06];
20 };
diff --git a/Documentation/devicetree/bindings/net/macb.txt b/Documentation/devicetree/bindings/net/macb.txt
index 5c397ca14cfe..d2e243b1ec0e 100644
--- a/Documentation/devicetree/bindings/net/macb.txt
+++ b/Documentation/devicetree/bindings/net/macb.txt
@@ -2,6 +2,7 @@
2 2
3Required properties: 3Required properties:
4- compatible: Should be "cdns,[<chip>-]{macb|gem}" 4- compatible: Should be "cdns,[<chip>-]{macb|gem}"
5 Use "cdns,at91rm9200-emac" Atmel at91rm9200 SoC.
5 Use "cdns,at91sam9260-macb" for Atmel at91sam9 SoCs or the 10/100Mbit IP 6 Use "cdns,at91sam9260-macb" for Atmel at91sam9 SoCs or the 10/100Mbit IP
6 available on sama5d3 SoCs. 7 available on sama5d3 SoCs.
7 Use "cdns,np4-macb" for NP4 SoC devices. 8 Use "cdns,np4-macb" for NP4 SoC devices.
@@ -11,7 +12,9 @@ Required properties:
11 Use "atmel,sama5d2-gem" for the GEM IP (10/100) available on Atmel sama5d2 SoCs. 12 Use "atmel,sama5d2-gem" for the GEM IP (10/100) available on Atmel sama5d2 SoCs.
12 Use "atmel,sama5d3-gem" for the Gigabit IP available on Atmel sama5d3 SoCs. 13 Use "atmel,sama5d3-gem" for the Gigabit IP available on Atmel sama5d3 SoCs.
13 Use "atmel,sama5d4-gem" for the GEM IP (10/100) available on Atmel sama5d4 SoCs. 14 Use "atmel,sama5d4-gem" for the GEM IP (10/100) available on Atmel sama5d4 SoCs.
15 Use "cdns,zynq-gem" Xilinx Zynq-7xxx SoC.
14 Use "cdns,zynqmp-gem" for Zynq Ultrascale+ MPSoC. 16 Use "cdns,zynqmp-gem" for Zynq Ultrascale+ MPSoC.
17 Or the generic form: "cdns,emac".
15- reg: Address and length of the register set for the device 18- reg: Address and length of the register set for the device
16- interrupts: Should contain macb interrupt 19- interrupts: Should contain macb interrupt
17- phy-mode: See ethernet.txt file in the same directory. 20- phy-mode: See ethernet.txt file in the same directory.
diff --git a/Documentation/devicetree/bindings/sound/atmel-classd.txt b/Documentation/devicetree/bindings/sound/atmel-classd.txt
index 0018451c4351..549e701cb7a1 100644
--- a/Documentation/devicetree/bindings/sound/atmel-classd.txt
+++ b/Documentation/devicetree/bindings/sound/atmel-classd.txt
@@ -16,6 +16,10 @@ Required properties:
16 Required elements: "pclk", "gclk" and "aclk". 16 Required elements: "pclk", "gclk" and "aclk".
17- clocks 17- clocks
18 Please refer to clock-bindings.txt. 18 Please refer to clock-bindings.txt.
19- assigned-clocks
20 Should be <&classd_gclk>.
21- assigned-clock-parents
22 Should be <&audio_pll_pmc>.
19 23
20Optional properties: 24Optional properties:
21- pinctrl-names, pinctrl-0 25- pinctrl-names, pinctrl-0
@@ -43,6 +47,8 @@ classd: classd@fc048000 {
43 dma-names = "tx"; 47 dma-names = "tx";
44 clocks = <&classd_clk>, <&classd_gclk>, <&audio_pll_pmc>; 48 clocks = <&classd_clk>, <&classd_gclk>, <&audio_pll_pmc>;
45 clock-names = "pclk", "gclk", "aclk"; 49 clock-names = "pclk", "gclk", "aclk";
50 assigned-clocks = <&classd_gclk>;
51 assigned-clock-parents = <&audio_pll_pmc>;
46 52
47 pinctrl-names = "default"; 53 pinctrl-names = "default";
48 pinctrl-0 = <&pinctrl_classd_default>; 54 pinctrl-0 = <&pinctrl_classd_default>;
diff --git a/Documentation/devicetree/bindings/arm/rockchip/pmu-sram.txt b/Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt
index 6b42fda306ff..6b42fda306ff 100644
--- a/Documentation/devicetree/bindings/arm/rockchip/pmu-sram.txt
+++ b/Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt
diff --git a/Documentation/devicetree/bindings/arm/rockchip/smp-sram.txt b/Documentation/devicetree/bindings/sram/rockchip-smp-sram.txt
index d9416fb8db6f..800701ecffca 100644
--- a/Documentation/devicetree/bindings/arm/rockchip/smp-sram.txt
+++ b/Documentation/devicetree/bindings/sram/rockchip-smp-sram.txt
@@ -12,7 +12,7 @@ Required sub-node properties:
12- compatible : should be "rockchip,rk3066-smp-sram" 12- compatible : should be "rockchip,rk3066-smp-sram"
13 13
14The rest of the properties should follow the generic mmio-sram discription 14The rest of the properties should follow the generic mmio-sram discription
15found in ../../misc/sram.txt 15found in Documentation/devicetree/bindings/sram/sram.txt
16 16
17Example: 17Example:
18 18
diff --git a/Documentation/devicetree/bindings/arm/exynos/smp-sysram.txt b/Documentation/devicetree/bindings/sram/samsung-sram.txt
index 4a0a4f70a0ce..6bc474b2b885 100644
--- a/Documentation/devicetree/bindings/arm/exynos/smp-sysram.txt
+++ b/Documentation/devicetree/bindings/sram/samsung-sram.txt
@@ -15,7 +15,7 @@ Required sub-node properties:
15 "samsung,exynos4210-sysram-ns" : for Non-secure SYSRAM 15 "samsung,exynos4210-sysram-ns" : for Non-secure SYSRAM
16 16
17The rest of the properties should follow the generic mmio-sram discription 17The rest of the properties should follow the generic mmio-sram discription
18found in ../../misc/sysram.txt 18found in Documentation/devicetree/bindings/sram/sram.txt
19 19
20Example: 20Example:
21 21
diff --git a/Documentation/devicetree/bindings/misc/sram.txt b/Documentation/devicetree/bindings/sram/sram.txt
index 42ee9438b771..42ee9438b771 100644
--- a/Documentation/devicetree/bindings/misc/sram.txt
+++ b/Documentation/devicetree/bindings/sram/sram.txt
diff --git a/Documentation/devicetree/bindings/soc/sunxi/sram.txt b/Documentation/devicetree/bindings/sram/sunxi-sram.txt
index 067698112f5f..8d5665468fe7 100644
--- a/Documentation/devicetree/bindings/soc/sunxi/sram.txt
+++ b/Documentation/devicetree/bindings/sram/sunxi-sram.txt
@@ -16,7 +16,7 @@ SRAM nodes
16---------- 16----------
17 17
18Each SRAM is described using the mmio-sram bindings documented in 18Each SRAM is described using the mmio-sram bindings documented in
19Documentation/devicetree/bindings/misc/sram.txt 19Documentation/devicetree/bindings/sram/sram.txt
20 20
21Each SRAM will have SRAM sections that are going to be handled by the 21Each SRAM will have SRAM sections that are going to be handled by the
22SRAM controller as subnodes. These sections are represented following 22SRAM controller as subnodes. These sections are represented following
diff --git a/Documentation/devicetree/bindings/usb/octeon-usb.txt b/Documentation/devicetree/bindings/usb/octeon-usb.txt
new file mode 100644
index 000000000000..205c8d24d6e3
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/octeon-usb.txt
@@ -0,0 +1,62 @@
1OCTEON/OCTEON+ USB BLOCK
2
31) Main node
4
5 Required properties:
6
7 - compatible: must be "cavium,octeon-5750-usbn"
8
9 - reg: specifies the physical base address of the USBN block and
10 the length of the memory mapped region.
11
12 - #address-cells: specifies the number of cells needed to encode an
13 address. The value must be 2.
14
15 - #size-cells: specifies the number of cells used to represent the size
16 of an address. The value must be 2.
17
18 - ranges: specifies the translation between child address space and parent
19 address space.
20
21 - clock-frequency: speed of the USB reference clock. Allowed values are
22 12000000, 24000000 or 48000000.
23
24 - cavium,refclk-type: type of the USB reference clock. Allowed values are
25 "crystal" or "external".
26
27 - refclk-frequency: deprecated, use "clock-frequency".
28
29 - refclk-type: deprecated, use "cavium,refclk-type".
30
312) Child node
32
33 The main node must have one child node which describes the built-in
34 USB controller.
35
36 Required properties:
37
38 - compatible: must be "cavium,octeon-5750-usbc"
39
40 - reg: specifies the physical base address of the USBC block and
41 the length of the memory mapped region.
42
43 - interrupts: specifies the interrupt number for the USB controller.
44
453) Example:
46
47 usbn: usbn@1180068000000 {
48 compatible = "cavium,octeon-5750-usbn";
49 reg = <0x11800 0x68000000 0x0 0x1000>;
50 ranges; /* Direct mapping */
51 #address-cells = <2>;
52 #size-cells = <2>;
53 clock-frequency = <12000000>;
54 cavium,refclk-type = "crystal";
55
56 usbc@16f0010000000 {
57 compatible = "cavium,octeon-5750-usbc";
58 reg = <0x16f00 0x10000000 0x0 0x80000>;
59 interrupts = <0 56>;
60 };
61 };
62
diff --git a/Documentation/devicetree/bindings/usb/usb3503.txt b/Documentation/devicetree/bindings/usb/usb3503.txt
index 52493b1480e2..c1a0a9191d26 100644
--- a/Documentation/devicetree/bindings/usb/usb3503.txt
+++ b/Documentation/devicetree/bindings/usb/usb3503.txt
@@ -18,7 +18,8 @@ Optional properties:
18- refclk: Clock used for driving REFCLK signal (optional, if not provided 18- refclk: Clock used for driving REFCLK signal (optional, if not provided
19 the driver assumes that clock signal is always available, its 19 the driver assumes that clock signal is always available, its
20 rate is specified by REF_SEL pins and a value from the primary 20 rate is specified by REF_SEL pins and a value from the primary
21 reference clock frequencies table is used) 21 reference clock frequencies table is used). Use clocks and
22 clock-names in order to assign it
22- refclk-frequency: Frequency of the REFCLK signal as defined by REF_SEL 23- refclk-frequency: Frequency of the REFCLK signal as defined by REF_SEL
23 pins (optional, if not provided, driver will not set rate of the 24 pins (optional, if not provided, driver will not set rate of the
24 REFCLK signal and assume that a value from the primary reference 25 REFCLK signal and assume that a value from the primary reference
@@ -33,4 +34,6 @@ Examples:
33 intn-gpios = <&gpx3 4 1>; 34 intn-gpios = <&gpx3 4 1>;
34 reset-gpios = <&gpx3 5 1>; 35 reset-gpios = <&gpx3 5 1>;
35 initial-mode = <1>; 36 initial-mode = <1>;
37 clocks = <&clks 80>;
38 clock-names = "refclk";
36 }; 39 };
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 55df1d444e9f..a4f2035569ce 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -161,6 +161,7 @@ nuvoton Nuvoton Technology Corporation
161nvidia NVIDIA 161nvidia NVIDIA
162nxp NXP Semiconductors 162nxp NXP Semiconductors
163okaya Okaya Electric America, Inc. 163okaya Okaya Electric America, Inc.
164olimex OLIMEX Ltd.
164onnn ON Semiconductor Corp. 165onnn ON Semiconductor Corp.
165opencores OpenCores.org 166opencores OpenCores.org
166option Option NV 167option Option NV
diff --git a/drivers/of/address.c b/drivers/of/address.c
index 9582c5703b3c..91a469d55b8f 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -597,7 +597,7 @@ static u64 __of_translate_address(struct device_node *dev,
597 pbus = of_match_bus(parent); 597 pbus = of_match_bus(parent);
598 pbus->count_cells(dev, &pna, &pns); 598 pbus->count_cells(dev, &pna, &pns);
599 if (!OF_CHECK_COUNTS(pna, pns)) { 599 if (!OF_CHECK_COUNTS(pna, pns)) {
600 printk(KERN_ERR "prom_parse: Bad cell count for %s\n", 600 pr_err("prom_parse: Bad cell count for %s\n",
601 of_node_full_name(dev)); 601 of_node_full_name(dev));
602 break; 602 break;
603 } 603 }
diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c
index 53826b84e0ec..c647bd1b6903 100644
--- a/drivers/of/dynamic.c
+++ b/drivers/of/dynamic.c
@@ -646,6 +646,7 @@ void of_changeset_init(struct of_changeset *ocs)
646 memset(ocs, 0, sizeof(*ocs)); 646 memset(ocs, 0, sizeof(*ocs));
647 INIT_LIST_HEAD(&ocs->entries); 647 INIT_LIST_HEAD(&ocs->entries);
648} 648}
649EXPORT_SYMBOL_GPL(of_changeset_init);
649 650
650/** 651/**
651 * of_changeset_destroy - Destroy a changeset 652 * of_changeset_destroy - Destroy a changeset
@@ -662,20 +663,9 @@ void of_changeset_destroy(struct of_changeset *ocs)
662 list_for_each_entry_safe_reverse(ce, cen, &ocs->entries, node) 663 list_for_each_entry_safe_reverse(ce, cen, &ocs->entries, node)
663 __of_changeset_entry_destroy(ce); 664 __of_changeset_entry_destroy(ce);
664} 665}
666EXPORT_SYMBOL_GPL(of_changeset_destroy);
665 667
666/** 668int __of_changeset_apply(struct of_changeset *ocs)
667 * of_changeset_apply - Applies a changeset
668 *
669 * @ocs: changeset pointer
670 *
671 * Applies a changeset to the live tree.
672 * Any side-effects of live tree state changes are applied here on
673 * sucess, like creation/destruction of devices and side-effects
674 * like creation of sysfs properties and directories.
675 * Returns 0 on success, a negative error value in case of an error.
676 * On error the partially applied effects are reverted.
677 */
678int of_changeset_apply(struct of_changeset *ocs)
679{ 669{
680 struct of_changeset_entry *ce; 670 struct of_changeset_entry *ce;
681 int ret; 671 int ret;
@@ -704,17 +694,30 @@ int of_changeset_apply(struct of_changeset *ocs)
704} 694}
705 695
706/** 696/**
707 * of_changeset_revert - Reverts an applied changeset 697 * of_changeset_apply - Applies a changeset
708 * 698 *
709 * @ocs: changeset pointer 699 * @ocs: changeset pointer
710 * 700 *
711 * Reverts a changeset returning the state of the tree to what it 701 * Applies a changeset to the live tree.
712 * was before the application. 702 * Any side-effects of live tree state changes are applied here on
713 * Any side-effects like creation/destruction of devices and 703 * success, like creation/destruction of devices and side-effects
714 * removal of sysfs properties and directories are applied. 704 * like creation of sysfs properties and directories.
715 * Returns 0 on success, a negative error value in case of an error. 705 * Returns 0 on success, a negative error value in case of an error.
706 * On error the partially applied effects are reverted.
716 */ 707 */
717int of_changeset_revert(struct of_changeset *ocs) 708int of_changeset_apply(struct of_changeset *ocs)
709{
710 int ret;
711
712 mutex_lock(&of_mutex);
713 ret = __of_changeset_apply(ocs);
714 mutex_unlock(&of_mutex);
715
716 return ret;
717}
718EXPORT_SYMBOL_GPL(of_changeset_apply);
719
720int __of_changeset_revert(struct of_changeset *ocs)
718{ 721{
719 struct of_changeset_entry *ce; 722 struct of_changeset_entry *ce;
720 int ret; 723 int ret;
@@ -742,6 +745,29 @@ int of_changeset_revert(struct of_changeset *ocs)
742} 745}
743 746
744/** 747/**
748 * of_changeset_revert - Reverts an applied changeset
749 *
750 * @ocs: changeset pointer
751 *
752 * Reverts a changeset returning the state of the tree to what it
753 * was before the application.
754 * Any side-effects like creation/destruction of devices and
755 * removal of sysfs properties and directories are applied.
756 * Returns 0 on success, a negative error value in case of an error.
757 */
758int of_changeset_revert(struct of_changeset *ocs)
759{
760 int ret;
761
762 mutex_lock(&of_mutex);
763 ret = __of_changeset_revert(ocs);
764 mutex_unlock(&of_mutex);
765
766 return ret;
767}
768EXPORT_SYMBOL_GPL(of_changeset_revert);
769
770/**
745 * of_changeset_action - Perform a changeset action 771 * of_changeset_action - Perform a changeset action
746 * 772 *
747 * @ocs: changeset pointer 773 * @ocs: changeset pointer
@@ -779,3 +805,4 @@ int of_changeset_action(struct of_changeset *ocs, unsigned long action,
779 list_add_tail(&ce->node, &ocs->entries); 805 list_add_tail(&ce->node, &ocs->entries);
780 return 0; 806 return 0;
781} 807}
808EXPORT_SYMBOL_GPL(of_changeset_action);
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 4fa916dffc91..706e3ff67f8b 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -473,6 +473,7 @@ EXPORT_SYMBOL_GPL(of_irq_to_resource_table);
473 473
474struct of_intc_desc { 474struct of_intc_desc {
475 struct list_head list; 475 struct list_head list;
476 of_irq_init_cb_t irq_init_cb;
476 struct device_node *dev; 477 struct device_node *dev;
477 struct device_node *interrupt_parent; 478 struct device_node *interrupt_parent;
478}; 479};
@@ -486,6 +487,7 @@ struct of_intc_desc {
486 */ 487 */
487void __init of_irq_init(const struct of_device_id *matches) 488void __init of_irq_init(const struct of_device_id *matches)
488{ 489{
490 const struct of_device_id *match;
489 struct device_node *np, *parent = NULL; 491 struct device_node *np, *parent = NULL;
490 struct of_intc_desc *desc, *temp_desc; 492 struct of_intc_desc *desc, *temp_desc;
491 struct list_head intc_desc_list, intc_parent_list; 493 struct list_head intc_desc_list, intc_parent_list;
@@ -493,10 +495,15 @@ void __init of_irq_init(const struct of_device_id *matches)
493 INIT_LIST_HEAD(&intc_desc_list); 495 INIT_LIST_HEAD(&intc_desc_list);
494 INIT_LIST_HEAD(&intc_parent_list); 496 INIT_LIST_HEAD(&intc_parent_list);
495 497
496 for_each_matching_node(np, matches) { 498 for_each_matching_node_and_match(np, matches, &match) {
497 if (!of_find_property(np, "interrupt-controller", NULL) || 499 if (!of_find_property(np, "interrupt-controller", NULL) ||
498 !of_device_is_available(np)) 500 !of_device_is_available(np))
499 continue; 501 continue;
502
503 if (WARN(!match->data, "of_irq_init: no init function for %s\n",
504 match->compatible))
505 continue;
506
500 /* 507 /*
501 * Here, we allocate and populate an of_intc_desc with the node 508 * Here, we allocate and populate an of_intc_desc with the node
502 * pointer, interrupt-parent device_node etc. 509 * pointer, interrupt-parent device_node etc.
@@ -507,6 +514,7 @@ void __init of_irq_init(const struct of_device_id *matches)
507 goto err; 514 goto err;
508 } 515 }
509 516
517 desc->irq_init_cb = match->data;
510 desc->dev = of_node_get(np); 518 desc->dev = of_node_get(np);
511 desc->interrupt_parent = of_irq_find_parent(np); 519 desc->interrupt_parent = of_irq_find_parent(np);
512 if (desc->interrupt_parent == np) 520 if (desc->interrupt_parent == np)
@@ -526,27 +534,18 @@ void __init of_irq_init(const struct of_device_id *matches)
526 * The assumption is that NULL parent means a root controller. 534 * The assumption is that NULL parent means a root controller.
527 */ 535 */
528 list_for_each_entry_safe(desc, temp_desc, &intc_desc_list, list) { 536 list_for_each_entry_safe(desc, temp_desc, &intc_desc_list, list) {
529 const struct of_device_id *match;
530 int ret; 537 int ret;
531 of_irq_init_cb_t irq_init_cb;
532 538
533 if (desc->interrupt_parent != parent) 539 if (desc->interrupt_parent != parent)
534 continue; 540 continue;
535 541
536 list_del(&desc->list); 542 list_del(&desc->list);
537 match = of_match_node(matches, desc->dev);
538 if (WARN(!match->data,
539 "of_irq_init: no init function for %s\n",
540 match->compatible)) {
541 kfree(desc);
542 continue;
543 }
544 543
545 pr_debug("of_irq_init: init %s @ %p, parent %p\n", 544 pr_debug("of_irq_init: init %s (%p), parent %p\n",
546 match->compatible, 545 desc->dev->full_name,
547 desc->dev, desc->interrupt_parent); 546 desc->dev, desc->interrupt_parent);
548 irq_init_cb = (of_irq_init_cb_t)match->data; 547 ret = desc->irq_init_cb(desc->dev,
549 ret = irq_init_cb(desc->dev, desc->interrupt_parent); 548 desc->interrupt_parent);
550 if (ret) { 549 if (ret) {
551 kfree(desc); 550 kfree(desc);
552 continue; 551 continue;
diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h
index 8e882e706cd8..829469faeb23 100644
--- a/drivers/of/of_private.h
+++ b/drivers/of/of_private.h
@@ -45,6 +45,8 @@ static inline struct device_node *kobj_to_device_node(struct kobject *kobj)
45extern int of_property_notify(int action, struct device_node *np, 45extern int of_property_notify(int action, struct device_node *np,
46 struct property *prop, struct property *old_prop); 46 struct property *prop, struct property *old_prop);
47extern void of_node_release(struct kobject *kobj); 47extern void of_node_release(struct kobject *kobj);
48extern int __of_changeset_apply(struct of_changeset *ocs);
49extern int __of_changeset_revert(struct of_changeset *ocs);
48#else /* CONFIG_OF_DYNAMIC */ 50#else /* CONFIG_OF_DYNAMIC */
49static inline int of_property_notify(int action, struct device_node *np, 51static inline int of_property_notify(int action, struct device_node *np,
50 struct property *prop, struct property *old_prop) 52 struct property *prop, struct property *old_prop)
diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index 54e5af9d7377..82250815e9a5 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -379,9 +379,9 @@ int of_overlay_create(struct device_node *tree)
379 } 379 }
380 380
381 /* apply the changeset */ 381 /* apply the changeset */
382 err = of_changeset_apply(&ov->cset); 382 err = __of_changeset_apply(&ov->cset);
383 if (err) { 383 if (err) {
384 pr_err("%s: of_changeset_apply() failed for tree@%s\n", 384 pr_err("%s: __of_changeset_apply() failed for tree@%s\n",
385 __func__, tree->full_name); 385 __func__, tree->full_name);
386 goto err_revert_overlay; 386 goto err_revert_overlay;
387 } 387 }
@@ -511,7 +511,7 @@ int of_overlay_destroy(int id)
511 511
512 512
513 list_del(&ov->node); 513 list_del(&ov->node);
514 of_changeset_revert(&ov->cset); 514 __of_changeset_revert(&ov->cset);
515 of_free_overlay_info(ov); 515 of_free_overlay_info(ov);
516 idr_remove(&ov_idr, id); 516 idr_remove(&ov_idr, id);
517 of_changeset_destroy(&ov->cset); 517 of_changeset_destroy(&ov->cset);
@@ -542,7 +542,7 @@ int of_overlay_destroy_all(void)
542 /* the tail of list is guaranteed to be safe to remove */ 542 /* the tail of list is guaranteed to be safe to remove */
543 list_for_each_entry_safe_reverse(ov, ovn, &ov_list, node) { 543 list_for_each_entry_safe_reverse(ov, ovn, &ov_list, node) {
544 list_del(&ov->node); 544 list_del(&ov->node);
545 of_changeset_revert(&ov->cset); 545 __of_changeset_revert(&ov->cset);
546 of_free_overlay_info(ov); 546 of_free_overlay_info(ov);
547 idr_remove(&ov_idr, ov->id); 547 idr_remove(&ov_idr, ov->id);
548 kfree(ov); 548 kfree(ov);
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index af98343614d8..8d103e4968be 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -31,6 +31,7 @@ const struct of_device_id of_default_bus_match_table[] = {
31#endif /* CONFIG_ARM_AMBA */ 31#endif /* CONFIG_ARM_AMBA */
32 {} /* Empty terminated list */ 32 {} /* Empty terminated list */
33}; 33};
34EXPORT_SYMBOL(of_default_bus_match_table);
34 35
35static int of_dev_node_match(struct device *dev, void *data) 36static int of_dev_node_match(struct device *dev, void *data)
36{ 37{
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index e16ea5717b7f..979b6e415cea 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -530,18 +530,14 @@ static void __init of_unittest_changeset(void)
530 unittest(!of_changeset_add_property(&chgset, parent, ppadd), "fail add prop\n"); 530 unittest(!of_changeset_add_property(&chgset, parent, ppadd), "fail add prop\n");
531 unittest(!of_changeset_update_property(&chgset, parent, ppupdate), "fail update prop\n"); 531 unittest(!of_changeset_update_property(&chgset, parent, ppupdate), "fail update prop\n");
532 unittest(!of_changeset_remove_property(&chgset, parent, ppremove), "fail remove prop\n"); 532 unittest(!of_changeset_remove_property(&chgset, parent, ppremove), "fail remove prop\n");
533 mutex_lock(&of_mutex);
534 unittest(!of_changeset_apply(&chgset), "apply failed\n"); 533 unittest(!of_changeset_apply(&chgset), "apply failed\n");
535 mutex_unlock(&of_mutex);
536 534
537 /* Make sure node names are constructed correctly */ 535 /* Make sure node names are constructed correctly */
538 unittest((np = of_find_node_by_path("/testcase-data/changeset/n2/n21")), 536 unittest((np = of_find_node_by_path("/testcase-data/changeset/n2/n21")),
539 "'%s' not added\n", n21->full_name); 537 "'%s' not added\n", n21->full_name);
540 of_node_put(np); 538 of_node_put(np);
541 539
542 mutex_lock(&of_mutex);
543 unittest(!of_changeset_revert(&chgset), "revert failed\n"); 540 unittest(!of_changeset_revert(&chgset), "revert failed\n");
544 mutex_unlock(&of_mutex);
545 541
546 of_changeset_destroy(&chgset); 542 of_changeset_destroy(&chgset);
547#endif 543#endif
@@ -757,6 +753,11 @@ static void __init of_unittest_match_node(void)
757 } 753 }
758} 754}
759 755
756static struct resource test_bus_res = {
757 .start = 0xfffffff8,
758 .end = 0xfffffff9,
759 .flags = IORESOURCE_MEM,
760};
760static const struct platform_device_info test_bus_info = { 761static const struct platform_device_info test_bus_info = {
761 .name = "unittest-bus", 762 .name = "unittest-bus",
762}; 763};
@@ -800,6 +801,15 @@ static void __init of_unittest_platform_populate(void)
800 return; 801 return;
801 test_bus->dev.of_node = np; 802 test_bus->dev.of_node = np;
802 803
804 /*
805 * Add a dummy resource to the test bus node after it is
806 * registered to catch problems with un-inserted resources. The
807 * DT code doesn't insert the resources, and it has caused the
808 * kernel to oops in the past. This makes sure the same bug
809 * doesn't crop up again.
810 */
811 platform_device_add_resources(test_bus, &test_bus_res, 1);
812
803 of_platform_populate(np, match, NULL, &test_bus->dev); 813 of_platform_populate(np, match, NULL, &test_bus->dev);
804 for_each_child_of_node(np, child) { 814 for_each_child_of_node(np, child) {
805 for_each_child_of_node(child, grandchild) 815 for_each_child_of_node(child, grandchild)
diff --git a/include/linux/of_address.h b/include/linux/of_address.h
index 507daad0bc8d..01c0a556448b 100644
--- a/include/linux/of_address.h
+++ b/include/linux/of_address.h
@@ -3,6 +3,7 @@
3#include <linux/ioport.h> 3#include <linux/ioport.h>
4#include <linux/errno.h> 4#include <linux/errno.h>
5#include <linux/of.h> 5#include <linux/of.h>
6#include <linux/io.h>
6 7
7struct of_pci_range_parser { 8struct of_pci_range_parser {
8 struct device_node *node; 9 struct device_node *node;
@@ -36,6 +37,8 @@ extern struct device_node *of_find_matching_node_by_address(
36 const struct of_device_id *matches, 37 const struct of_device_id *matches,
37 u64 base_address); 38 u64 base_address);
38extern void __iomem *of_iomap(struct device_node *device, int index); 39extern void __iomem *of_iomap(struct device_node *device, int index);
40void __iomem *of_io_request_and_map(struct device_node *device,
41 int index, const char *name);
39 42
40/* Extract an address from a device, returns the region size and 43/* Extract an address from a device, returns the region size and
41 * the address space flags too. The PCI version uses a BAR number 44 * the address space flags too. The PCI version uses a BAR number
@@ -57,6 +60,11 @@ extern int of_dma_get_range(struct device_node *np, u64 *dma_addr,
57 u64 *paddr, u64 *size); 60 u64 *paddr, u64 *size);
58extern bool of_dma_is_coherent(struct device_node *np); 61extern bool of_dma_is_coherent(struct device_node *np);
59#else /* CONFIG_OF_ADDRESS */ 62#else /* CONFIG_OF_ADDRESS */
63static inline void __iomem *of_io_request_and_map(struct device_node *device,
64 int index, const char *name)
65{
66 return IOMEM_ERR_PTR(-EINVAL);
67}
60 68
61static inline u64 of_translate_address(struct device_node *np, 69static inline u64 of_translate_address(struct device_node *np,
62 const __be32 *addr) 70 const __be32 *addr)
@@ -112,12 +120,7 @@ static inline bool of_dma_is_coherent(struct device_node *np)
112extern int of_address_to_resource(struct device_node *dev, int index, 120extern int of_address_to_resource(struct device_node *dev, int index,
113 struct resource *r); 121 struct resource *r);
114void __iomem *of_iomap(struct device_node *node, int index); 122void __iomem *of_iomap(struct device_node *node, int index);
115void __iomem *of_io_request_and_map(struct device_node *device,
116 int index, const char *name);
117#else 123#else
118
119#include <linux/io.h>
120
121static inline int of_address_to_resource(struct device_node *dev, int index, 124static inline int of_address_to_resource(struct device_node *dev, int index,
122 struct resource *r) 125 struct resource *r)
123{ 126{
@@ -128,12 +131,6 @@ static inline void __iomem *of_iomap(struct device_node *device, int index)
128{ 131{
129 return NULL; 132 return NULL;
130} 133}
131
132static inline void __iomem *of_io_request_and_map(struct device_node *device,
133 int index, const char *name)
134{
135 return IOMEM_ERR_PTR(-EINVAL);
136}
137#endif 134#endif
138 135
139#if defined(CONFIG_OF_ADDRESS) && defined(CONFIG_PCI) 136#if defined(CONFIG_OF_ADDRESS) && defined(CONFIG_PCI)