From d658dd560ac49867df26b0676b2b8df13751559c Mon Sep 17 00:00:00 2001 From: Robin Gong Date: Thu, 14 Nov 2013 13:46:00 +0800 Subject: ENGR00287983-1 imx6sl: replace mx6sl_restart with mxc_restart Using common mxc_restart interface to do restart instead of platform specific interface of imx6sl_restart. Signed-off-by: Robin Gong --- arch/arm/mach-imx/mach-imx6sl.c | 56 +---------------------------------------- 1 file changed, 1 insertion(+), 55 deletions(-) diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c index caf3b8116bf6..78090b430dd7 100644 --- a/arch/arm/mach-imx/mach-imx6sl.c +++ b/arch/arm/mach-imx/mach-imx6sl.c @@ -29,60 +29,6 @@ static struct platform_device imx6sl_cpufreq_pdev = { .name = "imx6-cpufreq", }; -static void imx6sl_restart(char mode, const char *cmd) -{ - struct device_node *np; - void __iomem *wdog_base; - u32 wdog_source = 1; /* use WDOG1 default */ - unsigned int value; - - np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-gpc"); - if (np) - of_property_read_u32(np, "fsl,wdog-reset", &wdog_source); - pr_info("Use WDOG%d as reset source\n", wdog_source); - - np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-wdt"); - wdog_base = of_iomap(np, 0); - if (!wdog_base) - goto soft; - - imx_src_prepare_restart(); - - if (wdog_source == 2) { - /* - * Some boards use WDOG2 to reset external pmic in bypass mode, - * so do WDOG2 reset here. Do not set SRS,since we will - * trigger external POR later. Use WDOG1 to reset in ldo-enable - * mode. You can set it by "fsl,wodog-reset" in dts. - */ - np = of_find_compatible_node(np, NULL, "fsl,imx6sl-wdt"); - wdog_base = of_iomap(np, 0); - if (!wdog_base) { - pr_warn("Not found wdt2, please check your dts!\n"); - goto soft; - } - value = 0x14; - } else { - value = (1 << 2); - } - /* enable wdog */ - writew_relaxed(value, wdog_base); - /* write twice to ensure the request will not get ignored */ - writew_relaxed(value, wdog_base); - - /* wait for reset to assert ... */ - mdelay(500); - - pr_err("Watchdog reset failed to assert reset\n"); - - /* delay to allow the serial port to show the message */ - mdelay(50); - -soft: - /* we'll take a jump through zero as a poor second */ - soft_restart(0); -} - static void __init imx6sl_fec_clk_init(void) { struct regmap *gpr; @@ -199,5 +145,5 @@ DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)") .init_machine = imx6sl_init_machine, .init_late = imx6sl_init_late, .dt_compat = imx6sl_dt_compat, - .restart = imx6sl_restart, + .restart = mxc_restart, MACHINE_END -- cgit v1.2.2