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

Configure Feed

Select the types of activity you want to include in your feed.

clk: visconti: Do not define number of clocks in bindings

Remove use of TMPV770X_NR_CLK.
Instead, define number of clocks inside the driver directory.

The same for TMPV770X_NR_RESET and TMPV770X_NR_PLL.

Signed-off-by: Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Yuji Ishikawa and committed by
Stephen Boyd
67e41dbc 3a866087

+10 -3
+6 -2
drivers/clk/visconti/clkc-tmpv770x.c
··· 17 17 #include "clkc.h" 18 18 #include "reset.h" 19 19 20 + /* Must be equal to the last clock/reset ID increased by one */ 21 + #define CLKS_NR (TMPV770X_CLK_BUSLCK + 1) 22 + #define RESETS_NR (TMPV770X_RESET_SBUSCLK + 1) 23 + 20 24 static DEFINE_SPINLOCK(tmpv770x_clk_lock); 21 25 static DEFINE_SPINLOCK(tmpv770x_rst_lock); 22 26 ··· 238 234 if (IS_ERR(regmap)) 239 235 return PTR_ERR(regmap); 240 236 241 - ctx = visconti_init_clk(dev, regmap, TMPV770X_NR_CLK); 237 + ctx = visconti_init_clk(dev, regmap, CLKS_NR); 242 238 if (IS_ERR(ctx)) 243 239 return PTR_ERR(ctx); 244 240 245 241 ret = visconti_register_reset_controller(dev, regmap, clk_reset_data, 246 - TMPV770X_NR_RESET, 242 + RESETS_NR, 247 243 &visconti_reset_ops, 248 244 &tmpv770x_rst_lock); 249 245 if (ret) {
+4 -1
drivers/clk/visconti/pll-tmpv770x.c
··· 16 16 17 17 #include "pll.h" 18 18 19 + /* Must be equal to the last pll ID increased by one */ 20 + #define PLLS_NR (TMPV770X_PLL_PIIMGERPLL + 1) 21 + 19 22 static DEFINE_SPINLOCK(tmpv770x_pll_lock); 20 23 21 24 static const struct visconti_pll_rate_table pipll0_rates[] __initconst = { ··· 69 66 if (!reg_base) 70 67 return; 71 68 72 - ctx = visconti_init_pll(np, reg_base, TMPV770X_NR_PLL); 69 + ctx = visconti_init_pll(np, reg_base, PLLS_NR); 73 70 if (IS_ERR(ctx)) { 74 71 iounmap(reg_base); 75 72 return;