Exemplo n.º 1
0
static void __init v2m_dt_timer_init(void)
{
	struct device_node *node = NULL;

	of_clk_init(NULL);

	do {
		node = of_find_compatible_node(node, NULL, "arm,sp804");
	} while (node && vexpress_get_site_by_node(node) != VEXPRESS_SITE_MB);
	if (node) {
		pr_info("Using SP804 '%s' as a clock & events source\n",
				node->full_name);
		WARN_ON(clk_register_clkdev(of_clk_get_by_name(node,
				"timclken1"), "v2m-timer0", "sp804"));
		WARN_ON(clk_register_clkdev(of_clk_get_by_name(node,
				"timclken2"), "v2m-timer1", "sp804"));
		v2m_sp804_init(of_iomap(node, 0),
				irq_of_parse_and_map(node, 0));
	}

	if (arch_timer_of_register() != 0)
		twd_local_timer_of_register();

	if (arch_timer_sched_clock_init() != 0)
		versatile_sched_clock_init(vexpress_get_24mhz_clock_base(),
				24000000);
}
Exemplo n.º 2
0
void __init omap5_realtime_timer_init(void)
{
	int err;

	omap5_sync32k_timer_init();
	realtime_counter_init();

	err = arch_timer_of_register();
	if (err)
		pr_err("%s: arch_timer_register failed %d\n", __func__, err);
}
Exemplo n.º 3
0
static void __init omap5_timer_init(void)
{
	int err;

	omap2_gp_clockevent_init(1, OMAP4_CLKEV_SOURCE);
	omap2_clocksource_init(2, OMAP4_MPU_SOURCE);
	realtime_counter_init();

	err = arch_timer_of_register();
	if (err)
		pr_err("%s: arch_timer_register failed %d\n", __func__, err);
}
Exemplo n.º 4
0
static void __init v2m_dt_timer_init(void)
{
	struct device_node *node;
	const char *path;
	int err;

	node = of_find_compatible_node(NULL, NULL, "arm,sp810");
	v2m_sysctl_init(of_iomap(node, 0));

	v2m_clk_init();

	err = of_property_read_string(of_aliases, "arm,v2m_timer", &path);
	if (WARN_ON(err))
		return;
	node = of_find_node_by_path(path);
	v2m_sp804_init(of_iomap(node, 0), irq_of_parse_and_map(node, 0));
	if (arch_timer_of_register() != 0)
		twd_local_timer_of_register();

	if (arch_timer_sched_clock_init() != 0)
		versatile_sched_clock_init(v2m_sysreg_base + V2M_SYS_24MHZ, 24000000);
}
Exemplo n.º 5
0
static void __init msm_dt_timer_init(void)
{
	arch_timer_of_register();
}