ARM: shmobile: r8a73a4: Move pfc node to work around probe ordering bug
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 17 Feb 2015 15:04:43 +0000 (16:04 +0100)
committerSimon Horman <horms+renesas@verge.net.au>
Mon, 23 Feb 2015 21:37:49 +0000 (06:37 +0900)
commite4ba0a9bddff3ba52cec100414d2f178440efc91
treeeef8366235c36441849f36ed66b1ad548510cd32
parenta656c603889c256e3d05e79e57714aa88d179903
ARM: shmobile: r8a73a4: Move pfc node to work around probe ordering bug

Currently the pin function controller (which is also a GPIO controller)
is instantiated before the interrupt controllers due to the order in the
DTS. At that time, the irq domains for the interrupt controllers
referenced by its interrupts-extended property cannot be found yet:

    irq: no irq domain found for /interrupt-controller@e61c0000 !

Nevertheless, the core OF probing code ignores this failure, besides a
debug message that's not normally printed:

    not all legacy IRQ resources mapped for pfc

and continues initialization of the device. Then, the sh-pfc driver
cannot find any IRQ resources, and thinks no interrupts are available,
causing gpio-keys to fail later:

    gpio-keys keyboard: Unable to claim irq 0; error -22
    gpio-keys: probe of keyboard failed with error -22

Move the pin function controller node after the interrupt controller
nodes it references to work around the bug in the core OF probing code.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/boot/dts/r8a73a4.dtsi