diff mbox series

[v1,05/14] arm64: defconfig: build imx-sdma as a module

Message ID 20220107180314.1816515-6-marcel@ziswiler.com (mailing list archive)
State New, archived
Headers show
Series arm64: prepare and add verdin imx8m mini support | expand

Commit Message

Marcel Ziswiler Jan. 7, 2022, 6:03 p.m. UTC
From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

This avoids firmware load error and sysfs fallback reported as follows:

[    0.199448] imx-sdma 302c0000.dma-controller: Direct firmware load
 for imx/sdma/sdma-imx7d.bin failed with error -2
[    0.199487] imx-sdma 302c0000.dma-controller: Falling back to sysfs
 fallback for: imx/sdma/sdma-imx7d.bin

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
---

 arch/arm64/configs/defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefan Wahren Jan. 13, 2022, 6:42 p.m. UTC | #1
Hi Marcel,

Am 07.01.22 um 19:03 schrieb Marcel Ziswiler:
> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>
> This avoids firmware load error and sysfs fallback reported as follows:
>
> [    0.199448] imx-sdma 302c0000.dma-controller: Direct firmware load
>  for imx/sdma/sdma-imx7d.bin failed with error -2
> [    0.199487] imx-sdma 302c0000.dma-controller: Falling back to sysfs
>  fallback for: imx/sdma/sdma-imx7d.bin

unfortunately this isn't an explanation why this solve the issue. It
looks like that the SDMA firmware is not available for the kernel. Build
the driver as a module hide the issue and just load it if the rootfs is
available.

What makes you sure that the driver is not critical for other boards
during boot?

Best regards

>
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> ---
>
>  arch/arm64/configs/defconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> index 3c8106c5776a..a18785a827dc 100644
> --- a/arch/arm64/configs/defconfig
> +++ b/arch/arm64/configs/defconfig
> @@ -915,7 +915,7 @@ CONFIG_DMADEVICES=y
>  CONFIG_DMA_BCM2835=y
>  CONFIG_DMA_SUN6I=m
>  CONFIG_FSL_EDMA=y
> -CONFIG_IMX_SDMA=y
> +CONFIG_IMX_SDMA=m
>  CONFIG_K3_DMA=y
>  CONFIG_MV_XOR=y
>  CONFIG_MV_XOR_V2=y
Marcel Ziswiler Jan. 14, 2022, 1:39 p.m. UTC | #2
Hi Stefan

On Thu, 2022-01-13 at 19:42 +0100, Stefan Wahren wrote:
> Hi Marcel,
> 
> Am 07.01.22 um 19:03 schrieb Marcel Ziswiler:
> > From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > 
> > This avoids firmware load error and sysfs fallback reported as follows:
> > 
> > [    0.199448] imx-sdma 302c0000.dma-controller: Direct firmware load
> >  for imx/sdma/sdma-imx7d.bin failed with error -2
> > [    0.199487] imx-sdma 302c0000.dma-controller: Falling back to sysfs
> >  fallback for: imx/sdma/sdma-imx7d.bin
> 
> unfortunately this isn't an explanation why this solve the issue. It
> looks like that the SDMA firmware is not available for the kernel. Build
> the driver as a module hide the issue and just load it if the rootfs is
> available.

Well, it seems to default to some built-in firmware which, unfortunately, might have some severe known errata
anyway.

> What makes you sure that the driver is not critical for other boards
> during boot?

That is a good question. I remember that there was some more discussion back when I proposed the same change
for imx_v6_v7_defconfig in the 32-bit Arm world. While nobody was able to fully answer it all it did get
accepted by the i.MX maintainer back in the day [1]. I will mention that in v2.

[1] https://lore.kernel.org/lkml/20210920144938.314588-6-marcel@ziswiler.com/

Thanks for your review.

> Best regards
> 
> > 
> > Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > ---
> > 
> >  arch/arm64/configs/defconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> > index 3c8106c5776a..a18785a827dc 100644
> > --- a/arch/arm64/configs/defconfig
> > +++ b/arch/arm64/configs/defconfig
> > @@ -915,7 +915,7 @@ CONFIG_DMADEVICES=y
> >  CONFIG_DMA_BCM2835=y
> >  CONFIG_DMA_SUN6I=m
> >  CONFIG_FSL_EDMA=y
> > -CONFIG_IMX_SDMA=y
> > +CONFIG_IMX_SDMA=m
> >  CONFIG_K3_DMA=y
> >  CONFIG_MV_XOR=y
> >  CONFIG_MV_XOR_V2=y

Cheers

Marcel
Stefan Wahren Jan. 14, 2022, 4:24 p.m. UTC | #3
Hi Marcel,

Am 14.01.22 um 14:39 schrieb Marcel Ziswiler:
> Hi Stefan
>
> On Thu, 2022-01-13 at 19:42 +0100, Stefan Wahren wrote:
>> Hi Marcel,
>>
>> Am 07.01.22 um 19:03 schrieb Marcel Ziswiler:
>>> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>>>
>>> This avoids firmware load error and sysfs fallback reported as follows:
>>>
>>> [    0.199448] imx-sdma 302c0000.dma-controller: Direct firmware load
>>>  for imx/sdma/sdma-imx7d.bin failed with error -2
>>> [    0.199487] imx-sdma 302c0000.dma-controller: Falling back to sysfs
>>>  fallback for: imx/sdma/sdma-imx7d.bin
>> unfortunately this isn't an explanation why this solve the issue. It
>> looks like that the SDMA firmware is not available for the kernel. Build
>> the driver as a module hide the issue and just load it if the rootfs is
>> available.
> Well, it seems to default to some built-in firmware which, unfortunately, might have some severe known errata
> anyway.
can you please explain what you mean with built-in firmware? AFAIK there
is a firmware in the SoC ROM, but there is also the option to append
firmware files to the kernel image (regardless of initramfs and so on).
For instance the NXP vendor kernel of the i.MX6ULL (uses the same driver
with a different firmware file) appended the necessary firmware per
default. But yes, the external firmware should be preferred.
>
>> What makes you sure that the driver is not critical for other boards
>> during boot?
> That is a good question. I remember that there was some more discussion back when I proposed the same change
> for imx_v6_v7_defconfig in the 32-bit Arm world. While nobody was able to fully answer it all it did get
> accepted by the i.MX maintainer back in the day [1]. I will mention that in v2.

