From caa279dda4d9a442d824cd333e8b72078b83e855 Mon Sep 17 00:00:00 2001 From: James Hogan Date: Tue, 15 Jan 2013 15:27:45 +0000 Subject: 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 Cc: Mike Turquette Cc: Grant Likely Cc: Rob Herring Cc: devicetree-discuss@lists.ozlabs.org --- arch/metag/include/asm/clock.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/metag/include') diff --git a/arch/metag/include/asm/clock.h b/arch/metag/include/asm/clock.h index 3e2915a..ded4ab2 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. */ -- cgit v1.1 From a85882d74b6d0fec122b2c7a77c1daa2e3b18909 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Tue, 7 May 2013 16:51:28 +0100 Subject: metag/asm/irq.h: Declare init_IRQ Fixes the following sparce warning: warning: symbol 'init_IRQ' was not declared. Should it be static? Signed-off-by: Markos Chandras Signed-off-by: James Hogan --- arch/metag/include/asm/irq.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/metag/include') diff --git a/arch/metag/include/asm/irq.h b/arch/metag/include/asm/irq.h index be0c8f3..ad6bd0e 100644 --- a/arch/metag/include/asm/irq.h +++ b/arch/metag/include/asm/irq.h @@ -17,6 +17,7 @@ struct pt_regs; int tbisig_map(unsigned int hw); extern void do_IRQ(int irq, struct pt_regs *regs); +extern void init_IRQ(void); #ifdef CONFIG_METAG_SUSPEND_MEM int traps_save_context(void); -- cgit v1.1 From dca66a61cb3c82ebc86f1f99c22550b0ed7b3fbe Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Wed, 8 May 2013 16:42:29 +0100 Subject: metag/processor.h: Add missing cpuinfo_op declaration. Signed-off-by: Markos Chandras Signed-off-by: James Hogan --- arch/metag/include/asm/processor.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/metag/include') diff --git a/arch/metag/include/asm/processor.h b/arch/metag/include/asm/processor.h index 9b029a7..f16477d 100644 --- a/arch/metag/include/asm/processor.h +++ b/arch/metag/include/asm/processor.h @@ -199,4 +199,6 @@ extern void (*soc_halt)(void); extern void show_trace(struct task_struct *tsk, unsigned long *sp, struct pt_regs *regs); +extern const struct seq_operations cpuinfo_op; + #endif -- cgit v1.1 From b79e88e55d5f8d141f205173ce30b4ef05e458c3 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Thu, 9 May 2013 09:42:46 +0100 Subject: metag/traps: Mark die() as __noreturn to match the declaration. Signed-off-by: Markos Chandras Signed-off-by: James Hogan --- arch/metag/include/asm/bug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/metag/include') diff --git a/arch/metag/include/asm/bug.h b/arch/metag/include/asm/bug.h index d04b48c..9f8967f 100644 --- a/arch/metag/include/asm/bug.h +++ b/arch/metag/include/asm/bug.h @@ -6,7 +6,7 @@ struct pt_regs; extern const char *trap_name(int trapno); -extern void die(const char *str, struct pt_regs *regs, long err, - unsigned long addr) __attribute__ ((noreturn)); +extern void __noreturn die(const char *str, struct pt_regs *regs, long err, + unsigned long addr); #endif -- cgit v1.1