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/mach-imx53.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/arm/mach-imx/mach-imx53.c') diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c index f579c616feed..7a5656128b60 100644 --- a/arch/arm/mach-imx/mach-imx53.c +++ b/arch/arm/mach-imx/mach-imx53.c @@ -21,6 +21,7 @@ #include #include "common.h" +#include "hardware.h" #include "mx53.h" static void __init imx53_qsb_init(void) @@ -38,6 +39,8 @@ static void __init imx53_qsb_init(void) static void __init imx53_dt_init(void) { + mxc_arch_reset_init(MX53_IO_ADDRESS(MX53_WDOG1_BASE_ADDR)); + if (of_machine_is_compatible("fsl,imx53-qsb")) imx53_qsb_init(); -- cgit v1.2.3 From c1e31d126b4db6a3a8d96883fae40fe22d5eba65 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Fri, 10 May 2013 10:19:01 +0800 Subject: ARM: imx: create mxc_arch_reset_init_dt() for DT boot The mxc_arch_reset_init() uses static mapping and calls clk_get_sys() to get clock. It's suitable for non-DT boot but not for DT boot where dynamic mapping and of_clk_get() should be used instead. Create mxc_arch_reset_init_dt() as the DT variant of mxc_arch_reset_init(), and change DT platforms to use it. Signed-off-by: Shawn Guo --- arch/arm/mach-imx/mach-imx53.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-imx/mach-imx53.c') diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c index 7a5656128b60..74e7b94c22e7 100644 --- a/arch/arm/mach-imx/mach-imx53.c +++ b/arch/arm/mach-imx/mach-imx53.c @@ -39,7 +39,7 @@ static void __init imx53_qsb_init(void) static void __init imx53_dt_init(void) { - mxc_arch_reset_init(MX53_IO_ADDRESS(MX53_WDOG1_BASE_ADDR)); + mxc_arch_reset_init_dt(); if (of_machine_is_compatible("fsl,imx53-qsb")) imx53_qsb_init(); -- cgit v1.2.3 From 59d5c0ce8a790475b22a18a94386bc2b3dd1aa31 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Mon, 22 Apr 2013 12:48:42 +0800 Subject: ARM: imx: move imx53-qsb audio codec clk lookup into DT With device tree clk lookup support in place, we can move audio codec clk lookup for ssi_ext1 into device tree now, so that imx53_qsb_init() can be saved. Since ssi_ext2 lookup is used nowhere, it gets removed together with ssi_ext1 lookup from clk driver. Signed-off-by: Shawn Guo --- arch/arm/mach-imx/mach-imx53.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'arch/arm/mach-imx/mach-imx53.c') diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c index 74e7b94c22e7..98c58944015a 100644 --- a/arch/arm/mach-imx/mach-imx53.c +++ b/arch/arm/mach-imx/mach-imx53.c @@ -24,26 +24,10 @@ #include "hardware.h" #include "mx53.h" -static void __init imx53_qsb_init(void) -{ - struct clk *clk; - - clk = clk_get_sys(NULL, "ssi_ext1"); - if (IS_ERR(clk)) { - pr_err("failed to get clk ssi_ext1\n"); - return; - } - - clk_register_clkdev(clk, NULL, "0-000a"); -} - static void __init imx53_dt_init(void) { mxc_arch_reset_init_dt(); - if (of_machine_is_compatible("fsl,imx53-qsb")) - imx53_qsb_init(); - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); } -- cgit v1.2.3