soc/tegra: Add Tegra PMC clocks registration into PMC driver
authorSowjanya Komatineni <skomatineni@nvidia.com>
Tue, 14 Jan 2020 07:24:13 +0000 (23:24 -0800)
committerThierry Reding <treding@nvidia.com>
Fri, 13 Mar 2020 09:52:53 +0000 (10:52 +0100)
commitbd9638ed8e125482945a13a6d97522560edbc9b9
treee485c1cf590d76c21f9ad50b51a7521af2b86ae4
parentc66a455f05a8cb69ac03d39ffe31ad0c5bd5121c
soc/tegra: Add Tegra PMC clocks registration into PMC driver

Tegra PMC has clk_out_1, clk_out_2, and clk_out_3 clocks and currently
these PMC clocks are registered by Tegra clock driver with each clock as
separate mux and gate clocks using clk_register_mux and clk_register_gate
by passing PMC base address and register offsets and PMC programming for
these clocks happens through direct PMC access by the clock driver.

With this, when PMC is in secure mode any direct PMC access from the
non-secure world does not go through and these clocks will not be
functional.

This patch adds these PMC clocks registration to pmc driver with PMC as
a clock provider and registers each clock as single clock.

clk_ops callback implementations for these clocks uses tegra_pmc_readl and
tegra_pmc_writel which supports PMC programming in both secure mode and
non-secure mode.

Tested-by: Dmitry Osipenko <digetx@gmail.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/soc/tegra/pmc.c