linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-next] arm64: defconfig: Set bcm2835-dma as built-in
@ 2020-01-24 11:17 Nicolas Saenz Julienne
  2020-01-24 11:31 ` Peter Ujfalusi
  2020-01-29  0:50 ` Florian Fainelli
  0 siblings, 2 replies; 7+ messages in thread
From: Nicolas Saenz Julienne @ 2020-01-24 11:17 UTC (permalink / raw)
  To: Peter Ujfalusi, Nicolas Saenz Julienne, Ulf Hansson
  Cc: f.fainelli, Catalin Marinas, linux-kernel, linux-rpi-kernel,
	Will Deacon, linux-arm-kernel

With the introduction of 738987a1d6f1 ("mmc: bcm2835: Use
dma_request_chan() instead dma_request_slave_channel()") sdhost-bcm2835
now waits for its DMA channel to be available when defined in the
device-tree (it would previously default to PIO). Albeit the right
behaviour, the MMC host is needed for booting. So this makes sure the
DMA channel shows up in time.

Fixes: 738987a1d6f1 ("mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel()")
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
---
 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 4631a1190719..905109f6814f 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -683,7 +683,7 @@ CONFIG_RTC_DRV_SNVS=m
 CONFIG_RTC_DRV_IMX_SC=m
 CONFIG_RTC_DRV_XGENE=y
 CONFIG_DMADEVICES=y
-CONFIG_DMA_BCM2835=m
+CONFIG_DMA_BCM2835=y
 CONFIG_DMA_SUN6I=m
 CONFIG_FSL_EDMA=y
 CONFIG_IMX_SDMA=y
-- 
2.25.0


_______________________________________________
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] 7+ messages in thread

* Re: [PATCH for-next] arm64: defconfig: Set bcm2835-dma as built-in
  2020-01-24 11:17 [PATCH for-next] arm64: defconfig: Set bcm2835-dma as built-in Nicolas Saenz Julienne
@ 2020-01-24 11:31 ` Peter Ujfalusi
  2020-01-24 11:51   ` Nicolas Saenz Julienne
  2020-01-29  0:50 ` Florian Fainelli
  1 sibling, 1 reply; 7+ messages in thread
From: Peter Ujfalusi @ 2020-01-24 11:31 UTC (permalink / raw)
  To: Nicolas Saenz Julienne, Ulf Hansson
  Cc: f.fainelli, Catalin Marinas, linux-kernel, linux-rpi-kernel,
	Will Deacon, linux-arm-kernel

Hi Nicolas,

On 24/01/2020 13.17, Nicolas Saenz Julienne wrote:
> With the introduction of 738987a1d6f1 ("mmc: bcm2835: Use
> dma_request_chan() instead dma_request_slave_channel()") sdhost-bcm2835
> now waits for its DMA channel to be available when defined in the
> device-tree (it would previously default to PIO). Albeit the right
> behaviour, the MMC host is needed for booting. So this makes sure the
> DMA channel shows up in time.
> 
> Fixes: 738987a1d6f1 ("mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel()")

it is not a bug, it is a feature ;)

Yes, if a driver have DMA binding and it is needed during boot then the
DMA driver also needs to be built in.
I believe it is desired to use DMA instead of PIO in any case for MMC
and in the past bcm2835 did not used DMA if DMA was module and the MMC
was built in.

Sorry for the inconvenience this change has caused to bcm2835!

Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> ---
>  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 4631a1190719..905109f6814f 100644
> --- a/arch/arm64/configs/defconfig
> +++ b/arch/arm64/configs/defconfig
> @@ -683,7 +683,7 @@ CONFIG_RTC_DRV_SNVS=m
>  CONFIG_RTC_DRV_IMX_SC=m
>  CONFIG_RTC_DRV_XGENE=y
>  CONFIG_DMADEVICES=y
> -CONFIG_DMA_BCM2835=m
> +CONFIG_DMA_BCM2835=y
>  CONFIG_DMA_SUN6I=m
>  CONFIG_FSL_EDMA=y
>  CONFIG_IMX_SDMA=y
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

_______________________________________________
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] 7+ messages in thread

* Re: [PATCH for-next] arm64: defconfig: Set bcm2835-dma as built-in
  2020-01-24 11:31 ` Peter Ujfalusi
@ 2020-01-24 11:51   ` Nicolas Saenz Julienne
  2020-01-24 12:05     ` Peter Ujfalusi
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Saenz Julienne @ 2020-01-24 11:51 UTC (permalink / raw)
  To: Peter Ujfalusi, Ulf Hansson
  Cc: f.fainelli, Catalin Marinas, linux-kernel, linux-rpi-kernel,
	Will Deacon, linux-arm-kernel

Hi Peter,

