Skip to content

Commit

Permalink
ARM: restart: prima2: 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().

Reviewed-by: Barry Song <[email protected]>
Signed-off-by: Russell King <[email protected]>
  • Loading branch information
Russell King committed Jan 5, 2012
1 parent a1c1cee commit 125c403
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions arch/arm/mach-prima2/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ extern struct sys_timer sirfsoc_timer;

extern void __init sirfsoc_of_irq_init(void);
extern void __init sirfsoc_of_clk_init(void);
extern void sirfsoc_restart(char, const char *);

#ifndef CONFIG_DEBUG_LL
static inline void sirfsoc_map_lluart(void) {}
Expand Down
8 changes: 0 additions & 8 deletions arch/arm/mach-prima2/include/mach/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,13 @@
#ifndef __MACH_SYSTEM_H__
#define __MACH_SYSTEM_H__

#include <linux/bitops.h>
#include <mach/hardware.h>

#define SIRFSOC_SYS_RST_BIT BIT(31)

extern void __iomem *sirfsoc_rstc_base;

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

static inline void arch_reset(char mode, const char *cmd)
{
writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base);
}

#endif
1 change: 1 addition & 0 deletions arch/arm/mach-prima2/prima2.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ MACHINE_START(PRIMA2_EVB, "prima2cb")
.dma_zone_size = SZ_256M,
.init_machine = sirfsoc_mach_init,
.dt_compat = prima2cb_dt_match,
.restart = sirfsoc_restart,
MACHINE_END
7 changes: 7 additions & 0 deletions arch/arm/mach-prima2/rstc.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,10 @@ int sirfsoc_reset_device(struct device *dev)

return 0;
}

#define SIRFSOC_SYS_RST_BIT BIT(31)

void sirfsoc_restart(char mode, const char *cmd)
{
writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base);
}

0 comments on commit 125c403

Please sign in to comment.