* [U-Boot] [PATCH] s3c64xx: move reset_cpu to soc and support the soft reset at s3c6410
@ 2009-04-03 8:51 Minkyu Kang
2009-04-03 10:49 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 2+ messages in thread
From: Minkyu Kang @ 2009-04-03 8:51 UTC (permalink / raw)
To: u-boot
This patch support the soft reset at s3c6410
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
---
cpu/arm1176/cpu.c | 16 ----------------
cpu/arm1176/s3c64xx/interrupts.c | 15 +++++++++++++++
include/s3c6400.h | 5 +++++
3 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/cpu/arm1176/cpu.c b/cpu/arm1176/cpu.c
index 1e94f7d..fe41290 100644
--- a/cpu/arm1176/cpu.c
+++ b/cpu/arm1176/cpu.c
@@ -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 ();
diff --git a/cpu/arm1176/s3c64xx/interrupts.c b/cpu/arm1176/s3c64xx/interrupts.c
index 83f3806..e68f3ae 100644
--- a/cpu/arm1176/s3c64xx/interrupts.c
+++ b/cpu/arm1176/s3c64xx/interrupts.c
@@ -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*/
+}
diff --git a/include/s3c6400.h b/include/s3c6400.h
index fd3e99b..4bf5a7f 100644
--- a/include/s3c6400.h
+++ b/include/s3c6400.h
@@ -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
^ permalink raw reply related [flat|nested] 2+ messages in thread* [U-Boot] [PATCH] s3c64xx: move reset_cpu to soc and support the soft reset at s3c6410
2009-04-03 8:51 [U-Boot] [PATCH] s3c64xx: move reset_cpu to soc and support the soft reset at s3c6410 Minkyu Kang
@ 2009-04-03 10:49 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 2+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-04-03 10:49 UTC (permalink / raw)
To: u-boot
On 17:51 Fri 03 Apr , Minkyu Kang wrote:
> This patch support the soft reset at s3c6410
>
> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
> ---
> cpu/arm1176/cpu.c | 16 ----------------
> cpu/arm1176/s3c64xx/interrupts.c | 15 +++++++++++++++
> include/s3c6400.h | 5 +++++
> 3 files changed, 20 insertions(+), 16 deletions(-)
>
> diff --git a/cpu/arm1176/cpu.c b/cpu/arm1176/cpu.c
> index 1e94f7d..fe41290 100644
> --- a/cpu/arm1176/cpu.c
> +++ b/cpu/arm1176/cpu.c
> @@ -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 ();
> diff --git a/cpu/arm1176/s3c64xx/interrupts.c b/cpu/arm1176/s3c64xx/interrupts.c
cpu.c will be better because interrupts.c will be rename timer.c with the new
timer cleanup work
> index 83f3806..e68f3ae 100644
> --- a/cpu/arm1176/s3c64xx/interrupts.c
> +++ b/cpu/arm1176/s3c64xx/interrupts.c
> @@ -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?
> + /* loop forever and wait for reset to happen */
> + while (1) {
> + if (serial_tstc()) {
> + serial_getc();
> + break;
> + }
> + }
> + /*NOTREACHED*/
> +}
Best Regards,
J.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-03 10:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-03 8:51 [U-Boot] [PATCH] s3c64xx: move reset_cpu to soc and support the soft reset at s3c6410 Minkyu Kang
2009-04-03 10:49 ` Jean-Christophe PLAGNIOL-VILLARD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox