Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: tegra: Fix CBB error during probe()

When Tegra audio drivers are built as part of the kernel image,
TIMEOUT_ERR is observed from cbb-fabric. Following is seen on
Jetson AGX Orin during boot:

[ 8.012482] **************************************
[ 8.017423] CPU:0, Error:cbb-fabric, Errmon:2
[ 8.021922] Error Code : TIMEOUT_ERR
[ 8.025966] Overflow : Multiple TIMEOUT_ERR
[ 8.030644]
[ 8.032175] Error Code : TIMEOUT_ERR
[ 8.036217] MASTER_ID : CCPLEX
[ 8.039722] Address : 0x290a0a8
[ 8.043318] Cache : 0x1 -- Bufferable
[ 8.047630] Protection : 0x2 -- Unprivileged, Non-Secure, Data Access
[ 8.054628] Access_Type : Write

[ 8.106130] WARNING: CPU: 0 PID: 124 at drivers/soc/tegra/cbb/tegra234-cbb.c:604 tegra234_cbb_isr+0x134/0x178

[ 8.240602] Call trace:
[ 8.243126] tegra234_cbb_isr+0x134/0x178
[ 8.247261] __handle_irq_event_percpu+0x60/0x238
[ 8.252132] handle_irq_event+0x54/0xb8

These errors happen when MVC device, which is a child of AHUB
device, tries to access its device registers. This happens as
part of call tegra210_mvc_reset_vol_settings() in MVC device
probe().

The root cause of this problem is, the child MVC device gets
probed before the AHUB clock gets enabled. The AHUB clock is
enabled in runtime PM resume of parent AHUB device and due to
the wrong sequence of pm_runtime_enable() in AHUB driver,
runtime PM resume doesn't happen for AHUB device when MVC makes
register access.

Fix this by calling pm_runtime_enable() for parent AHUB device
before of_platform_populate() in AHUB driver. This ensures that
clock becomes available when MVC makes register access.

Fixes: 16e1bcc2caf4 ("ASoC: tegra: Add Tegra210 based AHUB driver")
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Signed-off-by: Ritu Chaudhary <rituc@nvidia.com>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://patch.msgid.link/20240823144342.4123814-3-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Mohan Kumar and committed by
Mark Brown
6781b962 b4a90b54

+7 -5
+7 -5
sound/soc/tegra/tegra210_ahub.c
··· 2 2 // 3 3 // tegra210_ahub.c - Tegra210 AHUB driver 4 4 // 5 - // Copyright (c) 2020-2022, NVIDIA CORPORATION. All rights reserved. 5 + // Copyright (c) 2020-2024, NVIDIA CORPORATION. All rights reserved. 6 6 7 7 #include <linux/clk.h> 8 8 #include <linux/device.h> ··· 1391 1391 return err; 1392 1392 } 1393 1393 1394 - err = of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev); 1395 - if (err) 1396 - return err; 1397 - 1398 1394 pm_runtime_enable(&pdev->dev); 1395 + 1396 + err = of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev); 1397 + if (err) { 1398 + pm_runtime_disable(&pdev->dev); 1399 + return err; 1400 + } 1399 1401 1400 1402 return 0; 1401 1403 }