1 From 8cece584b73434c1eb76a553424ff5b875fd1022 Mon Sep 17 00:00:00 2001
2 From: Robin Gong <B38343@freescale.com>
3 Date: Sat, 8 Oct 2011 11:17:42 +0800
4 Subject: [PATCH] ENGR00155891 mx53_loco: enable mc34708's WDI function and pin configuration
6 Because of reboot failure, we add mc34708's WDI reset function and the pin's
7 mux function when system reboot. So mc34708 will be reset when AP reboot.
8 Signed-off-by: Robin Gong <B38343@freescale.com>
9 (cherry picked from commit 8e03278824625e8d528e129ad49e094e4d533f87)
11 arch/arm/mach-mx5/mx53_loco_pmic_mc34708.c | 5 +++++
12 arch/arm/plat-mxc/system.c | 4 ++++
13 2 files changed, 9 insertions(+), 0 deletions(-)
15 diff --git a/arch/arm/mach-mx5/mx53_loco_pmic_mc34708.c b/arch/arm/mach-mx5/mx53_loco_pmic_mc34708.c
16 index ca5a052..3ad0206 100644
17 --- a/arch/arm/mach-mx5/mx53_loco_pmic_mc34708.c
18 +++ b/arch/arm/mach-mx5/mx53_loco_pmic_mc34708.c
19 @@ -285,6 +285,11 @@ static int mc34708_regulator_init(struct mc34708 *mc34708)
20 value &= ~SWHOLD_MASK;
21 pmic_write_reg(REG_MC34708_USB_CONTROL, value, 0xffffff);
23 + /* enable WDI reset*/
24 + pmic_read_reg(REG_MC34708_POWER_CTL2, &value, 0xffffff);
26 + pmic_write_reg(REG_MC34708_POWER_CTL2, value, 0xffffff);
28 mc34708_register_regulator(mc34708, MC34708_SW1A, &sw1a_init);
29 mc34708_register_regulator(mc34708, MC34708_SW1B, &sw1b_init);
30 mc34708_register_regulator(mc34708, MC34708_SW2, &sw2_init);
31 diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c
32 index e4665a2..4f21d5c 100644
33 --- a/arch/arm/plat-mxc/system.c
34 +++ b/arch/arm/plat-mxc/system.c
35 @@ -78,6 +78,10 @@ void arch_reset(char mode, const char *cmd)
38 /* Assert SRS signal */
39 +#ifdef CONFIG_ARCH_MX5
40 + if (board_is_mx53_loco_mc34708()) /*only for mx53_loco_mc34708*/
41 + mxc_iomux_v3_setup_pad(MX53_PAD_GPIO_9__WDOG1_WDOG_B);
43 __raw_writew(wcr_enable, wdog_base);
45 /* wait for reset to assert... */