Commit 26cae166 authored by Sebastian Hesselbarth's avatar Sebastian Hesselbarth
Browse files

ARM: highbank: remove custom .init_time hook



With arch/arm calling of_clk_init(NULL) from time_init(), we can now
remove custom .init_time hooks. Highbank clock provider need a reference
to system registers, as a workaround current clk driver maps those
independent of arch code now.

Signed-off-by: default avatarSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: default avatarRob Herring <rob.herring@calxeda.com>
Acked-by: default avatarMike Turquette <mturquette@linaro.org>
parent e8ecbc7c
Loading
Loading
Loading
Loading
+7 −16
Original line number Original line Diff line number Diff line
@@ -24,7 +24,6 @@
#include <linux/of_platform.h>
#include <linux/of_platform.h>
#include <linux/of_address.h>
#include <linux/of_address.h>
#include <linux/amba/bus.h>
#include <linux/amba/bus.h>
#include <linux/clk-provider.h>


#include <asm/cacheflush.h>
#include <asm/cacheflush.h>
#include <asm/cputype.h>
#include <asm/cputype.h>
@@ -83,20 +82,6 @@ static void __init highbank_init_irq(void)
	}
	}
}
}


static void __init highbank_timer_init(void)
{
	struct device_node *np;

	/* Map system registers */
	np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
	sregs_base = of_iomap(np, 0);
	WARN_ON(!sregs_base);

	of_clk_init(NULL);

	clocksource_of_init();
}

static void highbank_power_off(void)
static void highbank_power_off(void)
{
{
	highbank_set_pwr_shutdown();
	highbank_set_pwr_shutdown();
@@ -155,6 +140,13 @@ static struct notifier_block highbank_platform_nb = {


static void __init highbank_init(void)
static void __init highbank_init(void)
{
{
	struct device_node *np;

	/* Map system registers */
	np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
	sregs_base = of_iomap(np, 0);
	WARN_ON(!sregs_base);

	pm_power_off = highbank_power_off;
	pm_power_off = highbank_power_off;
	highbank_pm_init();
	highbank_pm_init();


@@ -176,7 +168,6 @@ DT_MACHINE_START(HIGHBANK, "Highbank")
#endif
#endif
	.smp		= smp_ops(highbank_smp_ops),
	.smp		= smp_ops(highbank_smp_ops),
	.init_irq	= highbank_init_irq,
	.init_irq	= highbank_init_irq,
	.init_time	= highbank_timer_init,
	.init_machine	= highbank_init,
	.init_machine	= highbank_init,
	.dt_compat	= highbank_match,
	.dt_compat	= highbank_match,
	.restart	= highbank_restart,
	.restart	= highbank_restart,
+7 −3
Original line number Original line Diff line number Diff line
@@ -20,8 +20,7 @@
#include <linux/clk-provider.h>
#include <linux/clk-provider.h>
#include <linux/io.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/of.h>

#include <linux/of_address.h>
extern void __iomem *sregs_base;


#define HB_PLL_LOCK_500		0x20000000
#define HB_PLL_LOCK_500		0x20000000
#define HB_PLL_LOCK		0x10000000
#define HB_PLL_LOCK		0x10000000
@@ -280,6 +279,7 @@ static __init struct clk *hb_clk_init(struct device_node *node, const struct clk
	const char *clk_name = node->name;
	const char *clk_name = node->name;
	const char *parent_name;
	const char *parent_name;
	struct clk_init_data init;
	struct clk_init_data init;
	struct device_node *srnp;
	int rc;
	int rc;


	rc = of_property_read_u32(node, "reg", &reg);
	rc = of_property_read_u32(node, "reg", &reg);
@@ -290,7 +290,11 @@ static __init struct clk *hb_clk_init(struct device_node *node, const struct clk
	if (WARN_ON(!hb_clk))
	if (WARN_ON(!hb_clk))
		return NULL;
		return NULL;


	hb_clk->reg = sregs_base + reg;
	/* Map system registers */
	srnp = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
	hb_clk->reg = of_iomap(srnp, 0);
	BUG_ON(!hb_clk->reg);
	hb_clk->reg += reg;


	of_property_read_string(node, "clock-output-names", &clk_name);
	of_property_read_string(node, "clock-output-names", &clk_name);