On Fri Jan 24, 2020 at 1:31 PM, Peter Ujfalusi wrote:
> Hi Nicolas,
>
> On 24/01/2020 13.17, Nicolas Saenz Julienne wrote:
> > With the introduction of 738987a1d6f1 ("mmc: bcm2835: Use
> > dma_request_chan() instead dma_request_slave_channel()") sdhost-bcm2835
> > now waits for its DMA channel to be available when defined in the
> > device-tree (it would previously default to PIO). Albeit the right
> > behaviour, the MMC host is needed for booting. So this makes sure the
> > DMA channel shows up in time.
> > 
> > Fixes: 738987a1d6f1 ("mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel()")
>
> it is not a bug, it is a feature ;)

Agree, I'm just afraid of your series being picked up by a stable
release without this patch. But maybe it's not necessary?

> Yes, if a driver have DMA binding and it is needed during boot then the
> DMA driver also needs to be built in.
> I believe it is desired to use DMA instead of PIO in any case for MMC
> and in the past bcm2835 did not used DMA if DMA was module and the MMC
> was built in.
>
> Sorry for the inconvenience this change has caused to bcm2835!

Not at all :)

> Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

Thanks,
Nicolas

_______________________________________________
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] 7+ messages in thread

* Re: [PATCH for-next] arm64: defconfig: Set bcm2835-dma as built-in
  2020-01-24 11:51   ` Nicolas Saenz Julienne
@ 2020-01-24 12:05     ` Peter Ujfalusi
  2020-01-24 14:47       ` Nicolas Saenz Julienne
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Ujfalusi @ 2020-01-24 12:05 UTC (permalink / raw)
  To: Nicolas Saenz Julienne, Ulf Hansson
  Cc: f.fainelli, Catalin Marinas, linux-kernel, linux-rpi-kernel,
	Will Deacon, linux-arm-kernel



On 24/01/2020 13.51, Nicolas Saenz Julienne wrote:
> Hi Peter,
> 
> On Fri Jan 24, 2020 at 1:31 PM, Peter Ujfalusi wrote:
>> Hi Nicolas,
>>
>> On 24/01/2020 13.17, Nicolas Saenz Julienne wrote:
>>> With the introduction of 738987a1d6f1 ("mmc: bcm2835: Use
>>> dma_request_chan() instead dma_request_slave_channel()") sdhost-bcm2835
>>> now waits for its DMA channel to be available when defined in the
>>> device-tree (it would previously default to PIO). Albeit the right
>>> behaviour, the MMC host is needed for booting. So this makes sure the
>>> DMA channel shows up in time.
>>>
>>> Fixes: 738987a1d6f1 ("mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel()")
>>
>> it is not a bug, it is a feature ;)
> 
> Agree, I'm just afraid of your series being picked up by a stable
> release without this patch. But maybe it's not necessary?

If you need MMC rootfs then the DMA needs to be built in or have initrd
with the modules.
The driver expects to have DMA channel and it is going to wait for it to
appear unless the request fails.

Without moving the DMA as built in and removing the deferred probe
handling form the MMC driver, one can just remove the DMA support from
the mmc-bcm2835 as it is not used at all.

I wonder why this is not signaled by automated boot testing, if any
exists for bcm2835.

>> Yes, if a driver have DMA binding and it is needed during boot then the
>> DMA driver also needs to be built in.
>> I believe it is desired to use DMA instead of PIO in any case for MMC
>> and in the past bcm2835 did not used DMA if DMA was module and the MMC
>> was built in.
>>
>> Sorry for the inconvenience this change has caused to bcm2835!
> 
> Not at all :)
> 
>> Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> 
> Thanks,
> Nicolas
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

_______________________________________________
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] 7+ messages in thread

* Re: [PATCH for-next] arm64: defconfig: Set bcm2835-dma as built-in
  2020-01-24 12:05     ` Peter Ujfalusi
@ 2020-01-24 14:47       ` Nicolas Saenz Julienne
  2020-01-24 18:07         ` Peter Ujfalusi
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Saenz Julienne @ 2020-01-24 14:47 UTC (permalink / raw)
  To: Peter Ujfalusi, Ulf Hansson
  Cc: f.fainelli, Catalin Marinas, linux-kernel, linux-rpi-kernel,
	Will Deacon, linux-arm-kernel

Hi Peter,

On Fri Jan 24, 2020 at 2:05 PM, Peter Ujfalusi wrote:
> On 24/01/2020 13.51, Nicolas Saenz Julienne wrote:
> > Hi Peter,
> > 
> > On Fri Jan 24, 2020 at 1:31 PM, Peter Ujfalusi wrote:
> >> Hi Nicolas,
> >>
> >> On 24/01/2020 13.17, Nicolas Saenz Julienne wrote:
> >>> With the introduction of 738987a1d6f1 ("mmc: bcm2835: Use
> >>> dma_request_chan() instead dma_request_slave_channel()") sdhost-bcm2835
> >>> now waits for its DMA channel to be available when defined in the
> >>> device-tree (it would previously default to PIO). Albeit the right
> >>> behaviour, the MMC host is needed for booting. So this makes sure the
> >>> DMA channel shows up in time.
> >>>
> >>> Fixes: 738987a1d6f1 ("mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel()")
> >>
> >> it is not a bug, it is a feature ;)
> > 
> > Agree, I'm just afraid of your series being picked up by a stable
> > release without this patch. But maybe it's not necessary?
>
> If you need MMC rootfs then the DMA needs to be built in or have initrd
> with the modules.
> The driver expects to have DMA channel and it is going to wait for it to
> appear unless the request fails.
>
> Without moving the DMA as built in and removing the deferred probe
> handling form the MMC driver, one can just remove the DMA support from
> the mmc-bcm2835 as it is not used at all.

