linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: defconfig: Enable FSL_EDMA driver
@ 2019-04-22 18:30 Li Yang
  2019-05-10  3:05 ` Shawn Guo
  0 siblings, 1 reply; 6+ messages in thread
From: Li Yang @ 2019-04-22 18:30 UTC (permalink / raw)
  To: Shawn Guo, Vinod Koul, Grant Likely
  Cc: linux-kernel, linux-arm-kernel, Li Yang

Enables the FSL EDMA driver by default.  This also works around an issue
that imx-i2c driver keeps deferring the probe because of the DMA is not
ready.  And currently the DMA engine framework can not correctly tell
if the DMA channels will truly become available later (it will never be
available if the DMA driver is not enabled).

This will cause indefinite messages like below:
[    3.335829] imx-i2c 2180000.i2c: can't get pinctrl, bus recovery not supported
[    3.344455] ina2xx 0-0040: power monitor ina220 (Rshunt = 1000 uOhm)
[    3.350917] lm90 0-004c: 0-004c supply vcc not found, using dummy regulator
[    3.362089] imx-i2c 2180000.i2c: can't get pinctrl, bus recovery not supported
[    3.370741] ina2xx 0-0040: power monitor ina220 (Rshunt = 1000 uOhm)
[    3.377205] lm90 0-004c: 0-004c supply vcc not found, using dummy regulator
[    3.388455] imx-i2c 2180000.i2c: can't get pinctrl, bus recovery not supported
..... 

Signed-off-by: Li Yang <leoyang.li@nxp.com>
---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 2d9c39033c1a..430e1d7e5497 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -617,6 +617,7 @@ CONFIG_RTC_DRV_TEGRA=y
 CONFIG_RTC_DRV_IMX_SC=m
 CONFIG_RTC_DRV_XGENE=y
 CONFIG_DMADEVICES=y
+CONFIG_FSL_EDMA=y
 CONFIG_DMA_BCM2835=m
 CONFIG_K3_DMA=y
 CONFIG_MV_XOR_V2=y
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: defconfig: Enable FSL_EDMA driver
  2019-04-22 18:30 [PATCH] arm64: defconfig: Enable FSL_EDMA driver Li Yang
@ 2019-05-10  3:05 ` Shawn Guo
  2019-06-12 20:01   ` Li Yang
  0 siblings, 1 reply; 6+ messages in thread
From: Shawn Guo @ 2019-05-10  3:05 UTC (permalink / raw)
  To: Li Yang; +Cc: Vinod Koul, Grant Likely, linux-kernel, linux-arm-kernel

On Mon, Apr 22, 2019 at 01:30:56PM -0500, Li Yang wrote:
> Enables the FSL EDMA driver by default.  This also works around an issue
> that imx-i2c driver keeps deferring the probe because of the DMA is not
> ready.  And currently the DMA engine framework can not correctly tell
> if the DMA channels will truly become available later (it will never be
> available if the DMA driver is not enabled).
> 
> This will cause indefinite messages like below:
> [    3.335829] imx-i2c 2180000.i2c: can't get pinctrl, bus recovery not supported
> [    3.344455] ina2xx 0-0040: power monitor ina220 (Rshunt = 1000 uOhm)
> [    3.350917] lm90 0-004c: 0-004c supply vcc not found, using dummy regulator
> [    3.362089] imx-i2c 2180000.i2c: can't get pinctrl, bus recovery not supported
> [    3.370741] ina2xx 0-0040: power monitor ina220 (Rshunt = 1000 uOhm)
> [    3.377205] lm90 0-004c: 0-004c supply vcc not found, using dummy regulator
> [    3.388455] imx-i2c 2180000.i2c: can't get pinctrl, bus recovery not supported
> ..... 
> 
> Signed-off-by: Li Yang <leoyang.li@nxp.com>

Applied, thanks.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: defconfig: Enable FSL_EDMA driver
  2019-05-10  3:05 ` Shawn Guo
@ 2019-06-12 20:01   ` Li Yang
  2019-06-13  0:45     ` Shawn Guo
  0 siblings, 1 reply; 6+ messages in thread
