summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/system.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-06-24 12:49:56 +0200
committerShawn Guo <shawnguo@kernel.org>2016-06-28 04:26:20 +0200
commit6f98cb22e4089c3eb63ff86fac010291a0e30241 (patch)
treedba416187bb35b1a76e7bca6b36ecc8cffa15d2c /arch/arm/mach-imx/system.c
parentARM: i.MX: Do not explicitly call l2x0_of_init() (diff)
downloadlinux-6f98cb22e4089c3eb63ff86fac010291a0e30241.tar.xz
linux-6f98cb22e4089c3eb63ff86fac010291a0e30241.zip
ARM: imx: remove cpu_is_mx1 check
There is only one call site for this, and it's easily replaced by initializing the reset value at boot time. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'arch/arm/mach-imx/system.c')
-rw-r--r--arch/arm/mach-imx/system.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
index e442ed7f7ff5..c06af650e6b1 100644
--- a/arch/arm/mach-imx/system.c
+++ b/arch/arm/mach-imx/system.c
@@ -34,25 +34,19 @@
static void __iomem *wdog_base;
static struct clk *wdog_clk;
+static int wcr_enable = (1 << 2);
/*
* Reset the system. It is called by machine_restart().
*/
void mxc_restart(enum reboot_mode mode, const char *cmd)
{
- unsigned int wcr_enable;
-
if (!wdog_base)
goto reset_fallback;
if (!IS_ERR(wdog_clk))
clk_enable(wdog_clk);
- if (cpu_is_mx1())
- wcr_enable = (1 << 0);
- else
- wcr_enable = (1 << 2);
-
/* Assert SRS signal */
imx_writew(wcr_enable, wdog_base);
/*
@@ -89,6 +83,14 @@ void __init mxc_arch_reset_init(void __iomem *base)
clk_prepare(wdog_clk);
}
+#ifdef CONFIG_SOC_IMX1
+void __init imx1_reset_init(void __iomem *base)
+{
+ wcr_enable = (1 << 0);
+ mxc_arch_reset_init(base);
+}
+#endif
+
#ifdef CONFIG_CACHE_L2X0
void __init imx_init_l2cache(void)
{