Skip to content

Commit

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

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Jan 5, 2012
1 parent b23fcd9 commit 9854a38
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 6 deletions.
2 changes: 2 additions & 0 deletions arch/arm/mach-mmp/aspenite.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ MACHINE_START(ASPENITE, "PXA168-based Aspenite Development Platform")
.init_irq = pxa168_init_irq,
.timer = &pxa168_timer,
.init_machine = common_init,
.restart = pxa168_restart,
MACHINE_END

MACHINE_START(ZYLONITE2, "PXA168-based Zylonite2 Development Platform")
Expand All @@ -251,4 +252,5 @@ MACHINE_START(ZYLONITE2, "PXA168-based Zylonite2 Development Platform")
.init_irq = pxa168_init_irq,
.timer = &pxa168_timer,
.init_machine = common_init,
.restart = pxa168_restart,
MACHINE_END
1 change: 1 addition & 0 deletions arch/arm/mach-mmp/avengers_lite.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ MACHINE_START(AVENGERS_LITE, "PXA168 Avengers lite Development Platform")
.init_irq = pxa168_init_irq,
.timer = &pxa168_timer,
.init_machine = avengers_lite_init,
.restart = pxa168_restart,
MACHINE_END
1 change: 1 addition & 0 deletions arch/arm/mach-mmp/brownstone.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,5 @@ MACHINE_START(BROWNSTONE, "Brownstone Development Platform")
.init_irq = mmp2_init_irq,
.timer = &mmp2_timer,
.init_machine = brownstone_init,
.restart = mmp_restart,
MACHINE_END
5 changes: 5 additions & 0 deletions arch/arm/mach-mmp/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,8 @@ void __init mmp_map_io(void)
/* this is early, initialize mmp_chip_id here */
mmp_chip_id = __raw_readl(MMP_CHIPID);
}

void mmp_restart(char mode, const char *cmd)
{
soft_restart(0);
}
1 change: 1 addition & 0 deletions arch/arm/mach-mmp/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ extern void timer_init(int irq);

extern void __init icu_init_irq(void);
extern void __init mmp_map_io(void);
extern void mmp_restart(char, const char *);
1 change: 1 addition & 0 deletions arch/arm/mach-mmp/flint.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,5 @@ MACHINE_START(FLINT, "Flint Development Platform")
.init_irq = mmp2_init_irq,
.timer = &mmp2_timer,
.init_machine = flint_init,
.restart = mmp_restart,
MACHINE_END
1 change: 1 addition & 0 deletions arch/arm/mach-mmp/gplugd.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,5 @@ MACHINE_START(GPLUGD, "PXA168-based GuruPlug Display (gplugD) Platform")
.init_irq = pxa168_init_irq,
.timer = &pxa168_timer,
.init_machine = gplugd_init,
.restart = pxa168_restart,
MACHINE_END
1 change: 1 addition & 0 deletions arch/arm/mach-mmp/include/mach/pxa168.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ struct sys_timer;

extern struct sys_timer pxa168_timer;
extern void __init pxa168_init_irq(void);
extern void pxa168_restart(char, const char *);
extern void pxa168_clear_keypad_wakeup(void);

#include <linux/i2c.h>
Expand Down
6 changes: 0 additions & 6 deletions arch/arm/mach-mmp/include/mach/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,12 @@
#ifndef __ASM_MACH_SYSTEM_H
#define __ASM_MACH_SYSTEM_H

#include <mach/cputype.h>

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

static inline void arch_reset(char mode, const char *cmd)
{
if (cpu_is_pxa168())
soft_restart(0xffff0000);
else
soft_restart(0);
}
#endif /* __ASM_MACH_SYSTEM_H */
1 change: 1 addition & 0 deletions arch/arm/mach-mmp/jasper.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,5 @@ MACHINE_START(MARVELL_JASPER, "Jasper Development Platform")
.init_irq = mmp2_init_irq,
.timer = &mmp2_timer,
.init_machine = jasper_init,
.restart = mmp_restart,
MACHINE_END
5 changes: 5 additions & 0 deletions arch/arm/mach-mmp/pxa168.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,8 @@ int __init pxa168_add_usb_host(struct pxa168_usb_pdata *pdata)
pxa168_device_usb_host.dev.platform_data = pdata;
return platform_device_register(&pxa168_device_usb_host);
}

void pxa168_restart(char mode, const char *cmd)
{
soft_restart(0xffff0000);
}
1 change: 1 addition & 0 deletions arch/arm/mach-mmp/tavorevb.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,5 @@ MACHINE_START(TAVOREVB, "PXA910 Evaluation Board (aka TavorEVB)")
.init_irq = pxa910_init_irq,
.timer = &pxa910_timer,
.init_machine = tavorevb_init,
.restart = mmp_restart,
MACHINE_END
1 change: 1 addition & 0 deletions arch/arm/mach-mmp/teton_bga.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,5 @@ MACHINE_START(TETON_BGA, "PXA168-based Teton BGA Development Platform")
.init_irq = pxa168_init_irq,
.timer = &pxa168_timer,
.init_machine = teton_bga_init,
.restart = pxa168_restart,
MACHINE_END
1 change: 1 addition & 0 deletions arch/arm/mach-mmp/ttc_dkb.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,5 @@ MACHINE_START(TTC_DKB, "PXA910-based TTC_DKB Development Platform")
.init_irq = pxa910_init_irq,
.timer = &pxa910_timer,
.init_machine = ttc_dkb_init,
.restart = mmp_restart,
MACHINE_END

0 comments on commit 9854a38

Please sign in to comment.