Skip to content

Commit

Permalink
ARM: vt8500: prepare for arch-wide .init_time callback
Browse files Browse the repository at this point in the history
Current vt8500 board init calls of_clk_init() from vtwm_clk_init. To allow
consolidation of DT driven .time_init, move of_clock_init() to a temporary
.time_init callback that will be removed when arch-wide callback is available.
With previous pmc_base parsing helper for vt8500 clock providers, we can also
safely remove the call to vtwm_clk_init() and get rid of some includes.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Tony Prisk <linux@prisktech.co.nz>
Acked-by: Mike Turquette <mturquette@linaro.org>
  • Loading branch information
Sebastian Hesselbarth committed Sep 29, 2013
1 parent f9e4a18 commit f44089a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 39 deletions.
24 changes: 0 additions & 24 deletions arch/arm/mach-vt8500/common.h

This file was deleted.

13 changes: 8 additions & 5 deletions arch/arm/mach-vt8500/vt8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#include <linux/clk-provider.h>
#include <linux/clocksource.h>
#include <linux/io.h>
#include <linux/pm.h>
Expand All @@ -33,8 +34,6 @@
#include <linux/of_irq.h>
#include <linux/of_platform.h>

#include "common.h"

#define LEGACY_GPIO_BASE 0xD8110000
#define LEGACY_PMC_BASE 0xD8130000

Expand Down Expand Up @@ -75,6 +74,12 @@ static void vt8500_power_off(void)
asm("mcr%? p15, 0, %0, c7, c0, 4" : : "r" (0));
}

static void __init vt8500_init_time(void)
{
of_clk_init(NULL);
clocksource_of_init();
}

void __init vt8500_init(void)
{
struct device_node *np;
Expand Down Expand Up @@ -162,8 +167,6 @@ void __init vt8500_init(void)
else
pr_err("%s: PMC Hibernation register could not be remapped, not enabling power off!\n", __func__);

vtwm_clk_init(pmc_base);

of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}

Expand All @@ -180,7 +183,7 @@ DT_MACHINE_START(WMT_DT, "VIA/Wondermedia SoC (Device Tree Support)")
.dt_compat = vt8500_dt_compat,
.map_io = vt8500_map_io,
.init_machine = vt8500_init,
.init_time = clocksource_of_init,
.init_time = vt8500_init_time,
.restart = vt8500_restart,
MACHINE_END

10 changes: 0 additions & 10 deletions drivers/clk/clk-vt8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,13 +718,3 @@ static void __init wm8850_pll_init(struct device_node *node)
vtwm_pll_clk_init(node, PLL_TYPE_WM8850);
}
CLK_OF_DECLARE(wm8850_pll, "wm,wm8850-pll-clock", wm8850_pll_init);

void __init vtwm_clk_init(void __iomem *base)
{
if (!base)
return;

pmc_base = base;

of_clk_init(NULL);
}

0 comments on commit f44089a

Please sign in to comment.