s3c64xx: move reset_cpu to soc and support the soft reset at s3c6410
PATCH 1/1 s3c64xx: move reset_cpu to soc and support the soft reset at s3c6410
This patch support the soft reset at s3c6410
Signed-off-by Minkyu Kang <[email protected]>
--- cpu/arm1176/cpu.c | 16 ---------------- cpu/arm1176/s3c64xx/interrupts.c | 15 +++++++++++++++ include/s3c6400.h | 5 +++++ 3 files changed, 20 insertions(+), 16 deletions(-)
cpu/arm1176/cpu.c +0 -16
@@ -107,22 +107,6 @@ int cleanup_before_linux (void)return 0 ; } - -/* * reset the cpu by setting up the watchdog timer and let him time out */ -void reset_cpu (ulong ignored) -{ -printf ("reset... \n\n\n" ); -SW_RST_REG =0x6400 ; -/* loop forever and wait for reset to happen */ -while (1 ) { -if (serial_tstc ()) { -serial_getc (); -break ; - } - } -/*NOTREACHED*/ -} -int do_reset (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) {disable_interrupts ();
cpu/arm1176/s3c64xx/interrupts.c +15 -0
@@ -175,3 +175,18 @@ void udelay(unsigned long usec)while (get_ticks () < tmp)/* loop till event */ /*NOP*/ ; } + +/* reset the cpu by setting up the watchdog timer and let him time out */ +void reset_cpu (ulong ignored) +{ +printf ("reset... \n\n\n" ); +SW_RST_REG =SW_RST_CODE ; +/* loop forever and wait for reset to happen */ +while (1 ) { +if (serial_tstc ()) { +serial_getc (); +break ; + } + } +/*NOTREACHED*/ +}
include/s3c6400.h +5 -0
@@ -203,6 +203,11 @@#define INF_REG6 (ELFIN_CLOCK_POWER_BASE + INF_REG6_OFFSET)#define INF_REG7 (ELFIN_CLOCK_POWER_BASE + INF_REG7_OFFSET) +#if defined(CONFIG_S3C6410 ) +#define SW_RST_CODE 0x6410 +#else +#define SW_RST_CODE 0x6400 +#endif /* * GPIO
PATCH 1/1 s3c64xx: move reset_cpu to soc and support the soft reset at s3c6410
cpu/arm1176/s3c64xx/interrupts.c
Quoted 37 lines · Minkyu Kang
This patch support the soft reset at s3c6410
Signed-off-by Minkyu Kang <[email protected]>--- cpu/arm1176/cpu.c | 16 ---------------- cpu/arm1176/s3c64xx/interrupts.c | 15 +++++++++++++++ include/s3c6400.h | 5 +++++ 3 files changed, 20 insertions(+), 16 deletions(-)cpu/arm1176/cpu.c +0
-16@@ -107,22 +107,6 @@ int cleanup_before_linux (void)return 0 ; } - -/* * reset the cpu by setting up the watchdog timer and let him time out */ -void reset_cpu (ulong ignored) -{ -printf ("reset... \n\n\n" ); -SW_RST_REG =0x6400 ; -/* loop forever and wait for reset to happen */ -while (1 ) { -if (serial_tstc ()) { -serial_getc (); -break ; - } - } -/*NOTREACHED*/ -} -int do_reset (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) {disable_interrupts ();cpu/arm1176/s3c64xx/interrupts.c +0
-0
cpu.c will be better because interrupts.c will be rename timer.c with the new timer cleanup work
cpu/arm1176/s3c64xx/interrupts.c void udelay(unsigned long usec) · line 183
Quoted 13 lines
index 83f3806..e68f3ae 100644
cpu/arm1176/s3c64xx/interrupts.c +6
-0@@ -175,3 +175,18 @@ void udelay(unsigned long usec)while (get_ticks () < tmp)/* loop till event */ /*NOP*/ ; } + +/* reset the cpu by setting up the watchdog timer and let him time out */ +void reset_cpu (ulong ignored) +{ +printf ("reset... \n\n\n" ); +SW_RST_REG =SW_RST_CODE ;
writel?
cpu/arm1176/s3c64xx/interrupts.c void udelay(unsigned long usec) · line 192
Quoted 9 lines
cpu/arm1176/s3c64xx/interrupts.c +9
-0+/* loop forever and wait for reset to happen */ +while (1 ) { +if (serial_tstc ()) { +serial_getc (); +break ; + } + } +/*NOTREACHED*/ +}
Best Regards,
J.