Okay, in this case the change should be fine.

Thanks

>
> [1] https://lore.kernel.org/lkml/20210920144938.314588-6-marcel@ziswiler.com/
>
> Thanks for your review.
>
>> Best regards
>>
>>> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>>> ---
>>>
>>>  arch/arm64/configs/defconfig | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
>>> index 3c8106c5776a..a18785a827dc 100644
>>> --- a/arch/arm64/configs/defconfig
>>> +++ b/arch/arm64/configs/defconfig
>>> @@ -915,7 +915,7 @@ CONFIG_DMADEVICES=y
>>>  CONFIG_DMA_BCM2835=y
>>>  CONFIG_DMA_SUN6I=m
>>>  CONFIG_FSL_EDMA=y
>>> -CONFIG_IMX_SDMA=y
>>> +CONFIG_IMX_SDMA=m
>>>  CONFIG_K3_DMA=y
>>>  CONFIG_MV_XOR=y
>>>  CONFIG_MV_XOR_V2=y
> Cheers
>
> Marcel
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Marcel Ziswiler Jan. 14, 2022, 4:30 p.m. UTC | #4
Hi Stefan

On Fri, 2022-01-14 at 17:24 +0100, Stefan Wahren wrote:
> Hi Marcel,
> 
> Am 14.01.22 um 14:39 schrieb Marcel Ziswiler:
> > Hi Stefan
> > 
> > On Thu, 2022-01-13 at 19:42 +0100, Stefan Wahren wrote:
> > > Hi Marcel,
> > > 
> > > Am 07.01.22 um 19:03 schrieb Marcel Ziswiler:
> > > > From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > > > 
> > > > This avoids firmware load error and sysfs fallback reported as follows:
> > > > 
> > > > [    0.199448] imx-sdma 302c0000.dma-controller: Direct firmware load
> > > >  for imx/sdma/sdma-imx7d.bin failed with error -2
> > > > [    0.199487] imx-sdma 302c0000.dma-controller: Falling back to sysfs
> > > >  fallback for: imx/sdma/sdma-imx7d.bin
> > > unfortunately this isn't an explanation why this solve the issue. It
> > > looks like that the SDMA firmware is not available for the kernel. Build
> > > the driver as a module hide the issue and just load it if the rootfs is
> > > available.
> > Well, it seems to default to some built-in firmware which, unfortunately, might have some severe known
> > errata
> > anyway.
> can you please explain what you mean with built-in firmware? AFAIK there
> is a firmware in the SoC ROM, but there is also the option to append
> firmware files to the kernel image (regardless of initramfs and so on).

Yes, sorry. I should have worded it differently. I really meant the one that comes with the SoC ROM.

And yes, it may be appended to the kernel image but that would require changes to how one goes about building
it which, at that time, one could simply also change that configuration.

However, for a generic case, like I assume this defconfig is supposed to be used, having it as a module seems
much more straight forward.

> For instance the NXP vendor kernel of the i.MX6ULL (uses the same driver
> with a different firmware file) appended the necessary firmware per
> default.

Yes, we know all about those "great" vendor kernels ;-p.

> But yes, the external firmware should be preferred.
> > 
> > > What makes you sure that the driver is not critical for other boards
> > > during boot?
> > That is a good question. I remember that there was some more discussion back when I proposed the same
> > change
> > for imx_v6_v7_defconfig in the 32-bit Arm world. While nobody was able to fully answer it all it did get
> > accepted by the i.MX maintainer back in the day [1]. I will mention that in v2.
> 
> Okay, in this case the change should be fine.
> 
> Thanks

Thank you.

> > [1] https://lore.kernel.org/lkml/20210920144938.314588-6-marcel@ziswiler.com/
> > 
> > Thanks for your review.
> > 
> > > Best regards
> > > 
> > > > Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > > > ---
> > > > 
> > > >  arch/arm64/configs/defconfig | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> > > > index 3c8106c5776a..a18785a827dc 100644
> > > > --- a/arch/arm64/configs/defconfig
> > > > +++ b/arch/arm64/configs/defconfig
> > > > @@ -915,7 +915,7 @@ CONFIG_DMADEVICES=y
> > > >  CONFIG_DMA_BCM2835=y
> > > >  CONFIG_DMA_SUN6I=m
> > > >  CONFIG_FSL_EDMA=y
> > > > -CONFIG_IMX_SDMA=y
> > > > +CONFIG_IMX_SDMA=m
> > > >  CONFIG_K3_DMA=y
> > > >  CONFIG_MV_XOR=y
> > > >  CONFIG_MV_XOR_V2=y
> > Cheers
> > 
> > Marcel
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Cheers

Marcel
diff mbox series

Patch

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 3c8106c5776a..a18785a827dc 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -915,7 +915,7 @@  CONFIG_DMADEVICES=y
 CONFIG_DMA_BCM2835=y
 CONFIG_DMA_SUN6I=m
 CONFIG_FSL_EDMA=y
-CONFIG_IMX_SDMA=y
+CONFIG_IMX_SDMA=m
 CONFIG_K3_DMA=y
 CONFIG_MV_XOR=y
 CONFIG_MV_XOR_V2=y