clk: qcom: clk-alpha-pll: drop lucid-evo pll enabled warning
Subsystems (3)
cover clk: qcom: clk-alpha-pll: drop lucid-evo pll enabled warning
Boot firmware may have left the display enabled and this should not generate a warning on boot:
disp_cc_pll0 PLL is already enabled
Also fix up the lucid 5lpe pll enable() implementation which did not return early as intended in case the PLL is already enabled.
Johan
Johan Hovold (2):
clk: qcom: clk-alpha-pll: drop lucid-evo pll enabled warning
clk: qcom: clk-alpha-pll: fix lucid 5lpe pll enabled check
drivers/clk/qcom/clk-alpha-pll.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
Signature · 1 line
2.45.2
PATCH 1/2 clk: qcom: clk-alpha-pll: drop lucid-evo pll enabled warning
The boot firmware may have left the display enabled and its PLL running, which currently generates a warning on boot (e.g. on x1e80100):
disp_cc_pll0 PLL is already enabled
Drop the bogus warning and fix up the PLL enabled error handling (trion_pll_is_enabled() only returns 0 or 1).
--- drivers/clk/qcom/clk-alpha-pll.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/clk/qcom/clk-alpha-pll.c +1 -6
@@ -2318,13 +2318,8 @@ static int alpha_pll_lucid_evo_enable(struct clk_hw *hw) }/* Check if PLL is already enabled */ - ret =trion_pll_is_enabled (pll, regmap); -if (ret <0 ) { -return ret; - }else if (ret) { -pr_warn ("%s PLL is already enabled\n" ,clk_hw_get_name (&pll->clkr.hw)); +if (trion_pll_is_enabled (pll, regmap))return 0 ; - } ret =regmap_update_bits (regmap,PLL_MODE (pll),PLL_RESET_N ,PLL_RESET_N );if (ret)
Signature · 1 line
2.45.2
PATCH 2/2 clk: qcom: clk-alpha-pll: fix lucid 5lpe pll enabled check
In reply to Johan HovoldThe lucid 5lpe PLL enable check only checks for an impossible negative return value and does not actually return as intended in case the PLL is already enabled (e.g. has been left enabled by boot firmware).
--- drivers/clk/qcom/clk-alpha-pll.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/clk/qcom/clk-alpha-pll.c +2 -3
@@ -1903,9 +1903,8 @@ static int alpha_pll_lucid_5lpe_enable(struct clk_hw *hw) }/* Check if PLL is already enabled, return if enabled */ - ret =trion_pll_is_enabled (pll, pll->clkr.regmap); -if (ret <0 ) -return ret; +if (trion_pll_is_enabled (pll, pll->clkr.regmap)) +return 0 ; ret =regmap_update_bits (pll->clkr.regmap,PLL_MODE (pll),PLL_RESET_N ,PLL_RESET_N );if (ret)
Signature · 1 line
2.45.2
Quoted 9 lines · Johan Hovold
Boot firmware may have left the display enabled and this should not generate a warning on boot:
disp_cc_pll0PLL is already enabledAlso fix up the lucid 5lpe pll
enable()implementation which did not return early as intended in case the PLL is already enabled.[...]
Applied, thanks!
[1/2] clk: qcom: clk-alpha-pll: drop lucid-evo pll enabled warning
commit: f9b493de63eccf0fb6dc1549863590b9749f6f26
[2/2] clk: qcom: clk-alpha-pll: fix lucid 5lpe pll enabled check
commit: 05b2363b1359195f3c86c98abc133907f8769a69Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>