[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210719144945.088453122@linuxfoundation.org>
Date: Mon, 19 Jul 2021 16:52:20 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Carl Philipp Klemm <philipp@...s.xyz>,
Ivan Jelincic <parazyd@...e.org>,
Merlijn Wajer <merlijn@...zup.org>,
Pavel Machek <pavel@....cz>,
Sebastian Reichel <sre@...nel.org>,
"Sicelo A. Mhlongo" <absicsz@...il.com>,
Tony Lindgren <tony@...mide.com>,
Lee Jones <lee.jones@...aro.org>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.12 078/292] mfd: cpcap: Fix cpcap dmamask not set warnings
From: Tony Lindgren <tony@...mide.com>
[ Upstream commit 0b7cbe811ca524295ea43d9a4d73d3427e419c54 ]
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@...s.xyz>
Cc: Ivan Jelincic <parazyd@...e.org>
Cc: Merlijn Wajer <merlijn@...zup.org>
Cc: Pavel Machek <pavel@....cz>
Cc: Sebastian Reichel <sre@...nel.org>
Cc: Sicelo A. Mhlongo <absicsz@...il.com>
Signed-off-by: Tony Lindgren <tony@...mide.com>
Signed-off-by: Lee Jones <lee.jones@...aro.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
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
index 30d82bfe5b02..6fb206da2729 100644
--- 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.30.2
Powered by blists - more mailing lists