Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0d62d97 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'clksrc-cleanup-for-3.10' of git://sources.calxeda.com/kernel/linux into next/cleanup

From Rob Herring <robherring2@gmail.com>:

- Add device_node ptr to clocksource init functions
- Add CLKSRC_OF support to twd_smp timer

* tag 'clksrc-cleanup-for-3.10' of git://sources.calxeda.com/kernel/linux

:
  ARM: smp_twd: convert to use CLKSRC_OF init
  clocksource: tegra20: use the device_node pointer passed to init
  clocksource: pass DT node pointer to init functions
  clocksource: add empty version of clocksource_of_init

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents a3fe14c6 da4a686a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1597,6 +1597,7 @@ config HAVE_ARM_ARCH_TIMER
config HAVE_ARM_TWD
	bool
	depends on SMP
	select CLKSRC_OF if OF
	help
	  This options enables support for the ARM timer and watchdog unit

+0 −8
Original line number Diff line number Diff line
@@ -34,12 +34,4 @@ struct twd_local_timer name __initdata = { \

int twd_local_timer_register(struct twd_local_timer *);

#ifdef CONFIG_HAVE_ARM_TWD
void twd_local_timer_of_register(void);
#else
static inline void twd_local_timer_of_register(void)
{
}
#endif

#endif
+4 −13
Original line number Diff line number Diff line
@@ -362,25 +362,13 @@ int __init twd_local_timer_register(struct twd_local_timer *tlt)
}

#ifdef CONFIG_OF
const static struct of_device_id twd_of_match[] __initconst = {
	{ .compatible = "arm,cortex-a9-twd-timer",	},
	{ .compatible = "arm,cortex-a5-twd-timer",	},
	{ .compatible = "arm,arm11mp-twd-timer",	},
	{ },
};

void __init twd_local_timer_of_register(void)
static void __init twd_local_timer_of_register(struct device_node *np)
{
	struct device_node *np;
	int err;

	if (!is_smp() || !setup_max_cpus)
		return;

	np = of_find_matching_node(NULL, twd_of_match);
	if (!np)
		return;

	twd_ppi = irq_of_parse_and_map(np, 0);
	if (!twd_ppi) {
		err = -EINVAL;
@@ -398,4 +386,7 @@ void __init twd_local_timer_of_register(void)
out:
	WARN(err, "twd_local_timer_of_register failed (%d)\n", err);
}
CLOCKSOURCE_OF_DECLARE(arm_twd_a9, "arm,cortex-a9-twd-timer", twd_local_timer_of_register);
CLOCKSOURCE_OF_DECLARE(arm_twd_a5, "arm,cortex-a5-twd-timer", twd_local_timer_of_register);
CLOCKSOURCE_OF_DECLARE(arm_twd_11mp, "arm,arm11mp-twd-timer", twd_local_timer_of_register);
#endif
+2 −3
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@
#include <asm/cacheflush.h>
#include <asm/cputype.h>
#include <asm/smp_plat.h>
#include <asm/smp_twd.h>
#include <asm/hardware/arm_timer.h>
#include <asm/hardware/timer-sp.h>
#include <asm/hardware/cache-l2x0.h>
@@ -119,10 +118,10 @@ static void __init highbank_timer_init(void)
	sp804_clocksource_and_sched_clock_init(timer_base + 0x20, "timer1");
	sp804_clockevents_init(timer_base, irq, "timer0");

	twd_local_timer_of_register();

	arch_timer_of_register();
	arch_timer_sched_clock_init();

	clocksource_of_init();
}

static void highbank_power_off(void)
+2 −3
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@

#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/clocksource.h>
#include <linux/cpu.h>
#include <linux/delay.h>
#include <linux/export.h>
@@ -28,11 +29,9 @@
#include <linux/regmap.h>
#include <linux/micrel_phy.h>
#include <linux/mfd/syscon.h>
#include <asm/smp_twd.h>
#include <asm/hardware/cache-l2x0.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/time.h>
#include <asm/system_misc.h>

#include "common.h"
@@ -292,7 +291,7 @@ static void __init imx6q_init_irq(void)
static void __init imx6q_timer_init(void)
{
	mx6q_clocks_init();
	twd_local_timer_of_register();
	clocksource_of_init();
	imx_print_silicon_rev("i.MX6Q", imx6q_revision());
}

Loading