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

sh-pfc: fix sparse GPIOs for R-Car SoCs

The PFC driver causes the kernel to hang on the R-Car gen2 SoC based boards
when the CPU_ALL_PORT() macro is fixed to reflect the reality, i.e. when the
GPIO space becomes actually sparse. This happens because the _GP_GPIO() macro
includes an indexed initializer which causes the "holes" (array entries filled
with all 0s) between the groups of the existing GPIOs; and the driver can't
cope with that. There seems to be no reason to use the indexed initializer,
so we can remove the index specifier and so avoid the "holes".

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Sergei Shtylyov and committed by
Linus Walleij
61bb3aef 27aa2e3a

+1 -1
+1 -1
drivers/pinctrl/sh-pfc/sh_pfc.h
··· 224 224 225 225 /* PINMUX_GPIO_GP_ALL - Expand to a list of sh_pfc_pin entries */ 226 226 #define _GP_GPIO(bank, _pin, _name, sfx) \ 227 - [(bank * 32) + _pin] = { \ 227 + { \ 228 228 .pin = (bank * 32) + _pin, \ 229 229 .name = __stringify(_name), \ 230 230 .enum_id = _name##_DATA, \