From be124c94279edf4306798100f120c386947d8724 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 4 Jun 2009 12:19:02 +0200 Subject: system.c: runtime base address Signed-off-by: Sascha Hauer --- arch/arm/plat-mxc/system.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'arch/arm/plat-mxc/system.c') diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c index 79c3757..15e3053 100644 --- a/arch/arm/plat-mxc/system.c +++ b/arch/arm/plat-mxc/system.c @@ -30,29 +30,28 @@ #include #include -#ifdef CONFIG_ARCH_MX1 -#define WDOG_WCR_REG IO_ADDRESS(WDT_BASE_ADDR) -#define WDOG_WCR_ENABLE (1 << 0) -#else -#define WDOG_WCR_REG IO_ADDRESS(WDOG_BASE_ADDR) -#define WDOG_WCR_ENABLE (1 << 2) -#endif +static void __iomem *wdog_base; /* * Reset the system. It is called by machine_restart(). */ void arch_reset(char mode, const char *cmd) { - if (!cpu_is_mx1()) { + unsigned int wcr_enable; + + if (cpu_is_mx1()) { + wcr_enable = (1 << 0); + } else { struct clk *clk; clk = clk_get_sys("imx-wdt.0", NULL); if (!IS_ERR(clk)) clk_enable(clk); + wcr_enable = (1 << 2); } /* Assert SRS signal */ - __raw_writew(WDOG_WCR_ENABLE, WDOG_WCR_REG); + __raw_writew(wcr_enable, wdog_base); /* wait for reset to assert... */ mdelay(500); @@ -65,3 +64,8 @@ void arch_reset(char mode, const char *cmd) /* we'll take a jump through zero as a poor second */ cpu_reset(0); } + +void mxc_arch_reset_init(void __iomem *base) +{ + wdog_base = base; +} -- cgit v1.1 From fd6ac7bb9d671d36fd7536c68fde977d197756ab Mon Sep 17 00:00:00 2001 From: Dmitriy Taychenachev Date: Fri, 31 Jul 2009 20:29:22 +0900 Subject: MXC: add basic MXC91231 support Signed-off-by: Dmitriy Taychenachev Signed-off-by: Sascha Hauer --- arch/arm/plat-mxc/system.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'arch/arm/plat-mxc/system.c') diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c index 15e3053..97f4279 100644 --- a/arch/arm/plat-mxc/system.c +++ b/arch/arm/plat-mxc/system.c @@ -27,6 +27,7 @@ #include #include +#include #include #include @@ -39,6 +40,12 @@ void arch_reset(char mode, const char *cmd) { unsigned int wcr_enable; +#ifdef CONFIG_ARCH_MXC91231 + if (cpu_is_mxc91231()) { + mxc91231_arch_reset(mode, cmd); + return; + } +#endif if (cpu_is_mx1()) { wcr_enable = (1 << 0); } else { -- cgit v1.1