Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57119
b: refs/heads/master
c: eca8c24
h: refs/heads/master
i:
  57117: 625edaa
  57115: ef42472
  57111: 889990c
  57103: a448a38
  57087: c4afeac
v: v3
  • Loading branch information
Ben Dooks authored and Russell King committed May 30, 2007
1 parent 88d6e53 commit cb8d440
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 486cab2ba25b469f7a8822e84fd43960a472e3d9
refs/heads/master: eca8c2424171b6b6b2dcb0faa92dfddd1e3297d9
24 changes: 24 additions & 0 deletions trunk/arch/arm/mach-s3c2412/s3c2412.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/list.h>
#include <linux/timer.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/sysdev.h>
#include <linux/serial_core.h>
#include <linux/platform_device.h>
Expand All @@ -29,6 +30,7 @@
#include <asm/io.h>
#include <asm/irq.h>

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

#include <asm/arch/regs-clock.h>
Expand All @@ -38,6 +40,7 @@
#include <asm/arch/regs-gpioj.h>
#include <asm/arch/regs-dsc.h>
#include <asm/arch/regs-spi.h>
#include <asm/arch/regs-s3c2412.h>

#include <asm/plat-s3c24xx/s3c2412.h>
#include <asm/plat-s3c24xx/cpu.h>
Expand Down Expand Up @@ -106,6 +109,23 @@ static void s3c2412_idle(void)
cpu_do_idle();
}

static void s3c2412_hard_reset(void)
{
/* errata "Watch-dog/Software Reset Problem" specifies that
* this reset must be done with the SYSCLK sourced from
* EXTCLK instead of FOUT to avoid a glitch in the reset
* mechanism.
*
* See the watchdog section of the S3C2412 manual for more
* information on this fix.
*/

__raw_writel(0x00, S3C2412_CLKSRC);
__raw_writel(S3C2412_SWRST_RESET, S3C2412_SWRST);

mdelay(1);
}

/* s3c2412_map_io
*
* register the standard cpu IO areas, and any passed in from the
Expand All @@ -122,6 +142,10 @@ void __init s3c2412_map_io(struct map_desc *mach_desc, int mach_size)

s3c24xx_idle = s3c2412_idle;

/* set custom reset hook */

s3c24xx_reset_hook = s3c2412_hard_reset;

/* register our io-tables */

iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc));
Expand Down
21 changes: 21 additions & 0 deletions trunk/include/asm-arm/arch-s3c2410/regs-s3c2412.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* linux/include/asm-arm/arch-s3c2410/regs-s3c2412.h
*
* Copyright 2007 Simtec Electronics
* http://armlinux.simtec.co.uk/
* Ben Dooks <ben@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.
*
* S3C2412 specific register definitions
*/

#ifndef __ASM_ARCH_REGS_S3C2412_H
#define __ASM_ARCH_REGS_S3C2412_H "s3c2412"

#define S3C2412_SWRST (S3C24XX_VA_CLKPWR + 0x30)
#define S3C2412_SWRST_RESET (0x533C2412)

#endif /* __ASM_ARCH_REGS_S3C2412_H */

0 comments on commit cb8d440

Please sign in to comment.