From 18cb680f1a003a1a1ec0e6097d7b763516a27f04 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Fri, 10 May 2013 09:13:44 +0800 Subject: ARM: imx: move clk_prepare() out from mxc_restart() It's inappropriate to call clk_prepare() in mxc_restart(), because the restart routine could be called in atomic context. Move clk_get() and clk_prepare() into mxc_arch_reset_init() and only have the atomic part clk_enable() be called in mxc_restart(). As a result, mxc_arch_reset_init() needs to be called after clk gets initialized. While there, it also changes printk(KERN_ERR ...) to pr_err() and adds __init annotation for mxc_arch_reset_init(). Signed-off-by: Shawn Guo --- arch/arm/mach-imx/imx27-dt.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/arm/mach-imx/imx27-dt.c') diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c index 4aaead0a77f..93aef1aa0a8 100644 --- a/arch/arm/mach-imx/imx27-dt.c +++ b/arch/arm/mach-imx/imx27-dt.c @@ -16,12 +16,15 @@ #include #include "common.h" +#include "hardware.h" #include "mx27.h" static void __init imx27_dt_init(void) { struct platform_device_info devinfo = { .name = "cpufreq-cpu0", }; + mxc_arch_reset_init(MX27_IO_ADDRESS(MX27_WDOG_BASE_ADDR)); + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); platform_device_register_full(&devinfo); -- cgit v1.2.3-70-g09d2