Commit 785b6216 authored by Joel Stanley's avatar Joel Stanley Committed by Stephen Boyd

clk: gemini: Read status before using the value

The probe does a shift and mask of val without having read it from the hardware.

Fixes: 846423f9 ("clk: Add Gemini SoC clock controller")
Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 2b286b09
...@@ -306,6 +306,7 @@ static int gemini_clk_probe(struct platform_device *pdev) ...@@ -306,6 +306,7 @@ static int gemini_clk_probe(struct platform_device *pdev)
gemini_clk_data->hws[GEMINI_CLK_RTC] = hw; gemini_clk_data->hws[GEMINI_CLK_RTC] = hw;
/* CPU clock derived as a fixed ratio from the AHB clock */ /* CPU clock derived as a fixed ratio from the AHB clock */
regmap_read(map, GEMINI_GLOBAL_STATUS, &val);
val >>= CPU_AHB_RATIO_SHIFT; val >>= CPU_AHB_RATIO_SHIFT;
val &= CPU_AHB_RATIO_MASK; val &= CPU_AHB_RATIO_MASK;
hw = clk_hw_register_fixed_factor(NULL, "cpu", "ahb", 0, hw = clk_hw_register_fixed_factor(NULL, "cpu", "ahb", 0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment