wdenk | b98ac28 | 2004-02-24 00:16:43 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2004 |
| 3 | * DAVE Srl |
| 4 | * http://www.dave-tech.it |
| 5 | * http://www.wawnet.biz |
| 6 | * mailto:info@wawnet.biz |
| 7 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame^] | 8 | * SPDX-License-Identifier: GPL-2.0+ |
wdenk | b98ac28 | 2004-02-24 00:16:43 +0000 | [diff] [blame] | 9 | */ |
| 10 | |
| 11 | /* |
| 12 | * S3C44B0 CPU specific code |
| 13 | */ |
| 14 | |
| 15 | #include <common.h> |
| 16 | #include <command.h> |
| 17 | #include <asm/hardware.h> |
| 18 | |
Jean-Christophe PLAGNIOL-VILLARD | de510ba | 2009-05-09 13:21:19 +0200 | [diff] [blame] | 19 | int arch_cpu_init (void) |
wdenk | b98ac28 | 2004-02-24 00:16:43 +0000 | [diff] [blame] | 20 | { |
| 21 | icache_enable(); |
| 22 | |
| 23 | return 0; |
| 24 | } |
| 25 | |
| 26 | int cleanup_before_linux (void) |
| 27 | { |
| 28 | /* |
| 29 | cache memory should be enabled before calling |
| 30 | Linux to make the kernel uncompression faster |
| 31 | */ |
| 32 | icache_enable(); |
| 33 | |
| 34 | disable_interrupts (); |
| 35 | |
| 36 | return 0; |
| 37 | } |
| 38 | |
| 39 | void reset_cpu (ulong addr) |
| 40 | { |
| 41 | /* |
| 42 | reset the cpu using watchdog |
| 43 | */ |
| 44 | |
| 45 | /* Disable the watchdog.*/ |
| 46 | WTCON&=~(1<<5); |
| 47 | |
| 48 | /* set the timeout value to a short time... */ |
| 49 | WTCNT = 0x1; |
| 50 | |
| 51 | /* Enable the watchdog. */ |
| 52 | WTCON|=1; |
| 53 | WTCON|=(1<<5); |
| 54 | |
| 55 | while(1) { |
| 56 | /*NOP*/ |
| 57 | } |
| 58 | } |