Oh sorry, I meant to ask if the 'Fixes:' tag was really needed. The
patch itself is very much needed since not everyone uses initrds in the
RPi world, and we want to keep being compatible as much as possible with
older device-trees.

> I wonder why this is not signaled by automated boot testing, if any
> exists for bcm2835.

Actually now that you mention it, it's failing since today here:
https://kernelci.org/boot/bcm2837-rpi-3-b/

Regards,
Nicolas

_______________________________________________
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] 7+ messages in thread

* Re: [PATCH for-next] arm64: defconfig: Set bcm2835-dma as built-in
  2020-01-24 14:47       ` Nicolas Saenz Julienne
@ 2020-01-24 18:07         ` Peter Ujfalusi
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Ujfalusi @ 2020-01-24 18:07 UTC (permalink / raw)
  To: Nicolas Saenz Julienne, Ulf Hansson
  Cc: f.fainelli, Catalin Marinas, linux-kernel, linux-rpi-kernel,
	Will Deacon, linux-arm-kernel

Hi Nicolas,

On 1/24/20 4:47 PM, Nicolas Saenz Julienne wrote:
>> If you need MMC rootfs then the DMA needs to be built in or have initrd
>> with the modules.
>> The driver expects to have DMA channel and it is going to wait for it to
>> appear unless the request fails.
>>
>> Without moving the DMA as built in and removing the deferred probe
>> handling form the MMC driver, one can just remove the DMA support from
>> the mmc-bcm2835 as it is not used at all.
> 
> Oh sorry, I meant to ask if the 'Fixes:' tag was really needed.

Complements: or Needed-for: would be better, but with the Fixed tag this
patch would be picked in case the dma_request_chan() conversion patch
gets backported for stable.

> The
> patch itself is very much needed since not everyone uses initrds in the
> RPi world, and we want to keep being compatible as much as possible with
> older device-trees.

Sure. Just checked on my RPi with libreELEC that at least they have the
DMA built in, I assume other distros do the same.

It would be great if this patch would make it to linux-next as soon as
it is possible for sure.

>> I wonder why this is not signaled by automated boot testing, if any
>> exists for bcm2835>
> Actually now that you mention it, it's failing since today here:
> https://kernelci.org/boot/bcm2837-rpi-3-b/

Oh, so you can even have a bug report to back this patch ;)

- Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

_______________________________________________
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] 7+ messages in thread

* Re: [PATCH for-next] arm64: defconfig: Set bcm2835-dma as built-in
  2020-01-24 11:17 [PATCH for-next] arm64: defconfig: Set bcm2835-dma as built-in Nicolas Saenz Julienne
  2020-01-24 11:31 ` Peter Ujfalusi
@ 2020-01-29  0:50 ` Florian Fainelli
  1 sibling, 0 replies; 7+ messages in thread
From: Florian Fainelli @ 2020-01-29  0:50 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Nicolas Saenz Julienne, Peter Ujfalusi,
	Ulf Hansson
  Cc: Catalin Marinas, Will Deacon, linux-rpi-kernel, linux-arm-kernel,
	linux-kernel

On Fri, 24 Jan 2020 12:17:00 +0100, Nicolas Saenz Julienne <nsaenzjulienne@suse.de> wrote:
> With the introduction of 738987a1d6f1 ("mmc: bcm2835: Use
> dma_request_chan() instead dma_request_slave_channel()") sdhost-bcm2835
> now waits for its DMA channel to be available when defined in the
> device-tree (it would previously default to PIO). Albeit the right
> behaviour, the MMC host is needed for booting. So this makes sure the
> DMA channel shows up in time.
> 
> Fixes: 738987a1d6f1 ("mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel()")
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> ---

Applied to defconfig-arm64/next, thanks!
--
Florian

_______________________________________________
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] 7+ messages in thread

end of thread, other threads:[~2020-01-29  0:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-24 11:17 [PATCH for-next] arm64: defconfig: Set bcm2835-dma as built-in Nicolas Saenz Julienne
2020-01-24 11:31 ` Peter Ujfalusi
2020-01-24 11:51   ` Nicolas Saenz Julienne
2020-01-24 12:05     ` Peter Ujfalusi
2020-01-24 14:47       ` Nicolas Saenz Julienne
2020-01-24 18:07         ` Peter Ujfalusi
2020-01-29  0:50 ` Florian Fainelli

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).