From: Li Yang @ 2019-06-12 20:01 UTC (permalink / raw)
  To: Shawn Guo, madalin.bucur, Rob Herring, aisheng.dong
  Cc: Vinod Koul, Grant Likely, lkml,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Thu, May 9, 2019 at 10:15 PM Shawn Guo <shawnguo@kernel.org> wrote:
>
> On Mon, Apr 22, 2019 at 01:30:56PM -0500, Li Yang wrote:
> > Enables the FSL EDMA driver by default.  This also works around an issue
> > that imx-i2c driver keeps deferring the probe because of the DMA is not
> > ready.  And currently the DMA engine framework can not correctly tell
> > if the DMA channels will truly become available later (it will never be
> > available if the DMA driver is not enabled).
> >
> > This will cause indefinite messages like below:
> > [    3.335829] imx-i2c 2180000.i2c: can't get pinctrl, bus recovery not supported
> > [    3.344455] ina2xx 0-0040: power monitor ina220 (Rshunt = 1000 uOhm)
> > [    3.350917] lm90 0-004c: 0-004c supply vcc not found, using dummy regulator
> > [    3.362089] imx-i2c 2180000.i2c: can't get pinctrl, bus recovery not supported
> > [    3.370741] ina2xx 0-0040: power monitor ina220 (Rshunt = 1000 uOhm)
> > [    3.377205] lm90 0-004c: 0-004c supply vcc not found, using dummy regulator
> > [    3.388455] imx-i2c 2180000.i2c: can't get pinctrl, bus recovery not supported
> > .....
> >
> > Signed-off-by: Li Yang <leoyang.li@nxp.com>
>
> Applied, thanks.

Hi Shawn,

Is it possible to move this patch to the -fix series so that it can
reach the mainline earlier?  It is having a boot failure in mainline
for platforms using this device without this workaround.

I see Rob added a new API driver_deferred_probe_check_state() last
year.  Probably we should update the imx-i2c driver to use the new API
for optional dependencies to avoid this kind of situation completely?

Regards,
Leo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: defconfig: Enable FSL_EDMA driver
  2019-06-12 20:01   ` Li Yang
@ 2019-06-13  0:45     ` Shawn Guo
  2019-06-13 14:01       ` Leo Li
  0 siblings, 1 reply; 6+ messages in thread
From: Shawn Guo @ 2019-06-13  0:45 UTC (permalink / raw)
  To: Li Yang
  Cc: aisheng.dong, Grant Likely, madalin.bucur, lkml, Vinod Koul,
	Rob Herring,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Wed, Jun 12, 2019 at 03:01:29PM -0500, Li Yang wrote:
> On Thu, May 9, 2019 at 10:15 PM Shawn Guo <shawnguo@kernel.org> wrote:
> >
> > On Mon, Apr 22, 2019 at 01:30:56PM -0500, Li Yang wrote:
> > > Enables the FSL EDMA driver by default.  This also works around an issue
> > > that imx-i2c driver keeps deferring the probe because of the DMA is not
> > > ready.  And currently the DMA engine framework can not correctly tell
> > > if the DMA channels will truly become available later (it will never be
> > > available if the DMA driver is not enabled).
> > >
> > > This will cause indefinite messages like below:
> > > [    3.335829] imx-i2c 2180000.i2c: can't get pinctrl, bus recovery not supported
> > > [    3.344455] ina2xx 0-0040: power monitor ina220 (Rshunt = 1000 uOhm)
> > > [    3.350917] lm90 0-004c: 0-004c supply vcc not found, using dummy regulator
> > > [    3.362089] imx-i2c 2180000.i2c: can't get pinctrl, bus recovery not supported
> > > [    3.370741] ina2xx 0-0040: power monitor ina220 (Rshunt = 1000 uOhm)
> > > [    3.377205] lm90 0-004c: 0-004c supply vcc not found, using dummy regulator
> > > [    3.388455] imx-i2c 2180000.i2c: can't get pinctrl, bus recovery not supported
> > > .....
> > >
> > > Signed-off-by: Li Yang <leoyang.li@nxp.com>
> >
> > Applied, thanks.
> 
> Hi Shawn,
> 
> Is it possible to move this patch to the -fix series so that it can
> reach the mainline earlier?  It is having a boot failure in mainline
> for platforms using this device without this workaround.

Why would I2C device deferring cause boot failure on a platform?  I'm
just trying to understand severity of the problem.

Shawn

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] arm64: defconfig: Enable FSL_EDMA driver
  2019-06-13  0:45     ` Shawn Guo
@ 2019-06-13 14:01       ` Leo Li
  2019-06-18  6:31         ` Shawn Guo
  0 siblings, 1 reply; 6+ messages in thread
From: Leo Li @ 2019-06-13 14:01 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Aisheng Dong, Grant Likely, Madalin-cristian Bucur, wsa, lkml,
	Vinod Koul, Rob Herring,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE



> -----Original Message-----
> From: Shawn Guo <shawnguo@kernel.org>
> Sent: Wednesday, June 12, 2019 7:45 PM
> To: Leo Li <leoyang.li@nxp.com>
> Cc: Madalin-cristian Bucur <madalin.bucur@nxp.com>; Rob Herring
> <robh+dt@kernel.org>; Aisheng Dong <aisheng.dong@nxp.com>; Vinod Koul
> <vkoul@kernel.org>; Grant Likely <grant.likely@arm.com>; moderated
> list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE <linux-arm-
> kernel@lists.infradead.org>; lkml <linux-kernel@vger.kernel.org>
> Subject: Re: [PATCH] arm64: defconfig: Enable FSL_EDMA driver
> 
> On Wed, Jun 12, 2019 at 03:01:29PM -0500, Li Yang wrote:
> > On Thu, May 9, 2019 at 10:15 PM Shawn Guo <shawnguo@kernel.org>
> wrote:
> > >
> > > On Mon, Apr 22, 2019 at 01:30:56PM -0500, Li Yang wrote:
> > > > Enables the FSL EDMA driver by default.  This also works around an
> > > > issue that imx-i2c driver keeps deferring the probe because of the
> > > > DMA is not ready.  And currently the DMA engine framework can not
> > > > correctly tell if the DMA channels will truly become available
> > > > later (it will never be available if the DMA driver is not enabled).
> > > >
> > > > This will cause indefinite messages like below:
> > > > [    3.335829] imx-i2c 2180000.i2c: can't get pinctrl, bus recovery not
> supported
> > > > [    3.344455] ina2xx 0-0040: power monitor ina220 (Rshunt = 1000
> uOhm)
> > > > [    3.350917] lm90 0-004c: 0-004c supply vcc not found, using dummy
> regulator
> > > > [    3.362089] imx-i2c 2180000.i2c: can't get pinctrl, bus recovery not
> supported
> > > > [    3.370741] ina2xx 0-0040: power monitor ina220 (Rshunt = 1000
> uOhm)
> > > > [    3.377205] lm90 0-004c: 0-004c supply vcc not found, using dummy
> regulator
> > > > [    3.388455] imx-i2c 2180000.i2c: can't get pinctrl, bus recovery not
> supported
> > > > .....
> > > >
> > > > Signed-off-by: Li Yang <leoyang.li@nxp.com>
> > >
> > > Applied, thanks.
> >
> > Hi Shawn,
> >
> > Is it possible to move this patch to the -fix series so that it can
> > reach the mainline earlier?  It is having a boot failure in mainline
> > for platforms using this device without this workaround.
> 
> Why would I2C device deferring cause boot failure on a platform?  I'm just
> trying to understand severity of the problem.

Currently the probe of imx-i2c will be retried immediately after it is deferred when the optional dependency on DMA driver is not met.  This will cause an indefinite loop of probe-defer-probe and keep printing the message as shown in the commit message.

On a further look into the imx-i2c driver, it looks like the driver need some fix too.  The requesting of dma channel is done at the very late stage of the imx-i2c probe after registering the i2c adapter.  Adding the i2c adapter triggers the probe of the i2c bus which probably immediately triggers the retry of deferred probe.  This was fine previously as requesting dma channel didn't trigger a defer.  But now it triggers defer after commit e1ab9a468e3b1636d60cebd0a778461270dde208.  We probably should move the i2c_imx_dma_request() to the beginning of the probe as it is considered as a dependency now.

Regards,
Leo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm64: defconfig: Enable FSL_EDMA driver
  2019-06-13 14:01       ` Leo Li
@ 2019-06-18  6:31         ` Shawn Guo
  0 siblings, 0 replies; 6+ messages in thread
From: Shawn Guo @ 2019-06-18  6:31 UTC (permalink / raw)
  To: Leo Li
  Cc: Aisheng Dong, Grant Likely, Madalin-cristian Bucur, wsa, lkml,
	Vinod Koul, Rob Herring,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Thu, Jun 13, 2019 at 02:01:11PM +0000, Leo Li wrote:
> 
> 
> > -----Original Message-----
> > From: Shawn Guo <shawnguo@kernel.org>
> > Sent: Wednesday, June 12, 2019 7:45 PM
> > To: Leo Li <leoyang.li@nxp.com>
> > Cc: Madalin-cristian Bucur <madalin.bucur@nxp.com>; Rob Herring
> > <robh+dt@kernel.org>; Aisheng Dong <aisheng.dong@nxp.com>; Vinod Koul
> > <vkoul@kernel.org>; Grant Likely <grant.likely@arm.com>; moderated
> > list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE <linux-arm-
> > kernel@lists.infradead.org>; lkml <linux-kernel@vger.kernel.org>
> > Subject: Re: [PATCH] arm64: defconfig: Enable FSL_EDMA driver
> > 
> > On Wed, Jun 12, 2019 at 03:01:29PM -0500, Li Yang wrote:
> > > On Thu, May 9, 2019 at 10:15 PM Shawn Guo <shawnguo@kernel.org>
> > wrote:
> > > >
> > > > On Mon, Apr 22, 2019 at 01:30:56PM -0500, Li Yang wrote:
> > > > > Enables the FSL EDMA driver by default.  This also works around an
> > > > > issue that imx-i2c driver keeps deferring the probe because of the
> > > > > DMA is not ready.  And currently the DMA engine framework can not
> > > > > correctly tell if the DMA channels will truly become available
> > > > > later (it will never be available if the DMA driver is not enabled).
> > > > >
> > > > > This will cause indefinite messages like below:
> > > > > [    3.335829] imx-i2c 2180000.i2c: can't get pinctrl, bus recovery not
> > supported
> > > > > [    3.344455] ina2xx 0-0040: power monitor ina220 (Rshunt = 1000
> > uOhm)
> > > > > [    3.350917] lm90 0-004c: 0-004c supply vcc not found, using dummy
> > regulator
> > > > > [    3.362089] imx-i2c 2180000.i2c: can't get pinctrl, bus recovery not
> > supported
> > > > > [    3.370741] ina2xx 0-0040: power monitor ina220 (Rshunt = 1000
> > uOhm)
> > > > > [    3.377205] lm90 0-004c: 0-004c supply vcc not found, using dummy
> > regulator
> > > > > [    3.388455] imx-i2c 2180000.i2c: can't get pinctrl, bus recovery not
> > supported
> > > > > .....
> > > > >
> > > > > Signed-off-by: Li Yang <leoyang.li@nxp.com>
> > > >
> > > > Applied, thanks.
> > >
> > > Hi Shawn,
> > >
> > > Is it possible to move this patch to the -fix series so that it can
> > > reach the mainline earlier?  It is having a boot failure in mainline
> > > for platforms using this device without this workaround.
> > 
> > Why would I2C device deferring cause boot failure on a platform?  I'm just
> > trying to understand severity of the problem.
> 
> Currently the probe of imx-i2c will be retried immediately after it is deferred when the optional dependency on DMA driver is not met.  This will cause an indefinite loop of probe-defer-probe and keep printing the message as shown in the commit message.
> 

Indefinite loop of probe-defer-probe is not a boot failure to me.  But I
will try to send it as fix, and see if arm-soc folk will take it.

Shawn

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-06-18  6:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-22 18:30 [PATCH] arm64: defconfig: Enable FSL_EDMA driver Li Yang
2019-05-10  3:05 ` Shawn Guo
2019-06-12 20:01   ` Li Yang
2019-06-13  0:45     ` Shawn Guo
2019-06-13 14:01       ` Leo Li
2019-06-18  6:31         ` Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).