diff options
author | Arnd Bergmann <arnd@arndb.de> | 2013-06-21 09:28:16 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2013-06-21 09:28:16 -0400 |
commit | 5b520c94b30c643f24f43c79aa638c0a1fe3b15c (patch) | |
tree | 84f50948f368e87153dba160c77ba7e657445366 | |
parent | 076919a6e0154f06221e02f9e58b14eb1ed9e019 (diff) | |
parent | c4fa4946f177ae214523586cd794ac18d34b1430 (diff) |
Merge tag 'renesas-dt2-for-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt
From Simon Horman:
Second Round of Renesas ARM-based SoC DT updates for v3.11
* Increased DT coverage for renesas-intc-irqpin
by Guennadi Liakhovetski
* Clean up of address format used in sh73a0 dtsi file
by Guennadi Liakhovetski
* tag 'renesas-dt2-for-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
ARM: shmobile: irqpin: add a DT property to enable masking on parent
ARM: shmobile: sh73a0: remove "0x" prefix from DT node names
irqchip: renesas-intc-irqpin: DT binding for sense bitfield width
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt | 16 | ||||
-rw-r--r-- | arch/arm/boot/dts/sh73a0.dtsi | 18 | ||||
-rw-r--r-- | drivers/irqchip/irq-renesas-intc-irqpin.c | 9 |
3 files changed, 33 insertions, 10 deletions
diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt b/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt new file mode 100644 index 000000000000..1f8b0c507c26 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | DT bindings for the R-/SH-Mobile irqpin controller | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible: has to be "renesas,intc-irqpin" | ||
6 | - #interrupt-cells: has to be <2>: an interrupt index and flags, as defined in | ||
7 | interrupts.txt in this directory | ||
8 | |||
9 | Optional properties: | ||
10 | |||
11 | - any properties, listed in interrupts.txt, and any standard resource allocation | ||
12 | properties | ||
13 | - sense-bitfield-width: width of a single sense bitfield in the SENSE register, | ||
14 | if different from the default 4 bits | ||
15 | - control-parent: disable and enable interrupts on the parent interrupt | ||
16 | controller, needed for some broken implementations | ||
diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi index ec40bf78289e..b97750256003 100644 --- a/arch/arm/boot/dts/sh73a0.dtsi +++ b/arch/arm/boot/dts/sh73a0.dtsi | |||
@@ -119,7 +119,7 @@ | |||
119 | 0 32 0x4>; | 119 | 0 32 0x4>; |
120 | }; | 120 | }; |
121 | 121 | ||
122 | i2c0: i2c@0xe6820000 { | 122 | i2c0: i2c@e6820000 { |
123 | #address-cells = <1>; | 123 | #address-cells = <1>; |
124 | #size-cells = <0>; | 124 | #size-cells = <0>; |
125 | compatible = "renesas,rmobile-iic"; | 125 | compatible = "renesas,rmobile-iic"; |
@@ -131,7 +131,7 @@ | |||
131 | 0 170 0x4>; | 131 | 0 170 0x4>; |
132 | }; | 132 | }; |
133 | 133 | ||
134 | i2c1: i2c@0xe6822000 { | 134 | i2c1: i2c@e6822000 { |
135 | #address-cells = <1>; | 135 | #address-cells = <1>; |
136 | #size-cells = <0>; | 136 | #size-cells = <0>; |
137 | compatible = "renesas,rmobile-iic"; | 137 | compatible = "renesas,rmobile-iic"; |
@@ -143,7 +143,7 @@ | |||
143 | 0 54 0x4>; | 143 | 0 54 0x4>; |
144 | }; | 144 | }; |
145 | 145 | ||
146 | i2c2: i2c@0xe6824000 { | 146 | i2c2: i2c@e6824000 { |
147 | #address-cells = <1>; | 147 | #address-cells = <1>; |
148 | #size-cells = <0>; | 148 | #size-cells = <0>; |
149 | compatible = "renesas,rmobile-iic"; | 149 | compatible = "renesas,rmobile-iic"; |
@@ -155,7 +155,7 @@ | |||
155 | 0 174 0x4>; | 155 | 0 174 0x4>; |
156 | }; | 156 | }; |
157 | 157 | ||
158 | i2c3: i2c@0xe6826000 { | 158 | i2c3: i2c@e6826000 { |
159 | #address-cells = <1>; | 159 | #address-cells = <1>; |
160 | #size-cells = <0>; | 160 | #size-cells = <0>; |
161 | compatible = "renesas,rmobile-iic"; | 161 | compatible = "renesas,rmobile-iic"; |
@@ -167,7 +167,7 @@ | |||
167 | 0 186 0x4>; | 167 | 0 186 0x4>; |
168 | }; | 168 | }; |
169 | 169 | ||
170 | i2c4: i2c@0xe6828000 { | 170 | i2c4: i2c@e6828000 { |
171 | #address-cells = <1>; | 171 | #address-cells = <1>; |
172 | #size-cells = <0>; | 172 | #size-cells = <0>; |
173 | compatible = "renesas,rmobile-iic"; | 173 | compatible = "renesas,rmobile-iic"; |
@@ -179,7 +179,7 @@ | |||
179 | 0 190 0x4>; | 179 | 0 190 0x4>; |
180 | }; | 180 | }; |
181 | 181 | ||
182 | mmcif: mmcif@0x10010000 { | 182 | mmcif: mmcif@e6bd0000 { |
183 | compatible = "renesas,sh-mmcif"; | 183 | compatible = "renesas,sh-mmcif"; |
184 | reg = <0xe6bd0000 0x100>; | 184 | reg = <0xe6bd0000 0x100>; |
185 | interrupt-parent = <&gic>; | 185 | interrupt-parent = <&gic>; |
@@ -189,7 +189,7 @@ | |||
189 | status = "disabled"; | 189 | status = "disabled"; |
190 | }; | 190 | }; |
191 | 191 | ||
192 | sdhi0: sdhi@0xee100000 { | 192 | sdhi0: sdhi@ee100000 { |
193 | compatible = "renesas,r8a7740-sdhi"; | 193 | compatible = "renesas,r8a7740-sdhi"; |
194 | reg = <0xee100000 0x100>; | 194 | reg = <0xee100000 0x100>; |
195 | interrupt-parent = <&gic>; | 195 | interrupt-parent = <&gic>; |
@@ -201,7 +201,7 @@ | |||
201 | }; | 201 | }; |
202 | 202 | ||
203 | /* SDHI1 and SDHI2 have no CD pins, no need for CD IRQ */ | 203 | /* SDHI1 and SDHI2 have no CD pins, no need for CD IRQ */ |
204 | sdhi1: sdhi@0xee120000 { | 204 | sdhi1: sdhi@ee120000 { |
205 | compatible = "renesas,r8a7740-sdhi"; | 205 | compatible = "renesas,r8a7740-sdhi"; |
206 | reg = <0xee120000 0x100>; | 206 | reg = <0xee120000 0x100>; |
207 | interrupt-parent = <&gic>; | 207 | interrupt-parent = <&gic>; |
@@ -212,7 +212,7 @@ | |||
212 | status = "disabled"; | 212 | status = "disabled"; |
213 | }; | 213 | }; |
214 | 214 | ||
215 | sdhi2: sdhi@0xee140000 { | 215 | sdhi2: sdhi@ee140000 { |
216 | compatible = "renesas,r8a7740-sdhi"; | 216 | compatible = "renesas,r8a7740-sdhi"; |
217 | reg = <0xee140000 0x100>; | 217 | reg = <0xee140000 0x100>; |
218 | interrupt-parent = <&gic>; | 218 | interrupt-parent = <&gic>; |
diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c index 5a68e5accec1..82cec63a9011 100644 --- a/drivers/irqchip/irq-renesas-intc-irqpin.c +++ b/drivers/irqchip/irq-renesas-intc-irqpin.c | |||
@@ -18,6 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/of.h> | ||
21 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
22 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
23 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
@@ -347,8 +348,14 @@ static int intc_irqpin_probe(struct platform_device *pdev) | |||
347 | } | 348 | } |
348 | 349 | ||
349 | /* deal with driver instance configuration */ | 350 | /* deal with driver instance configuration */ |
350 | if (pdata) | 351 | if (pdata) { |
351 | memcpy(&p->config, pdata, sizeof(*pdata)); | 352 | memcpy(&p->config, pdata, sizeof(*pdata)); |
353 | } else { | ||
354 | of_property_read_u32(pdev->dev.of_node, "sense-bitfield-width", | ||
355 | &p->config.sense_bitfield_width); | ||
356 | p->config.control_parent = of_property_read_bool(pdev->dev.of_node, | ||
357 | "control-parent"); | ||
358 | } | ||
352 | if (!p->config.sense_bitfield_width) | 359 | if (!p->config.sense_bitfield_width) |
353 | p->config.sense_bitfield_width = 4; /* default to 4 bits */ | 360 | p->config.sense_bitfield_width = 4; /* default to 4 bits */ |
354 | 361 | ||