Skip to content

Commit af8b891

Browse files
tmlindgregkh
authored andcommitted
mfd: cpcap: Fix cpcap dmamask not set warnings
[ Upstream commit 0b7cbe8 ] 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 4d8bde8 ("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> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent d339f6a commit af8b891

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎drivers/mfd/motorola-cpcap.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,10 @@ static int cpcap_probe(struct spi_device *spi)
327327
if (ret)
328328
return ret;
329329

330+
/* Parent SPI controller uses DMA, CPCAP and child devices do not */
331+
spi->dev.coherent_dma_mask = 0;
332+
spi->dev.dma_mask = &spi->dev.coherent_dma_mask;
333+
330334
return devm_mfd_add_devices(&spi->dev, 0, cpcap_mfd_devices,
331335
ARRAY_SIZE(cpcap_mfd_devices), NULL, 0, NULL);
332336
}

0 commit comments

Comments
 (0)