All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: dts: meson: GPIO interrupt fixes for v4.15
@ 2017-10-29 23:17 Martin Blumenstingl
  2017-10-29 23:17 ` [PATCH 1/2] ARM: dts: meson: correct the sort order for the the gpio_intc node Martin Blumenstingl
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Martin Blumenstingl @ 2017-10-29 23:17 UTC (permalink / raw)
  To: linus-amlogic

This provides two small fixes for the GPIO interrupt support on the
32-bit Meson SoCs.

The first change is purely cosmetic - I still decided to include to it
because it keeps the sort order consistent. Also it's easier to find
the node if you can rely on the sorting to be consistent.

The second patch however is required to make the GPIO interrupt
controller functional on Meson8b. Without this the driver simply fails
during the of_iomap call - and as a result of that GPIO interrupts are
unavailable.


Martin Blumenstingl (2):
  ARM: dts: meson: correct the sort order for the the gpio_intc node
  ARM: dts: meson: fix the memory region of the GPIO interrupt
    controller

 arch/arm/boot/dts/meson.dtsi | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

-- 
2.14.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] ARM: dts: meson: correct the sort order for the the gpio_intc node
  2017-10-29 23:17 [PATCH 0/2] ARM: dts: meson: GPIO interrupt fixes for v4.15 Martin Blumenstingl
@ 2017-10-29 23:17 ` Martin Blumenstingl
  2017-10-29 23:17 ` [PATCH 2/2] ARM: dts: meson: fix the memory region of the GPIO interrupt controller Martin Blumenstingl
  2017-10-31 10:02 ` [PATCH 0/2] ARM: dts: meson: GPIO interrupt fixes for v4.15 Jerome Brunet
  2 siblings, 0 replies; 5+ messages in thread
From: Martin Blumenstingl @ 2017-10-29 23:17 UTC (permalink / raw)
  To: linus-amlogic

Nodes are sorted by their register start address. Move gpio_intc to the
correct position.
No functional changes intended.

Fixes: 7d32bc03bcfb ("ARM: dts: meson8b: enable gpio interrupt controller")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm/boot/dts/meson.dtsi | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/arm/boot/dts/meson.dtsi b/arch/arm/boot/dts/meson.dtsi
index 4926133077b3..b750c837ec39 100644
--- a/arch/arm/boot/dts/meson.dtsi
+++ b/arch/arm/boot/dts/meson.dtsi
@@ -85,15 +85,6 @@
 				reg = <0x7c00 0x200>;
 			};
 
-			gpio_intc: interrupt-controller at 9880 {
-				compatible = "amlogic,meson-gpio-intc";
-				reg = <0xc1109880 0x10>;
-				interrupt-controller;
-				#interrupt-cells = <2>;
-				amlogic,channel-interrupts = <64 65 66 67 68 69 70 71>;
-				status = "disabled";
-			};
-
 			hwrng: rng at 8100 {
 				compatible = "amlogic,meson-rng";
 				reg = <0x8100 0x8>;
@@ -191,6 +182,15 @@
 				status = "disabled";
 			};
 
+			gpio_intc: interrupt-controller at 9880 {
+				compatible = "amlogic,meson-gpio-intc";
+				reg = <0xc1109880 0x10>;
+				interrupt-controller;
+				#interrupt-cells = <2>;
+				amlogic,channel-interrupts = <64 65 66 67 68 69 70 71>;
+				status = "disabled";
+			};
+
 			wdt: watchdog at 9900 {
 				compatible = "amlogic,meson6-wdt";
 				reg = <0x9900 0x8>;
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] ARM: dts: meson: fix the memory region of the GPIO interrupt controller
  2017-10-29 23:17 [PATCH 0/2] ARM: dts: meson: GPIO interrupt fixes for v4.15 Martin Blumenstingl
  2017-10-29 23:17 ` [PATCH 1/2] ARM: dts: meson: correct the sort order for the the gpio_intc node Martin Blumenstingl
@ 2017-10-29 23:17 ` Martin Blumenstingl
  2017-10-31 10:02 ` [PATCH 0/2] ARM: dts: meson: GPIO interrupt fixes for v4.15 Jerome Brunet
  2 siblings, 0 replies; 5+ messages in thread
From: Martin Blumenstingl @ 2017-10-29 23:17 UTC (permalink / raw)
  To: linus-amlogic

commit 200a575b68d2 ("ARM: dts: meson: organize devices in their corresponding busses")
organized all peripherals in busses so that the base register offset of
the bus doesn't have to be included in all child-nodes anymore.
The GPIO interrupt controller however specifies the register offset
without subtracting the "cbus" base address. This leads to a problem
where of_iomap inside the irq-meson-gpio driver fails because it
actually tries to map 0x182209880 (cbus base = 0xc1100000 + 0xc1109880
for the GPIO interrupt controller). Fix this by using 0x9880 as register
offset.

Fixes: 7d32bc03bcfb ("ARM: dts: meson8b: enable gpio interrupt controller")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm/boot/dts/meson.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/meson.dtsi b/arch/arm/boot/dts/meson.dtsi
index b750c837ec39..0d9faf1a51ea 100644
--- a/arch/arm/boot/dts/meson.dtsi
+++ b/arch/arm/boot/dts/meson.dtsi
@@ -184,7 +184,7 @@
 
 			gpio_intc: interrupt-controller at 9880 {
 				compatible = "amlogic,meson-gpio-intc";
-				reg = <0xc1109880 0x10>;
+				reg = <0x9880 0x10>;
 				interrupt-controller;
 				#interrupt-cells = <2>;
 				amlogic,channel-interrupts = <64 65 66 67 68 69 70 71>;
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 0/2] ARM: dts: meson: GPIO interrupt fixes for v4.15
  2017-10-29 23:17 [PATCH 0/2] ARM: dts: meson: GPIO interrupt fixes for v4.15 Martin Blumenstingl
  2017-10-29 23:17 ` [PATCH 1/2] ARM: dts: meson: correct the sort order for the the gpio_intc node Martin Blumenstingl
  2017-10-29 23:17 ` [PATCH 2/2] ARM: dts: meson: fix the memory region of the GPIO interrupt controller Martin Blumenstingl
@ 2017-10-31 10:02 ` Jerome Brunet
  2017-11-27 23:38   ` Kevin Hilman
  2 siblings, 1 reply; 5+ messages in thread
From: Jerome Brunet @ 2017-10-31 10:02 UTC (permalink / raw)
  To: linus-amlogic

On Mon, 2017-10-30 at 00:17 +0100, Martin Blumenstingl wrote:
> This provides two small fixes for the GPIO interrupt support on the
> 32-bit Meson SoCs.
> 
> The first change is purely cosmetic - I still decided to include to it
> because it keeps the sort order consistent. Also it's easier to find
> the node if you can rely on the sorting to be consistent.
> 
> The second patch however is required to make the GPIO interrupt
> controller functional on Meson8b. Without this the driver simply fails
> during the of_iomap call - and as a result of that GPIO interrupts are
> unavailable.
> 

Acked-by: Jerome Brunet <jbrunet@baylibre.com>

And thanks for catching this early !

> 
> Martin Blumenstingl (2):
>   ARM: dts: meson: correct the sort order for the the gpio_intc node
>   ARM: dts: meson: fix the memory region of the GPIO interrupt
>     controller
> 
>  arch/arm/boot/dts/meson.dtsi | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 0/2] ARM: dts: meson: GPIO interrupt fixes for v4.15
  2017-10-31 10:02 ` [PATCH 0/2] ARM: dts: meson: GPIO interrupt fixes for v4.15 Jerome Brunet
@ 2017-11-27 23:38   ` Kevin Hilman
  0 siblings, 0 replies; 5+ messages in thread
From: Kevin Hilman @ 2017-11-27 23:38 UTC (permalink / raw)
  To: linus-amlogic

Jerome Brunet <jbrunet@baylibre.com> writes:

> On Mon, 2017-10-30 at 00:17 +0100, Martin Blumenstingl wrote:
>> This provides two small fixes for the GPIO interrupt support on the
>> 32-bit Meson SoCs.
>> 
>> The first change is purely cosmetic - I still decided to include to it
>> because it keeps the sort order consistent. Also it's easier to find
>> the node if you can rely on the sorting to be consistent.
>> 
>> The second patch however is required to make the GPIO interrupt
>> controller functional on Meson8b. Without this the driver simply fails
>> during the of_iomap call - and as a result of that GPIO interrupts are
>> unavailable.
>> 
>
> Acked-by: Jerome Brunet <jbrunet@baylibre.com>
>
> And thanks for catching this early !

Thanks, adding to v4.15/fixes for v4.15-rc,

Kevin

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-11-27 23:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-29 23:17 [PATCH 0/2] ARM: dts: meson: GPIO interrupt fixes for v4.15 Martin Blumenstingl
2017-10-29 23:17 ` [PATCH 1/2] ARM: dts: meson: correct the sort order for the the gpio_intc node Martin Blumenstingl
2017-10-29 23:17 ` [PATCH 2/2] ARM: dts: meson: fix the memory region of the GPIO interrupt controller Martin Blumenstingl
2017-10-31 10:02 ` [PATCH 0/2] ARM: dts: meson: GPIO interrupt fixes for v4.15 Jerome Brunet
2017-11-27 23:38   ` Kevin Hilman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.