Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: stm32f4: Migrate to clk_hw based OF and registration APIs

Now that we have clk_hw based provider APIs to register clks, we
can get rid of struct clk pointers while registering clks in
these drivers, allowing us to move closer to a clear split of
consumer and provider clk APIs.

Cc: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

authored by

Stephen Boyd and committed by
Stephen Boyd
4e950d1e ff02c6c0

+6 -6
+6 -6
drivers/clk/clk-stm32f4.c
··· 136 136 0x0000000000000001ull, 137 137 0x04777f33f6fec9ffull }; 138 138 139 - static struct clk *clks[MAX_CLKS]; 139 + static struct clk_hw *clks[MAX_CLKS]; 140 140 static DEFINE_SPINLOCK(stm32f4_clk_lock); 141 141 static void __iomem *base; 142 142 ··· 281 281 (BIT_ULL_WORD(secondary) >= 2 ? hweight64(table[2]) : 0); 282 282 } 283 283 284 - static struct clk * 284 + static struct clk_hw * 285 285 stm32f4_rcc_lookup_clk(struct of_phandle_args *clkspec, void *data) 286 286 { 287 287 int i = stm32f4_rcc_lookup_clk_idx(clkspec->args[0], clkspec->args[1]); ··· 346 346 clk_register_apb_mul(NULL, "apb2_mul", "apb2_div", 347 347 CLK_SET_RATE_PARENT, 15); 348 348 349 - clks[SYSTICK] = clk_register_fixed_factor(NULL, "systick", "ahb_div", 349 + clks[SYSTICK] = clk_hw_register_fixed_factor(NULL, "systick", "ahb_div", 350 350 0, 1, 8); 351 - clks[FCLK] = clk_register_fixed_factor(NULL, "fclk", "ahb_div", 351 + clks[FCLK] = clk_hw_register_fixed_factor(NULL, "fclk", "ahb_div", 352 352 0, 1, 1); 353 353 354 354 for (n = 0; n < ARRAY_SIZE(stm32f4_gates); n++) { ··· 360 360 if (idx < 0) 361 361 goto fail; 362 362 363 - clks[idx] = clk_register_gate( 363 + clks[idx] = clk_hw_register_gate( 364 364 NULL, gd->name, gd->parent_name, gd->flags, 365 365 base + gd->offset, gd->bit_idx, 0, &stm32f4_clk_lock); 366 366 ··· 371 371 } 372 372 } 373 373 374 - of_clk_add_provider(np, stm32f4_rcc_lookup_clk, NULL); 374 + of_clk_add_hw_provider(np, stm32f4_rcc_lookup_clk, NULL); 375 375 return; 376 376 fail: 377 377 iounmap(base);