soc/tegra: pmc: Update scratch as an optional aperture
authorPetlozu Pravareshwar <petlozup@nvidia.com>
Sun, 11 Feb 2024 17:17:27 +0000 (17:17 +0000)
committerThierry Reding <treding@nvidia.com>
Fri, 16 Feb 2024 11:17:55 +0000 (12:17 +0100)
commitccd8e76fdb8d4219097b09660cfc41385e055906
tree2370c42620b2ba0b6bd63f54c612a90125844797
parent6f4429e21a7fef60df80c567eed0af189e2c02c7
soc/tegra: pmc: Update scratch as an optional aperture

Scratch address space register is used to store reboot reason. For
some Tegra234 systems, the scratch space is not available to store
the reboot reason. This is because scratch region on these systems
is not accessible by the kernel as restricted by the Hypervisor.
Such systems would delist scratch aperture from PMC DT node.

Hence this change makes scratch as optional aperture and also avoids
registering reboot notifier if scratch address space isn't mapped.

Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/soc/tegra/pmc.c