From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Kaiser Subject: Re: [PATCH 1/1] pinctrl: imx: fix NO_PAD_CTL setting for MMIO pads Date: Mon, 12 Nov 2018 16:47:55 +0100 Message-ID: <20181112154755.msekhs5xg5ylopkz@viti.kaiser.cx> References: <1542036051-23840-1-git-send-email-aisheng.dong@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1542036051-23840-1-git-send-email-aisheng.dong@nxp.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: "A.s. Dong" Cc: "dongas86@gmail.com" , "linus.walleij@linaro.org" , "stefan@agner.ch" , "linux-gpio@vger.kernel.org" , dl-linux-imx , "kernel@pengutronix.de" , Fabio Estevam , Leonard Crestez , "shawnguo@kernel.org" , "linux-arm-kernel@lists.infradead.org" List-Id: linux-gpio@vger.kernel.org Hi Dong, your patch looks good to me. Thus wrote A.s. Dong (aisheng.dong@nxp.com): > After patch b96eea718bf6 ("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 > Fixes: b96eea718bf6 ("pinctrl: fsl: add scu based pinctrl support") > Reported-by: Martin Kaiser > Suggested-by: Leonard Crestez > Signed-off-by: Dong Aisheng Reviewed-by: Martin Kaiser From mboxrd@z Thu Jan 1 00:00:00 1970 From: martin@kaiser.cx (Martin Kaiser) Date: Mon, 12 Nov 2018 16:47:55 +0100 Subject: [PATCH 1/1] pinctrl: imx: fix NO_PAD_CTL setting for MMIO pads In-Reply-To: <1542036051-23840-1-git-send-email-aisheng.dong@nxp.com> References: <1542036051-23840-1-git-send-email-aisheng.dong@nxp.com> Message-ID: <20181112154755.msekhs5xg5ylopkz@viti.kaiser.cx> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Dong, your patch looks good to me. Thus wrote A.s. Dong (aisheng.dong at nxp.com): > After patch b96eea718bf6 ("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 > Fixes: b96eea718bf6 ("pinctrl: fsl: add scu based pinctrl support") > Reported-by: Martin Kaiser > Suggested-by: Leonard Crestez > Signed-off-by: Dong Aisheng Reviewed-by: Martin Kaiser