X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=cpu%2Farm920t%2Fs3c24x0%2Finterrupts.c;h=ba835f3cafd3c7d7ba0638c1592e78ed95f961ec;hb=b304c96871c92d1ec8fa57dda36cc198660fd10e;hp=868621fa5e91ddbacef46bb24ac4b2b26f7146d4;hpb=12b43d515c62682fcf7b578f31920a2be49142fe;p=u-boot diff --git a/cpu/arm920t/s3c24x0/interrupts.c b/cpu/arm920t/s3c24x0/interrupts.c index 868621fa5e..ba835f3caf 100644 --- a/cpu/arm920t/s3c24x0/interrupts.c +++ b/cpu/arm920t/s3c24x0/interrupts.c @@ -185,4 +185,31 @@ ulong get_tbclk (void) return tbclk; } +/* + * reset the cpu by setting up the watchdog timer and let him time out + */ +void reset_cpu (ulong ignored) +{ + S3C24X0_WATCHDOG * const watchdog; + +#ifdef CONFIG_TRAB + disable_vfd(); +#endif + + watchdog = S3C24X0_GetBase_WATCHDOG(); + + /* Disable watchdog */ + watchdog->WTCON = 0x0000; + + /* Initialize watchdog timer count register */ + watchdog->WTCNT = 0x0001; + + /* Enable watchdog timer; assert reset at timer timeout */ + watchdog->WTCON = 0x0021; + + while(1); /* loop forever and wait for reset to happen */ + + /*NOTREACHED*/ +} + #endif /* defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) */