@@ -291,3 +291,17 @@ int tegra20_clk_prepare_emc_mc_same_freq(struct clk *emc_clk, bool same)
return 0;
}
+
+bool tegra20_clk_emc_on_pllp(void)
+{
+ struct clk *clk = __clk_lookup("emc");
+ struct clk_hw *hw;
+
+ if (clk) {
+ hw = __clk_get_hw(clk);
+
+ return emc_get_parent(hw) == EMC_SRC_PLL_P;
+ }
+
+ return true;
+}
@@ -129,5 +129,6 @@ typedef long (tegra20_clk_emc_round_cb)(unsigned long rate,
void tegra20_clk_set_emc_round_callback(tegra20_clk_emc_round_cb *round_cb,
void *cb_arg);
int tegra20_clk_prepare_emc_mc_same_freq(struct clk *emc_clk, bool same);
+bool tegra20_clk_emc_on_pllp(void);
#endif /* __LINUX_CLK_TEGRA_H_ */
This function will be used by Tegra30 CPUIDLE driver to determine whether CPU could be power-gated. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> --- drivers/clk/tegra/clk-tegra20-emc.c | 14 ++++++++++++++ include/linux/clk/tegra.h | 1 + 2 files changed, 15 insertions(+)