devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: gta04: fix excess dma channel usage
@ 2023-01-13 21:11 Andreas Kemnade
  2023-01-16 14:16 ` Adam Ford
  2023-03-27  8:13 ` Tony Lindgren
  0 siblings, 2 replies; 13+ messages in thread
From: Andreas Kemnade @ 2023-01-13 21:11 UTC (permalink / raw)
  To: bcousson, tony, robh+dt, krzysztof.kozlowski+dt, aford173,
	linux-omap, devicetree, linux-kernel
  Cc: H. Nikolaus Schaller, Andreas Kemnade

From: "H. Nikolaus Schaller" <hns@goldelico.com>

OMAP processors support 32 channels but there is no check or
inspect this except booting a device and looking at dmesg reports
of not available channels.

Recently some more subsystems with DMA (aes1+2) were added filling
the list of dma channels beyond the limit of 32 (even if other
parameters indicate 96 or 128 channels). This leads to random
subsystem failures i(e.g. mcbsp for audio) after boot or boot
messages that DMA can not be initialized.

Another symptom is that

/sys/kernel/debug/dmaengine/summary

has 32 entries and does not show all required channels.

Fix by disabling unused (on the GTA04 hardware) mcspi1...4.
Each SPI channel allocates 4 DMA channels rapidly filling
the available ones.

Disabling unused SPI modules on the OMAP3 SoC may also save
some energy (has not been checked).

Fixes: c312f066314e ("ARM: dts: omap3: Migrate AES from hwmods to sysc-omap2")
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
[re-enabled aes2, improved commit subject line]
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
 arch/arm/boot/dts/omap3-gta04.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
index 87e0ab1bbe95..e0be0fb23f80 100644
--- a/arch/arm/boot/dts/omap3-gta04.dtsi
+++ b/arch/arm/boot/dts/omap3-gta04.dtsi
@@ -612,6 +612,22 @@ &i2c3 {
 	clock-frequency = <100000>;
 };
 
+&mcspi1 {
+	status = "disabled";
+};
+
+&mcspi2 {
+	status = "disabled";
+};
+
+&mcspi3 {
+	status = "disabled";
+};
+
+&mcspi4 {
+	status = "disabled";
+};
+
 &usb_otg_hs {
 	interface-type = <0>;
 	usb-phy = <&usb2_phy>;
-- 
2.30.2


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

end of thread, other threads:[~2024-11-07  9:36 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-13 21:11 [PATCH] ARM: dts: gta04: fix excess dma channel usage Andreas Kemnade
2023-01-16 14:16 ` Adam Ford
2023-01-16 14:51   ` Tony Lindgren
2023-01-16 15:29     ` H. Nikolaus Schaller
2023-01-16 17:00       ` Tony Lindgren
2023-01-16 16:39     ` Andreas Kemnade
2023-01-16 16:56       ` Tony Lindgren
2023-01-16 17:00         ` Adam Ford
2023-01-16 17:08           ` Tony Lindgren
2023-01-19  7:30             ` Tony Lindgren
2023-01-22  9:08               ` Andreas Kemnade
2024-11-07  9:35                 ` Andreas Kemnade
2023-03-27  8:13 ` Tony Lindgren

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