mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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: 846423f967 ("clk: Add Gemini SoC clock controller")
Signed-off-by: Joel Stanley <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
This commit is contained in:
parent
2b286b09a0
commit
785b62167d
1 changed files with 1 additions and 0 deletions
|
|
@ -306,6 +306,7 @@ static int gemini_clk_probe(struct platform_device *pdev)
|
|||
gemini_clk_data->hws[GEMINI_CLK_RTC] = hw;
|
||||
|
||||
/* 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_MASK;
|
||||
hw = clk_hw_register_fixed_factor(NULL, "cpu", "ahb", 0,
|
||||
|
|
|
|||
Loading…
Reference in a new issue