Commit 31cc9e09 authored by Alexander Shiyan's avatar Alexander Shiyan Committed by Stephen Boyd

clk: clps711x: Remove board support

Since board support for the CLPS711X platform was removed,
remove the board support from the clk-clps711x driver.
Signed-off-by: default avatarAlexander Shiyan <shc_work@mail.ru>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent bfeffd15
...@@ -44,21 +44,21 @@ struct clps711x_clk { ...@@ -44,21 +44,21 @@ struct clps711x_clk {
struct clk_hw_onecell_data clk_data; struct clk_hw_onecell_data clk_data;
}; };
static struct clps711x_clk * __init _clps711x_clk_init(void __iomem *base, static void __init clps711x_clk_init_dt(struct device_node *np)
u32 fref)
{ {
u32 tmp, f_cpu, f_pll, f_bus, f_tim, f_pwm, f_spi; u32 tmp, f_cpu, f_pll, f_bus, f_tim, f_pwm, f_spi, fref = 0;
struct clps711x_clk *clps711x_clk; struct clps711x_clk *clps711x_clk;
unsigned i; void __iomem *base;
WARN_ON(of_property_read_u32(np, "startup-frequency", &fref));
if (!base) base = of_iomap(np, 0);
return ERR_PTR(-ENOMEM); BUG_ON(!base);
clps711x_clk = kzalloc(struct_size(clps711x_clk, clk_data.hws, clps711x_clk = kzalloc(struct_size(clps711x_clk, clk_data.hws,
CLPS711X_CLK_MAX), CLPS711X_CLK_MAX),
GFP_KERNEL); GFP_KERNEL);
if (!clps711x_clk) BUG_ON(!clps711x_clk);
return ERR_PTR(-ENOMEM);
spin_lock_init(&clps711x_clk->lock); spin_lock_init(&clps711x_clk->lock);
...@@ -137,52 +137,13 @@ static struct clps711x_clk * __init _clps711x_clk_init(void __iomem *base, ...@@ -137,52 +137,13 @@ static struct clps711x_clk * __init _clps711x_clk_init(void __iomem *base,
clk_hw_register_fixed_factor(NULL, "uart", "bus", 0, 1, 10); clk_hw_register_fixed_factor(NULL, "uart", "bus", 0, 1, 10);
clps711x_clk->clk_data.hws[CLPS711X_CLK_TICK] = clps711x_clk->clk_data.hws[CLPS711X_CLK_TICK] =
clk_hw_register_fixed_rate(NULL, "tick", NULL, 0, 64); clk_hw_register_fixed_rate(NULL, "tick", NULL, 0, 64);
for (i = 0; i < CLPS711X_CLK_MAX; i++) for (tmp = 0; tmp < CLPS711X_CLK_MAX; tmp++)
if (IS_ERR(clps711x_clk->clk_data.hws[i])) if (IS_ERR(clps711x_clk->clk_data.hws[tmp]))
pr_err("clk %i: register failed with %ld\n", pr_err("clk %i: register failed with %ld\n",
i, PTR_ERR(clps711x_clk->clk_data.hws[i])); tmp, PTR_ERR(clps711x_clk->clk_data.hws[tmp]));
return clps711x_clk;
}
void __init clps711x_clk_init(void __iomem *base)
{
struct clps711x_clk *clps711x_clk;
clps711x_clk = _clps711x_clk_init(base, 73728000);
BUG_ON(IS_ERR(clps711x_clk));
/* Clocksource */
clk_hw_register_clkdev(clps711x_clk->clk_data.hws[CLPS711X_CLK_TIMER1],
NULL, "clps711x-timer.0");
clk_hw_register_clkdev(clps711x_clk->clk_data.hws[CLPS711X_CLK_TIMER2],
NULL, "clps711x-timer.1");
/* Drivers */
clk_hw_register_clkdev(clps711x_clk->clk_data.hws[CLPS711X_CLK_PWM],
NULL, "clps711x-pwm");
clk_hw_register_clkdev(clps711x_clk->clk_data.hws[CLPS711X_CLK_UART],
NULL, "clps711x-uart.0");
clk_hw_register_clkdev(clps711x_clk->clk_data.hws[CLPS711X_CLK_UART],
NULL, "clps711x-uart.1");
}
#ifdef CONFIG_OF
static void __init clps711x_clk_init_dt(struct device_node *np)
{
void __iomem *base = of_iomap(np, 0);
struct clps711x_clk *clps711x_clk;
u32 fref = 0;
WARN_ON(of_property_read_u32(np, "startup-frequency", &fref));
clps711x_clk = _clps711x_clk_init(base, fref);
BUG_ON(IS_ERR(clps711x_clk));
clps711x_clk->clk_data.num = CLPS711X_CLK_MAX; clps711x_clk->clk_data.num = CLPS711X_CLK_MAX;
of_clk_add_hw_provider(np, of_clk_hw_onecell_get, of_clk_add_hw_provider(np, of_clk_hw_onecell_get,
&clps711x_clk->clk_data); &clps711x_clk->clk_data);
} }
CLK_OF_DECLARE(clps711x, "cirrus,ep7209-clk", clps711x_clk_init_dt); CLK_OF_DECLARE(clps711x, "cirrus,ep7209-clk", clps711x_clk_init_dt);
#endif
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