]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: imx: fix NO_PAD_CTL setting for MMIO pads
authorA.s. Dong <aisheng.dong@nxp.com>
Mon, 12 Nov 2018 15:25:48 +0000 (15:25 +0000)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 19 Nov 2018 13:51:42 +0000 (14:51 +0100)
commitcb0805ad87fb84086f8802e1508ad56018610b80
tree1119d8c6a9c9a1656e3b63c977f073b39c30b5b0
parente213292f62cb421760107f8ca6d4626ed3fbf554
pinctrl: imx: fix NO_PAD_CTL setting for MMIO pads

After patch 0c43cf0c5fea ("pinctrl: fsl: add scu based pinctrl support"),
NO_PAD_CTL pads map are not skipped anymore which results in
a possible memory corruption. As we actually only need to create config
maps for SCU pads and MMIO pads which are not using the default config
(a.k.a IMX_NO_PAD_CTL), so let's add a proper check before creating
the config maps. And during MMIO pads parsing, we also need update the
list_p point as SCU case to ensure the pin data next parsed is correct.

Cc: Linus Walleij <linus.walleij@linaro.org>
Fixes: 0c43cf0c5fea ("pinctrl: fsl: add scu based pinctrl support")
Reported-by: Martin Kaiser <martin@kaiser.cx>
Suggested-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Reviewed-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Leonard Crestez <leonard.crestez@nxp.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/freescale/pinctrl-imx.c