[RESEND,2/2] clk: tegra30: Use Tegra CPU powergate helper function
diff mbox series

Message ID 1543832921-11661-2-git-send-email-jonathanh@nvidia.com
State New
Headers show
Series
  • [RESEND,1/2] clk: tegra: Fix maximum audio sync clock for Tegra124/210
Related show

Commit Message

Jon Hunter Dec. 3, 2018, 10:28 a.m. UTC
Rather than using the tegra_powergate_is_powered() function for
determining if a CPU is powered, use the tegra_pmc_cpu_is_powered()
instead which was created to get the CPU power status. Internally
tegra_pmc_cpu_is_powered() calls tegra_powergate_is_powered() and so
is equivalent.

The Tegra30 clock driver is the only public user of
tegra_powergate_is_powered() and so by updating the Tegra30 clock
driver to use tegra_pmc_cpu_is_powered(), we can then make
tegra_powergate_is_powered() a non-public function.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
---
Resending with Thierry's ACK and CC'ing clock maintainers.

drivers/clk/tegra/clk-tegra30.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Stephen Boyd Dec. 10, 2018, 7:10 p.m. UTC | #1
Quoting Jon Hunter (2018-12-03 02:28:41)
> Rather than using the tegra_powergate_is_powered() function for
> determining if a CPU is powered, use the tegra_pmc_cpu_is_powered()
> instead which was created to get the CPU power status. Internally
> tegra_pmc_cpu_is_powered() calls tegra_powergate_is_powered() and so
> is equivalent.
> 
> The Tegra30 clock driver is the only public user of
> tegra_powergate_is_powered() and so by updating the Tegra30 clock
> driver to use tegra_pmc_cpu_is_powered(), we can then make
> tegra_powergate_is_powered() a non-public function.
> 
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> Acked-by: Thierry Reding <treding@nvidia.com>
> ---

Applied to clk-next

Patch
diff mbox series

diff --git a/drivers/clk/tegra/clk-tegra30.c b/drivers/clk/tegra/clk-tegra30.c
index e0aaecd98fbf..fa8d573ac626 100644
--- a/drivers/clk/tegra/clk-tegra30.c
+++ b/drivers/clk/tegra/clk-tegra30.c
@@ -1148,9 +1148,9 @@  static bool tegra30_cpu_rail_off_ready(void)
 
 	cpu_rst_status = readl(clk_base +
 				TEGRA30_CLK_RST_CONTROLLER_CPU_CMPLX_STATUS);
-	cpu_pwr_status = tegra_powergate_is_powered(TEGRA_POWERGATE_CPU1) ||
-			 tegra_powergate_is_powered(TEGRA_POWERGATE_CPU2) ||
-			 tegra_powergate_is_powered(TEGRA_POWERGATE_CPU3);
+	cpu_pwr_status = tegra_pmc_cpu_is_powered(1) ||
+			 tegra_pmc_cpu_is_powered(2) ||
+			 tegra_pmc_cpu_is_powered(3);
 
 	if (((cpu_rst_status & 0xE) != 0xE) || cpu_pwr_status)
 		return false;