0a2c475f718ca0361edd5a940ea8933ffc7da66f
[fw/openocd] / tcl / board / uptech_2410.cfg
1 # Target Configuration for the Uptech 2410 board.
2 # This configuration should also work on smdk2410, but I haven't tested it yet.
3 # Author: xionglingfeng@Gmail.com
4
5 source [find target/samsung_s3c2410.cfg]
6
7 $_TARGETNAME configure -event reset-init { uptech2410_init }
8 $_TARGETNAME configure -event gdb-attach { reset init }
9
10 proc init_pll_sdram { } {
11         #echo "---------- Initializing PLL and SDRAM ---------"
12         #watchdog timer disable
13         mww phys 0x53000000 0x00000000
14
15         #disable all interrupts
16         mww phys 0x4a000008 0xffffffff
17
18         #disable all sub-interrupts
19         mww phys 0x4a00001c 0x000007ff
20
21         #clear all source pending bits
22         mww phys 0x4a000000 0xffffffff
23
24         #clear all sub-source pending bits
25         mww phys 0x4a000018 0x000007ff
26
27         #clear interrupt pending bit
28         mww phys 0x4a000010 0xffffffff
29
30         #PLL locktime counter
31         mww phys 0x4c000000 0x00ffffff
32
33         #Fin=12MHz Fout=202.8MHz
34         #mww phys 0x4c000004 0x000a1031
35
36         #FCLK:HCLK:PCLK = 1:2:4
37         mww phys 0x4c000014 0x00000003
38
39
40         mww phys 0x48000000 0x11111110
41         mww phys 0x48000004 0x00007FFC
42         mww phys 0x48000008 0x00007FFC
43         mww phys 0x4800000c 0x00000700
44         mww phys 0x48000010 0x00000700
45         mww phys 0x48000014 0x00002E50
46         mww phys 0x48000018 0x00002E50
47         mww phys 0x4800001c 0x00018005
48         mww phys 0x48000020 0x00018005
49         mww phys 0x48000024 0x008c04e9
50         mww phys 0x48000028 0x000000b2
51         mww phys 0x4800002c 0x00000030
52         mww phys 0x48000030 0x00000030
53 }
54
55 proc uptech2410_init { } {
56         init_pll_sdram
57         #echo "---------- Probing Nand flash ----------"
58         nand probe 0
59         #echo "---------- Enable some functions ----------"
60 }
61
62 set _NANDNAME $_CHIPNAME.nand
63 nand device $_NANDNAME s3c2410 $_TARGETNAME