summaryrefslogtreecommitdiffstats
path: root/arch/metag/include
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2013-01-15 15:27:45 +0000
committerJames Hogan <james.hogan@imgtec.com>2013-06-13 12:54:41 +0100
commitcaa279dda4d9a442d824cd333e8b72078b83e855 (patch)
tree609d39ecdf728bc759ab4a3e8775475b1e4636b7 /arch/metag/include
parentc24d2976c7834aa948f9d8a48ad4285cfbaf1c3a (diff)
downloadtalos-op-linux-caa279dda4d9a442d824cd333e8b72078b83e855.tar.gz
talos-op-linux-caa279dda4d9a442d824cd333e8b72078b83e855.zip
metag: init common clk and use "core" clk
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
Diffstat (limited to 'arch/metag/include')
-rw-r--r--arch/metag/include/asm/clock.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/metag/include/asm/clock.h b/arch/metag/include/asm/clock.h
index 3e2915a280c7..ded4ab2e1fd0 100644
--- a/arch/metag/include/asm/clock.h
+++ b/arch/metag/include/asm/clock.h
@@ -19,6 +19,8 @@
* core frequency will be determined like this:
* Meta 1: based on loops_per_jiffy.
* Meta 2: (EXPAND_TIMER_DIV + 1) MHz.
+ * If a "core" clock is provided by the device tree, it
+ * will override this function.
*/
struct meta_clock_desc {
unsigned long (*get_core_freq)(void);
@@ -27,6 +29,12 @@ struct meta_clock_desc {
extern struct meta_clock_desc _meta_clock;
/*
+ * Perform platform clock initialisation, reading clocks from device tree etc.
+ * Only accessible during boot.
+ */
+void init_metag_clocks(void);
+
+/*
* Set up the default clock, ensuring all callbacks are valid - only accessible
* during boot.
*/
OpenPOWER on IntegriCloud