mfd: cpcap: Fix cpcap dmamask not set warnings
PATCH 1/1 mfd: cpcap: Fix cpcap dmamask not set warnings
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.
--- drivers/mfd/motorola-cpcap.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/mfd/motorola-cpcap.c +4 -0
@@ -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 ); }
Signature · 1 line
2.31.1
Lee Jones
AppliedQuoted 29 lines · Tony Lindgren
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_adccpcap_adc.0: DMA mask not setcpcap_batterycpcap_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 setThis 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 <[email protected]>Cc Ivan Jelincic <[email protected]>Cc Merlijn Wajer <[email protected]>Cc Pavel Machek <[email protected]>Cc Sebastian Reichel <[email protected]>Cc Sicelo A. Mhlongo <[email protected]>Signed-off-by Tony Lindgren <[email protected]>
Quoted 3 lines
--- drivers/mfd/motorola-cpcap.c | 4 ++++ 1 file changed, 4 insertions(+)
Applied, thanks.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog