clk: tegra: fix WARN_ON in PLL_RE registration
Subsystems (3)
PATCH 1/1 clk: tegra: fix WARN_ON in PLL_RE registration
This fixes two things.
- Read the correct IDDQ register
- Check the correct IDDQ bit position
--- drivers/clk/tegra/clk-pll.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clk/tegra/clk-pll.c +2 -1
@@ -1630,7 +1630,8 @@ struct clk *tegra_clk_register_pllre(const char *name, const char *parent_name, val =pll_readl_base (pll);if (val &PLL_BASE_ENABLE ) -WARN_ON (val & pll_params->iddq_bit_idx); +WARN_ON (readl_relaxed (clk_base + pll_params->iddq_reg) & +BIT (pll_params->iddq_bit_idx));else {int m;
Signature · 1 line
1.9.1
Quoted 6 lines · Bill Huang
This fixes two things.
- Read the correct IDDQ register
- Check the correct IDDQ bit positionSigned-off-by Bill Huang <[email protected]>
By the way, does it also make sense to do the same thing for tegra_clk_register_pllss, which also reads the base register instead of the specific iddq_reg from params?
Quoted 25 lines
--- drivers/clk/tegra/clk-pll.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/clk/tegra/clk-pll.c +2
-2@@ -1630,7 +1630,8 @@ struct clk *tegra_clk_register_pllre(const char *name, const char *parent_name, val =pll_readl_base (pll);if (val &PLL_BASE_ENABLE ) -WARN_ON (val & pll_params->iddq_bit_idx); +WARN_ON (readl_relaxed (clk_base + pll_params->iddq_reg) & +BIT (pll_params->iddq_bit_idx));else {int m; --1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 3 lines
Benson Leung Software Engineer, Chrom* OS [email protected]
Quoted 6 lines · Benson Leung
Quoted 5 lines · Bill Huang
This fixes two things.
- Read the correct IDDQ register
- Check the correct IDDQ bit position
Quoted 8 lines
Quoted 1 line
Signed-off-by Bill Huang <[email protected]>Reviewed-by Benson Leung <[email protected]>By the way, does it also make sense to do the same thing for
tegra_clk_register_pllss, which also reads the base register instead of the specificiddq_regfrom params?
Yes thanks for catching this, I've sent another fix in https://patchwork.ozlabs.org/patch/473329/
Quoted 28 lines
Quoted 25 lines
--- drivers/clk/tegra/clk-pll.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/clk/tegra/clk-pll.c +2
-2@@ -1630,7 +1630,8 @@ struct clk *tegra_clk_register_pllre(const char *name, const char *parent_name, val =pll_readl_base (pll);if (val &PLL_BASE_ENABLE ) -WARN_ON (val & pll_params->iddq_bit_idx); +WARN_ON (readl_relaxed (clk_base + pll_params->iddq_reg) & +BIT (pll_params->iddq_bit_idx));else {int m; --1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html