diff options
author | Guenter Roeck <linux@roeck-us.net> | 2015-01-25 15:30:42 -0500 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2015-01-25 16:13:07 -0500 |
commit | b2b3a8b934e649d0f0659584f2186602dbb391b5 (patch) | |
tree | c827dc76906081bdc13e72b4f14855f914c78122 /drivers/power | |
parent | 481ff6ff967fefdbfb967f7251e40c22a312d244 (diff) |
power/reset: Remove sun6i reboot driver
sun6i restart is now handled by its watchdog driver directly,
so this driver is no longer needed.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/reset/Kconfig | 6 | ||||
-rw-r--r-- | drivers/power/reset/Makefile | 1 | ||||
-rw-r--r-- | drivers/power/reset/sun6i-reboot.c | 85 |
3 files changed, 0 insertions, 92 deletions
diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig index bf5acb3edd85..4cb5744cd259 100644 --- a/drivers/power/reset/Kconfig +++ b/drivers/power/reset/Kconfig | |||
@@ -109,12 +109,6 @@ config POWER_RESET_RESTART | |||
109 | Instead they restart, and u-boot holds the SoC until the | 109 | Instead they restart, and u-boot holds the SoC until the |
110 | user presses a key. u-boot then boots into Linux. | 110 | user presses a key. u-boot then boots into Linux. |
111 | 111 | ||
112 | config POWER_RESET_SUN6I | ||
113 | bool "Allwinner A31 SoC reset driver" | ||
114 | depends on ARCH_SUNXI | ||
115 | help | ||
116 | Reboot support for the Allwinner A31 SoCs. | ||
117 | |||
118 | config POWER_RESET_ST | 112 | config POWER_RESET_ST |
119 | bool "ST restart power-off driver" | 113 | bool "ST restart power-off driver" |
120 | depends on ARCH_STI | 114 | depends on ARCH_STI |
diff --git a/drivers/power/reset/Makefile b/drivers/power/reset/Makefile index 1631652009ac..11de15bae52e 100644 --- a/drivers/power/reset/Makefile +++ b/drivers/power/reset/Makefile | |||
@@ -11,7 +11,6 @@ obj-$(CONFIG_POWER_RESET_MSM) += msm-poweroff.o | |||
11 | obj-$(CONFIG_POWER_RESET_LTC2952) += ltc2952-poweroff.o | 11 | obj-$(CONFIG_POWER_RESET_LTC2952) += ltc2952-poweroff.o |
12 | obj-$(CONFIG_POWER_RESET_QNAP) += qnap-poweroff.o | 12 | obj-$(CONFIG_POWER_RESET_QNAP) += qnap-poweroff.o |
13 | obj-$(CONFIG_POWER_RESET_RESTART) += restart-poweroff.o | 13 | obj-$(CONFIG_POWER_RESET_RESTART) += restart-poweroff.o |
14 | obj-$(CONFIG_POWER_RESET_SUN6I) += sun6i-reboot.o | ||
15 | obj-$(CONFIG_POWER_RESET_ST) += st-poweroff.o | 14 | obj-$(CONFIG_POWER_RESET_ST) += st-poweroff.o |
16 | obj-$(CONFIG_POWER_RESET_VERSATILE) += arm-versatile-reboot.o | 15 | obj-$(CONFIG_POWER_RESET_VERSATILE) += arm-versatile-reboot.o |
17 | obj-$(CONFIG_POWER_RESET_VEXPRESS) += vexpress-poweroff.o | 16 | obj-$(CONFIG_POWER_RESET_VEXPRESS) += vexpress-poweroff.o |
diff --git a/drivers/power/reset/sun6i-reboot.c b/drivers/power/reset/sun6i-reboot.c deleted file mode 100644 index af2cd7ff2fe8..000000000000 --- a/drivers/power/reset/sun6i-reboot.c +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | /* | ||
2 | * Allwinner A31 SoCs reset code | ||
3 | * | ||
4 | * Copyright (C) 2012-2014 Maxime Ripard | ||
5 | * | ||
6 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include <linux/delay.h> | ||
14 | #include <linux/io.h> | ||
15 | #include <linux/module.h> | ||
16 | #include <linux/of_address.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | #include <linux/reboot.h> | ||
19 | |||
20 | #include <asm/system_misc.h> | ||
21 | |||
22 | #define SUN6I_WATCHDOG1_IRQ_REG 0x00 | ||
23 | #define SUN6I_WATCHDOG1_CTRL_REG 0x10 | ||
24 | #define SUN6I_WATCHDOG1_CTRL_RESTART BIT(0) | ||
25 | #define SUN6I_WATCHDOG1_CONFIG_REG 0x14 | ||
26 | #define SUN6I_WATCHDOG1_CONFIG_RESTART BIT(0) | ||
27 | #define SUN6I_WATCHDOG1_CONFIG_IRQ BIT(1) | ||
28 | #define SUN6I_WATCHDOG1_MODE_REG 0x18 | ||
29 | #define SUN6I_WATCHDOG1_MODE_ENABLE BIT(0) | ||
30 | |||
31 | static void __iomem *wdt_base; | ||
32 | |||
33 | static void sun6i_wdt_restart(enum reboot_mode mode, const char *cmd) | ||
34 | { | ||
35 | if (!wdt_base) | ||
36 | return; | ||
37 | |||
38 | /* Disable interrupts */ | ||
39 | writel(0, wdt_base + SUN6I_WATCHDOG1_IRQ_REG); | ||
40 | |||
41 | /* We want to disable the IRQ and just reset the whole system */ | ||
42 | writel(SUN6I_WATCHDOG1_CONFIG_RESTART, | ||
43 | wdt_base + SUN6I_WATCHDOG1_CONFIG_REG); | ||
44 | |||
45 | /* Enable timer. The default and lowest interval value is 0.5s */ | ||
46 | writel(SUN6I_WATCHDOG1_MODE_ENABLE, | ||
47 | wdt_base + SUN6I_WATCHDOG1_MODE_REG); | ||
48 | |||
49 | /* Restart the watchdog. */ | ||
50 | writel(SUN6I_WATCHDOG1_CTRL_RESTART, | ||
51 | wdt_base + SUN6I_WATCHDOG1_CTRL_REG); | ||
52 | |||
53 | while (1) { | ||
54 | mdelay(5); | ||
55 | writel(SUN6I_WATCHDOG1_MODE_ENABLE, | ||
56 | wdt_base + SUN6I_WATCHDOG1_MODE_REG); | ||
57 | } | ||
58 | } | ||
59 | |||
60 | static int sun6i_reboot_probe(struct platform_device *pdev) | ||
61 | { | ||
62 | wdt_base = of_iomap(pdev->dev.of_node, 0); | ||
63 | if (!wdt_base) { | ||
64 | WARN(1, "failed to map watchdog base address"); | ||
65 | return -ENODEV; | ||
66 | } | ||
67 | |||
68 | arm_pm_restart = sun6i_wdt_restart; | ||
69 | |||
70 | return 0; | ||
71 | } | ||
72 | |||
73 | static struct of_device_id sun6i_reboot_of_match[] = { | ||
74 | { .compatible = "allwinner,sun6i-a31-wdt" }, | ||
75 | {} | ||
76 | }; | ||
77 | |||
78 | static struct platform_driver sun6i_reboot_driver = { | ||
79 | .probe = sun6i_reboot_probe, | ||
80 | .driver = { | ||
81 | .name = "sun6i-reboot", | ||
82 | .of_match_table = sun6i_reboot_of_match, | ||
83 | }, | ||
84 | }; | ||
85 | module_platform_driver(sun6i_reboot_driver); | ||