linux-loongson/drivers/soc
Jon Hunter b6bcbce335 soc/tegra: pmc: Ensure power-domains are in a known state
After commit 13a4b7fb62 ("pmdomain: core: Leave powered-on genpds on
until late_initcall_sync") was applied, the Tegra210 Jetson TX1 board
failed to boot. Looking into this issue, before this commit was applied,
if any of the Tegra power-domains were in 'on' state when the kernel
booted, they were being turned off by the genpd core before any driver
had chance to request them. This was purely by luck and a consequence of
the power-domains being turned off earlier during boot. After this
commit was applied, any power-domains in the 'on' state are kept on for
longer during boot and therefore, may never transitioned to the off
state before they are requested/used. The hang on the Tegra210 Jetson
TX1 is caused because devices in some power-domains are accessed without
the power-domain being turned off and on, indicating that the
power-domain is not in a completely on state.

>From reviewing the Tegra PMC driver code, if a power-domain is in the
'on' state there is no guarantee that all the necessary clocks
associated with the power-domain are on and even if they are they would
not have been requested via the clock framework and so could be turned
off later. Some power-domains also have a 'clamping' register that needs
to be configured as well. In short, if a power-domain is already 'on' it
is difficult to know if it has been configured correctly. Given that the
power-domains happened to be switched off during boot previously, to
ensure that they are in a good known state on boot, fix this by
switching off any power-domains that are on initially when registering
the power-domains with the genpd framework.

Note that commit 05cfb988a4 ("soc/tegra: pmc: Initialise resets
associated with a power partition") updated the
tegra_powergate_of_get_resets() function to pass the 'off' to ensure
that the resets for the power-domain are in the correct state on boot.
However, now that we may power off a domain on boot, if it is on, it is
better to move this logic into the tegra_powergate_add() function so
that there is a single place where we are handling the initial state of
the power-domain.

Fixes: a38045121b ("soc/tegra: pmc: Add generic PM domain support")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250731121832.213671-1-jonathanh@nvidia.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-08-11 12:24:43 +02:00
..
amlogic soc: amlogic: clk-measure: Add support for S4 2025-04-22 14:15:19 +02:00
apple soc: apple: rtkit: Make shmem_destroy optional 2025-07-24 09:47:33 +01:00
aspeed soc: aspeed: lpc-snoop: Lift channel config to const structs 2025-07-08 11:35:07 +09:30
atmel ARM: at91: Add Support in SoC driver for SAMA7D65 2025-02-24 12:16:28 +02:00
bcm
canaan soc: canaan: Deprecate SOC_CANAAN and use SOC_CANAAN_K210 for K210 2024-04-05 16:42:50 +01:00
cirrus soc: ep93xx: drop reference to removed EP93XX_SOC_COMMON config 2024-09-26 12:58:18 +00:00
dove A set of cleanups for the generic interrupt subsystem: 2025-05-27 08:07:32 -07:00
fsl treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
fujitsu soc: Switch back to struct platform_driver::remove() 2024-11-01 17:08:57 +01:00
gemini
hisilicon soc: hisilicon: kunpeng_hccs: Fix incorrect log information 2025-07-18 07:27:26 +00:00
imx soc: imx8m: Dump higher 64bits UID 2025-05-09 18:16:28 +08:00
ixp4xx soc: Switch back to struct platform_driver::remove() 2024-11-01 17:08:57 +01:00
lantiq
litex drivers/soc/litex: Use devm_register_restart_handler() 2025-01-19 14:05:35 -05:00
loongson soc: loongson: loongson2_guts: Add check for devm_kstrdup() 2025-02-20 22:29:05 +01:00
mediatek soc: mediatek: mtk-mutex: Fix confusing usage of MUTEX_MOD2 2025-06-25 15:59:00 +02:00
microchip soc: Switch back to struct platform_driver::remove() 2024-11-01 17:08:57 +01:00
nuvoton
pxa soc: Switch back to struct platform_driver::remove() 2024-11-01 17:08:57 +01:00
qcom drm for 6.17-rc1 2025-07-30 19:26:49 -07:00
renesas treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
rockchip soc: Switch back to struct platform_driver::remove() 2024-11-01 17:08:57 +01:00
samsung soc: drivers for 6.16 2025-05-31 07:53:30 -07:00
sophgo soc: sophgo: cv1800: rtcsys: New driver (handling RTC only) 2025-05-07 08:40:02 +08:00
sunxi soc: sunxi: sram: Constify struct regmap_config 2024-07-11 00:47:13 +08:00
tegra soc/tegra: pmc: Ensure power-domains are in a known state 2025-08-11 12:24:43 +02:00
ti arm: Handle KCOV __init vs inline mismatches 2025-07-21 21:43:39 -07:00
ux500
versatile soc: versatile: enable compile testing 2024-08-30 15:40:11 +02:00
vt8500 soc: Add VIA/WonderMedia SoC identification driver 2025-05-04 19:27:01 +02:00
xilinx arm64: ZynqMP SoC changes for 6.13 2024-11-04 14:31:16 +01:00
Kconfig RISC-V SoC for v6.16 2025-05-21 19:25:08 +02:00
Makefile RISC-V SoC for v6.16 2025-05-21 19:25:08 +02:00