uphy: handle utmipll iddq
Subsystems (3)
PATCH 1/1 uphy: handle utmipll iddq
Export utmipll iddq functions. These will be needed when powergating the XUSB partition.
Signed-off-by BH Hsieh <[email protected]>
Signed-off-by Peter De Schrijver <[email protected]>
--- drivers/clk/tegra/clk-tegra210.c | 26 ++++++++++++++++++++++++++ include/linux/clk/tegra.h | 2 ++ 2 files changed, 28 insertions(+)
drivers/clk/tegra/clk-tegra210.c +26 -0
@@ -2313,6 +2313,32 @@ static u32 pll_expo_p_to_pdiv(u32 p, u32 *pdiv) "clk_m" }; +void tegra210_put_utmipll_in_iddq (void ) +{ +u32 reg; + + reg =readl_relaxed (clk_base +UTMIPLL_HW_PWRDN_CFG0 ); + +if (reg &UTMIPLL_HW_PWRDN_CFG0_UTMIPLL_LOCK ) { +pr_err ("trying to assert IDDQ while UTMIPLL is locked\n" ); +return ; + } + + reg |=UTMIPLL_HW_PWRDN_CFG0_IDDQ_OVERRIDE ; +writel_relaxed (reg, clk_base +UTMIPLL_HW_PWRDN_CFG0 ); +} +EXPORT_SYMBOL_GPL (tegra210_put_utmipll_in_iddq); + +void tegra210_put_utmipll_out_iddq (void ) +{ +u32 reg; + + reg =readl_relaxed (clk_base +UTMIPLL_HW_PWRDN_CFG0 ); + reg &= ~UTMIPLL_HW_PWRDN_CFG0_IDDQ_OVERRIDE ; +writel_relaxed (reg, clk_base +UTMIPLL_HW_PWRDN_CFG0 ); +} +EXPORT_SYMBOL_GPL (tegra210_put_utmipll_out_iddq); +static __init void tegra210_periph_clk_init (void __iomem *clk_base,void __iomem *pmc_base) {
include/linux/clk/tegra.h +2 -0
@@ -125,5 +125,7 @@ static inline void tegra_cpu_clock_resume(void)extern void tegra210_xusb_pll_hw_sequence_start (void );extern void tegra210_sata_pll_hw_control_enable (void );extern void tegra210_sata_pll_hw_sequence_start (void ); +extern void tegra210_put_utmipll_in_iddq (void ); +extern void tegra210_put_utmipll_out_iddq (void );#endif /* __LINUX_CLK_TEGRA_H_ */
Signature · 1 line
1.9.1
Thierry Reding
AppliedQuoted 9 lines · Peter De Schrijver
Export utmipll iddq functions. These will be needed when powergating the XUSB partition.
Signed-off-by BH Hsieh <[email protected]>Signed-off-by Peter De Schrijver <[email protected]>--- drivers/clk/tegra/clk-tegra210.c | 26 ++++++++++++++++++++++++++ include/linux/clk/tegra.h | 2 ++ 2 files changed, 28 insertions(+)
Applied to for-4.12/clk, thanks.
Thierry