The Tegra PMC has accumulated a bit of cruft over the years. Most of the legacy code has since been replaced by standard APIs, but for certain 32 bit platforms we cannot get rid of all remnants, unfortunately.
In addition, future SoC generations can have multiple instances of the PMC, making some of the old APIs unusable. Preliminary work was merged recently to allow passing a PMC instance to the custom PMC APIs to solve this problem. This series of patches is a final cleanup pass that makes use of the new APIs in existing drivers. At the end of the series, only some old 32-bit support code will use the old APIs, so they can be made exclusive to the 32-bit ARM builds (which is about as good as it's going to get). Note that the first 6 patches can be applied to subsystem trees independently since they only rely on patches that were merged into 7.0. Patch 8 depends on these patches being applied, so some coordination is needed. The simplest solution would probably be to merge them all through the Tegra tree, if everyone agrees. Otherwise, maintainers should feel free to apply patches to their subsystems and I'll monitor things and apply the last three patches once all others have landed. Thanks, Thierry Signed-off-by: Thierry Reding <[email protected]> --- Thierry Reding (9): ata: ahci_tegra: Explicitly specify PMC instance to use drm/nouveau: tegra: Explicitly specify PMC instance to use drm/tegra: Explicitly specify PMC instance to use media: vde: Explicitly specify PMC instance to use PCI: tegra: Explicitly specify PMC instance to use usb: xhci: tegra: Explicitly specify PMC instance to use soc/tegra: pmc: Create PMC context dynamically soc/tegra: pmc: Remove unused legacy functions soc/tegra: pmc: Move legacy code behind CONFIG_ARM guard drivers/ata/ahci_tegra.c | 17 +- drivers/gpu/drm/nouveau/include/nvkm/core/tegra.h | 2 + drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 9 +- drivers/gpu/drm/tegra/dc.c | 14 +- drivers/gpu/drm/tegra/dc.h | 1 + drivers/gpu/drm/tegra/gr3d.c | 9 +- drivers/gpu/drm/tegra/sor.c | 16 +- drivers/media/platform/nvidia/tegra-vde/vde.c | 15 +- drivers/media/platform/nvidia/tegra-vde/vde.h | 1 + drivers/pci/controller/pci-tegra.c | 20 +- drivers/soc/tegra/pmc.c | 412 +++++++++------------ drivers/usb/host/xhci-tegra.c | 38 +- include/soc/tegra/pmc.h | 81 +--- 13 files changed, 305 insertions(+), 330 deletions(-) --- base-commit: 7fd2df204f342fc17d1a0bfcd474b24232fb0f32 change-id: 20260506-pmc-42ed4ce76ee5 Best regards, -- Thierry Reding <[email protected]>
