diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2014-10-17 10:18:59 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-11-13 04:32:02 -0500 |
commit | b437c52c296715eaad77c949fcfc074911a72427 (patch) | |
tree | f35a8df68af11df0ea1b58cc26b796b63bdde482 /arch/arm/mach-integrator | |
parent | beb5818bd012953c79de38f9726f327d8e311569 (diff) |
ARM: integrator: move restart to the device tree
Using the augmented reset driver for the Versatile family,
we can move the reset handling for the Integrator out of the
machine. We add a "syscon" attribute to the core module, and
access the syscon registers using this handle. We need to
select SYSCON, POWER, POWER_RESET and POWER_RESET_VERSATILE
in order for the restart functionality to always be
available on all systems (it should not be optional).
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-integrator')
-rw-r--r-- | arch/arm/mach-integrator/Kconfig | 4 | ||||
-rw-r--r-- | arch/arm/mach-integrator/cm.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-integrator/common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-integrator/core.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-integrator/integrator_ap.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-integrator/integrator_cp.c | 1 |
6 files changed, 4 insertions, 12 deletions
diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig index aa7eb272e602..62e6db4bd533 100644 --- a/arch/arm/mach-integrator/Kconfig +++ b/arch/arm/mach-integrator/Kconfig | |||
@@ -8,8 +8,12 @@ config ARCH_INTEGRATOR | |||
8 | select GENERIC_CLOCKEVENTS | 8 | select GENERIC_CLOCKEVENTS |
9 | select HAVE_TCM | 9 | select HAVE_TCM |
10 | select ICST | 10 | select ICST |
11 | select MFD_SYSCON | ||
11 | select MULTI_IRQ_HANDLER | 12 | select MULTI_IRQ_HANDLER |
12 | select PLAT_VERSATILE | 13 | select PLAT_VERSATILE |
14 | select POWER_RESET | ||
15 | select POWER_RESET_VERSATILE | ||
16 | select POWER_SUPPLY | ||
13 | select SPARSE_IRQ | 17 | select SPARSE_IRQ |
14 | select USE_OF | 18 | select USE_OF |
15 | select VERSATILE_FPGA_IRQ | 19 | select VERSATILE_FPGA_IRQ |
diff --git a/arch/arm/mach-integrator/cm.h b/arch/arm/mach-integrator/cm.h index 4ecff7bff482..5b8ba8247f45 100644 --- a/arch/arm/mach-integrator/cm.h +++ b/arch/arm/mach-integrator/cm.h | |||
@@ -11,7 +11,6 @@ void cm_clear_irqs(void); | |||
11 | #define CM_CTRL_LED (1 << 0) | 11 | #define CM_CTRL_LED (1 << 0) |
12 | #define CM_CTRL_nMBDET (1 << 1) | 12 | #define CM_CTRL_nMBDET (1 << 1) |
13 | #define CM_CTRL_REMAP (1 << 2) | 13 | #define CM_CTRL_REMAP (1 << 2) |
14 | #define CM_CTRL_RESET (1 << 3) | ||
15 | 14 | ||
16 | /* | 15 | /* |
17 | * Integrator/AP,PP2 specific | 16 | * Integrator/AP,PP2 specific |
diff --git a/arch/arm/mach-integrator/common.h b/arch/arm/mach-integrator/common.h index ad0ac5547b2c..27a627aa1e8f 100644 --- a/arch/arm/mach-integrator/common.h +++ b/arch/arm/mach-integrator/common.h | |||
@@ -4,5 +4,4 @@ extern struct amba_pl010_data ap_uart_data; | |||
4 | void integrator_init_early(void); | 4 | void integrator_init_early(void); |
5 | int integrator_init(bool is_cp); | 5 | int integrator_init(bool is_cp); |
6 | void integrator_reserve(void); | 6 | void integrator_reserve(void); |
7 | void integrator_restart(enum reboot_mode, const char *); | ||
8 | void integrator_init_sysfs(struct device *parent, u32 id); | 7 | void integrator_init_sysfs(struct device *parent, u32 id); |
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index e3f3aca43efb..b06fd9f99a46 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c | |||
@@ -140,14 +140,6 @@ void __init integrator_reserve(void) | |||
140 | memblock_reserve(PHYS_OFFSET, __pa(swapper_pg_dir) - PHYS_OFFSET); | 140 | memblock_reserve(PHYS_OFFSET, __pa(swapper_pg_dir) - PHYS_OFFSET); |
141 | } | 141 | } |
142 | 142 | ||
143 | /* | ||
144 | * To reset, we hit the on-board reset register in the system FPGA | ||
145 | */ | ||
146 | void integrator_restart(enum reboot_mode mode, const char *cmd) | ||
147 | { | ||
148 | cm_control(CM_CTRL_RESET, CM_CTRL_RESET); | ||
149 | } | ||
150 | |||
151 | static u32 integrator_id; | 143 | static u32 integrator_id; |
152 | 144 | ||
153 | static ssize_t intcp_get_manf(struct device *dev, | 145 | static ssize_t intcp_get_manf(struct device *dev, |
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index 8a879b654fde..e6854c3f854e 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
@@ -365,6 +365,5 @@ DT_MACHINE_START(INTEGRATOR_AP_DT, "ARM Integrator/AP (Device Tree)") | |||
365 | .init_early = ap_init_early, | 365 | .init_early = ap_init_early, |
366 | .init_irq = ap_init_irq_of, | 366 | .init_irq = ap_init_irq_of, |
367 | .init_machine = ap_init_of, | 367 | .init_machine = ap_init_of, |
368 | .restart = integrator_restart, | ||
369 | .dt_compat = ap_dt_board_compat, | 368 | .dt_compat = ap_dt_board_compat, |
370 | MACHINE_END | 369 | MACHINE_END |
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index cca02eb75eb5..fa8475b4872d 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -324,6 +324,5 @@ DT_MACHINE_START(INTEGRATOR_CP_DT, "ARM Integrator/CP (Device Tree)") | |||
324 | .init_early = intcp_init_early, | 324 | .init_early = intcp_init_early, |
325 | .init_irq = intcp_init_irq_of, | 325 | .init_irq = intcp_init_irq_of, |
326 | .init_machine = intcp_init_of, | 326 | .init_machine = intcp_init_of, |
327 | .restart = integrator_restart, | ||
328 | .dt_compat = intcp_dt_board_compat, | 327 | .dt_compat = intcp_dt_board_compat, |
329 | MACHINE_END | 328 | MACHINE_END |