mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
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>
This commit is contained in:
parent
3a86608788
commit
67e41dbc26
|
|
@ -17,6 +17,10 @@
|
|||
#include "clkc.h"
|
||||
#include "reset.h"
|
||||
|
||||
/* Must be equal to the last clock/reset ID increased by one */
|
||||
#define CLKS_NR (TMPV770X_CLK_BUSLCK + 1)
|
||||
#define RESETS_NR (TMPV770X_RESET_SBUSCLK + 1)
|
||||
|
||||
static DEFINE_SPINLOCK(tmpv770x_clk_lock);
|
||||
static DEFINE_SPINLOCK(tmpv770x_rst_lock);
|
||||
|
||||
|
|
@ -234,12 +238,12 @@ static int visconti_clk_probe(struct platform_device *pdev)
|
|||
if (IS_ERR(regmap))
|
||||
return PTR_ERR(regmap);
|
||||
|
||||
ctx = visconti_init_clk(dev, regmap, TMPV770X_NR_CLK);
|
||||
ctx = visconti_init_clk(dev, regmap, CLKS_NR);
|
||||
if (IS_ERR(ctx))
|
||||
return PTR_ERR(ctx);
|
||||
|
||||
ret = visconti_register_reset_controller(dev, regmap, clk_reset_data,
|
||||
TMPV770X_NR_RESET,
|
||||
RESETS_NR,
|
||||
&visconti_reset_ops,
|
||||
&tmpv770x_rst_lock);
|
||||
if (ret) {
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@
|
|||
|
||||
#include "pll.h"
|
||||
|
||||
/* Must be equal to the last pll ID increased by one */
|
||||
#define PLLS_NR (TMPV770X_PLL_PIIMGERPLL + 1)
|
||||
|
||||
static DEFINE_SPINLOCK(tmpv770x_pll_lock);
|
||||
|
||||
static const struct visconti_pll_rate_table pipll0_rates[] __initconst = {
|
||||
|
|
@ -66,7 +69,7 @@ static void __init tmpv770x_setup_plls(struct device_node *np)
|
|||
if (!reg_base)
|
||||
return;
|
||||
|
||||
ctx = visconti_init_pll(np, reg_base, TMPV770X_NR_PLL);
|
||||
ctx = visconti_init_pll(np, reg_base, PLLS_NR);
|
||||
if (IS_ERR(ctx)) {
|
||||
iounmap(reg_base);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user