Skip to content

Commit

Permalink
ARM: restart: nomadik: use new restart hook
Browse files Browse the repository at this point in the history
Hook the Nomadik NHK platform restart code into the new restart hook.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Jan 5, 2012
1 parent 8fb06b1 commit 35b47a4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions arch/arm/mach-nomadik/board-nhk8815.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,4 +284,5 @@ MACHINE_START(NOMADIK, "NHK8815")
.init_irq = cpu8815_init_irq,
.timer = &nomadik_timer,
.init_machine = nhk8815_platform_init,
.restart = cpu8815_restart,
MACHINE_END
11 changes: 11 additions & 0 deletions arch/arm/mach-nomadik/cpu-8815.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/device.h>
#include <linux/amba/bus.h>
#include <linux/platform_device.h>
#include <linux/io.h>

#include <plat/gpio-nomadik.h>
#include <mach/hardware.h>
Expand Down Expand Up @@ -165,3 +166,13 @@ void __init cpu8815_init_irq(void)
#endif
return;
}

void cpu8815_restart(char mode, const char *cmd)
{
void __iomem *src_rstsr = io_p2v(NOMADIK_SRC_BASE + 0x18);

/* FIXME: use egpio when implemented */

/* Write anything to Reset status register */
writel(1, src_rstsr);
}
1 change: 1 addition & 0 deletions arch/arm/mach-nomadik/cpu-8815.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
extern void cpu8815_map_io(void);
extern void cpu8815_platform_init(void);
extern void cpu8815_init_irq(void);
extern void cpu8815_restart(char, const char *);
9 changes: 0 additions & 9 deletions arch/arm/mach-nomadik/include/mach/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H

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

static inline void arch_idle(void)
{
/*
Expand All @@ -34,12 +31,6 @@ static inline void arch_idle(void)

static inline void arch_reset(char mode, const char *cmd)
{
void __iomem *src_rstsr = io_p2v(NOMADIK_SRC_BASE + 0x18);

/* FIXME: use egpio when implemented */

/* Write anything to Reset status register */
writel(1, src_rstsr);
}

#endif

0 comments on commit 35b47a4

Please sign in to comment.