Skip to content

Commit

Permalink
ARM: restart: dove: use new restart hook
Browse files Browse the repository at this point in the history
Hook these platforms restart code into the new restart hook rather than
using arch_reset().

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Jan 5, 2012
1 parent c6121dd commit 6ca6ff9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
1 change: 1 addition & 0 deletions arch/arm/mach-dove/cm-a510.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,5 @@ MACHINE_START(CM_A510, "Compulab CM-A510 Board")
.init_early = dove_init_early,
.init_irq = dove_init_irq,
.timer = &dove_timer,
.restart = dove_restart,
MACHINE_END
16 changes: 16 additions & 0 deletions arch/arm/mach-dove/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,3 +292,19 @@ void __init dove_init(void)
dove_xor0_init();
dove_xor1_init();
}

void dove_restart(char mode, const char *cmd)
{
/*
* Enable soft reset to assert RSTOUTn.
*/
writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);

/*
* Assert soft reset.
*/
writel(SOFT_RESET, SYSTEM_SOFT_RESET);

while (1)
;
}
1 change: 1 addition & 0 deletions arch/arm/mach-dove/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ void dove_spi1_init(void);
void dove_i2c_init(void);
void dove_sdio0_init(void);
void dove_sdio1_init(void);
void dove_restart(char, const char *);

#endif
1 change: 1 addition & 0 deletions arch/arm/mach-dove/dove-db-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,5 @@ MACHINE_START(DOVE_DB, "Marvell DB-MV88AP510-BP Development Board")
.init_early = dove_init_early,
.init_irq = dove_init_irq,
.timer = &dove_timer,
.restart = dove_restart,
MACHINE_END
14 changes: 0 additions & 14 deletions arch/arm/mach-dove/include/mach/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,13 @@
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H

#include <mach/bridge-regs.h>

static inline void arch_idle(void)
{
cpu_do_idle();
}

static inline void arch_reset(char mode, const char *cmd)
{
/*
* Enable soft reset to assert RSTOUTn.
*/
writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);

/*
* Assert soft reset.
*/
writel(SOFT_RESET, SYSTEM_SOFT_RESET);

while (1)
;
}


Expand Down

0 comments on commit 6ca6ff9

Please sign in to comment.