> From: Andy Shevchenko <andy.shevchenko@xxxxxxxxx> > Sent: Wednesday, June 17, 2020 2:16 AM > > On Tue, Jun 16, 2020 at 5:54 AM Aisheng Dong <aisheng.dong@xxxxxxx> > wrote: > > > Could you help apply this patch as it blocked MX7D booting for a while? > > > > This reverts commit ba403242615c2c99e27af7984b1650771a2cc2c9. > > > > > > After commit 26d8cde5260b ("pinctrl: freescale: imx: add shared > > > input select reg support"). i.MX7D has two iomux controllers iomuxc > > > and iomuxc-lpsr which share select_input register for daisy chain settings. > > > If use 'devm_of_iomap()', when probe the iomuxc-lpsr, will call > > > devm_request_mem_region() for the region <0x30330000-0x3033ffff> for > > > the first time. Then, next time when probe the iomuxc, API > > > devm_platform_ioremap_resource() will also use the API > > > devm_request_mem_region() for the share region > > > <0x30330000-0x3033ffff> again, then cause issue, log like below: > > > > > > [ 0.179561] imx7d-pinctrl 302c0000.iomuxc-lpsr: initialized IMX pinctrl > > > driver > > > [ 0.191742] imx7d-pinctrl 30330000.pinctrl: can't request region for > > > resource [mem 0x30330000-0x3033ffff] > > > [ 0.191842] imx7d-pinctrl: probe of 30330000.pinctrl failed with error > -16 > > It means that shared support took a wrong approach. If something has shared > resources, another schema should be used, something like MFD (parent device > which keeps only shared resources). Easiest way is to switch to the regmap API. > I think a bit more, probably it's not worth to do it in order to not break current driver design a lot. LPSR iomux case is bit complicated that only sel input is using the shared memory within another iomuxc. Current approach seems already the easiest and most clean way. Regards Aisheng > P.S. The revert is okay as a quick fix but... see above. > > -- > With Best Regards, > Andy Shevchenko