mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 21:57:43 +00:00
caa279dda4
If the common clock framework is enabled, call of_clk_init(NULL) in time_init() to register device tree clocks with the clock framework. After this time_init() calls a new function init_metag_clocks(), which looks for a clock named "core" in the node compatible with "img,meta" (usually the root node). If found the get_core_freq machine callback is overridden to obtain the core clock frequency using that clock. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Mike Turquette <mturquette@linaro.org> Cc: Grant Likely <grant.likely@linaro.org> Cc: Rob Herring <rob.herring@calxeda.com> Cc: devicetree-discuss@lists.ozlabs.org
25 lines
517 B
C
25 lines
517 B
C
/*
|
|
* Copyright (C) 2005-2013 Imagination Technologies Ltd.
|
|
*
|
|
* This file contains the Meta-specific time handling details.
|
|
*
|
|
*/
|
|
|
|
#include <clocksource/metag_generic.h>
|
|
#include <linux/clk-provider.h>
|
|
#include <linux/init.h>
|
|
#include <asm/clock.h>
|
|
|
|
void __init time_init(void)
|
|
{
|
|
#ifdef CONFIG_COMMON_CLK
|
|
/* Init clocks from device tree */
|
|
of_clk_init(NULL);
|
|
#endif
|
|
|
|
/* Init meta clocks, particularly the core clock */
|
|
init_metag_clocks();
|
|
|
|
/* Set up the timer clock sources */
|
|
metag_generic_timer_init();
|
|
}
|