All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: cpcap: Fix cpcap dmamask not set warnings
@ 2021-05-22  5:10 Tony Lindgren
  2021-06-01 14:55 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Tony Lindgren @ 2021-05-22  5:10 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, Carl Philipp Klemm, Ivan Jelincic, Merlijn Wajer,
	Pavel Machek, Sebastian Reichel, Sicelo A . Mhlongo

We have started to get a bunch of pointless dmamask not set warnings
that makes the output of dmesg -l err,warn hard to read with many
extra warnings:

cpcap-regulator cpcap-regulator.0: DMA mask not set
cpcap_adc cpcap_adc.0: DMA mask not set
cpcap_battery cpcap_battery.0: DMA mask not set
cpcap-charger cpcap-charger.0: DMA mask not set
cpcap-pwrbutton cpcap-pwrbutton.0: DMA mask not set
cpcap-led cpcap-led.0: DMA mask not set
cpcap-led cpcap-led.1: DMA mask not set
cpcap-led cpcap-led.2: DMA mask not set
cpcap-led cpcap-led.3: DMA mask not set
cpcap-led cpcap-led.4: DMA mask not set
cpcap-rtc cpcap-rtc.0: DMA mask not set
cpcap-usb-phy cpcap-usb-phy.0: DMA mask not set

This seems to have started with commit 4d8bde883bfb ("OF: Don't set
default coherent DMA mask"). We have the parent SPI controller use
DMA, while CPCAP driver and it's children do not. For audio, the
DMA is handled over I2S bus with the McBSP driver.

Cc: Carl Philipp Klemm <philipp@uvos.xyz>
Cc: Ivan Jelincic <parazyd@dyne.org>
Cc: Merlijn Wajer <merlijn@wizzup.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: Sicelo A. Mhlongo <absicsz@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/mfd/motorola-cpcap.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mfd/motorola-cpcap.c b/drivers/mfd/motorola-cpcap.c
--- a/drivers/mfd/motorola-cpcap.c
+++ b/drivers/mfd/motorola-cpcap.c
@@ -327,6 +327,10 @@ static int cpcap_probe(struct spi_device *spi)
 	if (ret)
 		return ret;
 
+	/* Parent SPI controller uses DMA, CPCAP and child devices do not */
+	spi->dev.coherent_dma_mask = 0;
+	spi->dev.dma_mask = &spi->dev.coherent_dma_mask;
+
 	return devm_mfd_add_devices(&spi->dev, 0, cpcap_mfd_devices,
 				    ARRAY_SIZE(cpcap_mfd_devices), NULL, 0, NULL);
 }
-- 
2.31.1

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

* Re: [PATCH] mfd: cpcap: Fix cpcap dmamask not set warnings
  2021-05-22  5:10 [PATCH] mfd: cpcap: Fix cpcap dmamask not set warnings Tony Lindgren
@ 2021-06-01 14:55 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2021-06-01 14:55 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-kernel, Carl Philipp Klemm, Ivan Jelincic, Merlijn Wajer,
	Pavel Machek, Sebastian Reichel, Sicelo A . Mhlongo

On Sat, 22 May 2021, Tony Lindgren wrote:

> We have started to get a bunch of pointless dmamask not set warnings
> that makes the output of dmesg -l err,warn hard to read with many
> extra warnings:
> 
> cpcap-regulator cpcap-regulator.0: DMA mask not set
> cpcap_adc cpcap_adc.0: DMA mask not set
> cpcap_battery cpcap_battery.0: DMA mask not set
> cpcap-charger cpcap-charger.0: DMA mask not set
> cpcap-pwrbutton cpcap-pwrbutton.0: DMA mask not set
> cpcap-led cpcap-led.0: DMA mask not set
> cpcap-led cpcap-led.1: DMA mask not set
> cpcap-led cpcap-led.2: DMA mask not set
> cpcap-led cpcap-led.3: DMA mask not set
> cpcap-led cpcap-led.4: DMA mask not set
> cpcap-rtc cpcap-rtc.0: DMA mask not set
> cpcap-usb-phy cpcap-usb-phy.0: DMA mask not set
> 
> This seems to have started with commit 4d8bde883bfb ("OF: Don't set
> default coherent DMA mask"). We have the parent SPI controller use
> DMA, while CPCAP driver and it's children do not. For audio, the
> DMA is handled over I2S bus with the McBSP driver.
> 
> Cc: Carl Philipp Klemm <philipp@uvos.xyz>
> Cc: Ivan Jelincic <parazyd@dyne.org>
> Cc: Merlijn Wajer <merlijn@wizzup.org>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: Sebastian Reichel <sre@kernel.org>
> Cc: Sicelo A. Mhlongo <absicsz@gmail.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  drivers/mfd/motorola-cpcap.c | 4 ++++
>  1 file changed, 4 insertions(+)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2021-06-01 14:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-22  5:10 [PATCH] mfd: cpcap: Fix cpcap dmamask not set warnings Tony Lindgren
2021-06-01 14:55 ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.