Skip to content

Commit

Permalink
[ARM] 4204/1: S3C24XX: add hook to specify cpu reset
Browse files Browse the repository at this point in the history
Add hook code to specify cpu specific reset call

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Ben Dooks authored and Russell King committed Feb 16, 2007
1 parent d9c0ebb commit d4156d5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
22 changes: 22 additions & 0 deletions include/asm-arm/arch-s3c2410/reset.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* linux/include/asm-arm/arch-s3c2410/reset.h
*
* Copyright (c) 2007 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
* http://armlinux.simtec.co.uk/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* S3C2410 CPU reset controls
*/

#ifndef __ASM_ARCH_RESET_H
#define __ASM_ARCH_RESET_H __FILE__

/* This allows the over-ride of the default reset code
*/

extern void (*s3c24xx_reset_hook)(void);

#endif /* __ASM_ARCH_RESET_H */
6 changes: 5 additions & 1 deletion include/asm-arm/arch-s3c2410/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@

#include <asm/arch/map.h>
#include <asm/arch/idle.h>
#include <asm/arch/reset.h>

#include <asm/arch/regs-watchdog.h>
#include <asm/arch/regs-clock.h>

void (*s3c24xx_idle)(void);
void (*s3c24xx_reset_hook)(void);

void s3c24xx_default_idle(void)
{
Expand Down Expand Up @@ -54,14 +56,16 @@ static void arch_idle(void)
s3c24xx_default_idle();
}


static void
arch_reset(char mode)
{
if (mode == 's') {
cpu_reset(0);
}

if (s3c24xx_reset_hook)
s3c24xx_reset_hook();

printk("arch_reset: attempting watchdog reset\n");

__raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */
Expand Down

0 comments on commit d4156d5

Please sign in to comment.