]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM: versatile: move restart to the device tree
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 25 Jan 2016 08:23:02 +0000 (09:23 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 15 Feb 2016 08:58:08 +0000 (09:58 +0100)
We have a power/reset driver for the Versatile family
in drivers/power/reset so let's just activate that driver
and use it and get rid of some non-DT remnants.

Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/mach-versatile/Kconfig
arch/arm/mach-versatile/versatile_dt.c

index e40f777ccf7d0f2a7f19942ef1d43efe618d4eb0..b0cc26284fc972bfea0433f5a66a45312e352013 100644 (file)
@@ -8,8 +8,11 @@ config ARCH_VERSATILE
        select COMMON_CLK_VERSATILE
        select CPU_ARM926T
        select ICST
+       select MFD_SYSCON
        select MIGHT_HAVE_PCI
        select PLAT_VERSATILE
+       select POWER_RESET
+       select POWER_RESET_VERSATILE
        select VERSATILE_FPGA_IRQ
        help
          This enables support for ARM Ltd Versatile board.
index c448718512552db540edd0038f980d4235bac08a..dff1c0595b67264793d9b4145287d34b20088416 100644 (file)
@@ -52,8 +52,6 @@
  *  Versatile Registers
  * ------------------------------------------------------------------------
  */
-#define VERSATILE_SYS_LOCK_OFFSET             0x20
-#define VERSATILE_SYS_RESETCTL_OFFSET         0x40
 #define VERSATILE_SYS_PCICTL_OFFSET           0x44
 #define VERSATILE_SYS_MCI_OFFSET              0x48
 #define VERSATILE_SYS_FLASH_OFFSET            0x4C
@@ -345,18 +343,6 @@ static void __init versatile_init_early(void)
               __io_address(VERSATILE_SCTL_BASE));
 }
 
-static void versatile_restart(enum reboot_mode mode, const char *cmd)
-{
-       u32 val;
-
-       val = readl(versatile_sys_base + VERSATILE_SYS_RESETCTL_OFFSET);
-       val |= 0x105;
-
-       writel(0xa05f, versatile_sys_base + VERSATILE_SYS_LOCK_OFFSET);
-       writel(val, versatile_sys_base + VERSATILE_SYS_RESETCTL_OFFSET);
-       writel(0, versatile_sys_base + VERSATILE_SYS_LOCK_OFFSET);
-}
-
 static void __init versatile_dt_pci_init(void)
 {
        u32 val;
@@ -420,5 +406,4 @@ DT_MACHINE_START(VERSATILE_PB, "ARM-Versatile (Device Tree Support)")
        .init_early     = versatile_init_early,
        .init_machine   = versatile_dt_init,
        .dt_compat      = versatile_dt_match,
-       .restart        = versatile_restart,
 MACHINE_END