]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00287983-1 imx6sl: replace mx6sl_restart with mxc_restart
authorRobin Gong <b38343@freescale.com>
Thu, 14 Nov 2013 05:46:00 +0000 (13:46 +0800)
committerRobin Gong <b38343@freescale.com>
Thu, 14 Nov 2013 06:55:45 +0000 (14:55 +0800)
Using common mxc_restart interface to do restart instead of platform specific
interface of imx6sl_restart.

Signed-off-by: Robin Gong <b38343@freescale.com>
arch/arm/mach-imx/mach-imx6sl.c

index caf3b8116bf6e40724cabb3f6eadc9a6f8346ba7..78090b430dd778c6c00352107da41709dd1806ae 100644 (file)
@@ -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