tizen 2.4 release
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / cpu / armv7 / tiger / cpu_spec.S
1 #include <config.h>
2 #include <common.h>
3 #include <version.h>
4
5 #ifdef PLATFORM_SC8800G
6 #define REMAP 0x20900218
7 #define SVC_STACK_TEMP 0x40008000
8 #define GEN2_ADDR 0x8b00002c
9 #define ON_CHIP_RAM_EN 0xF
10 #endif
11
12 #ifdef PLATFORM_SC8800G
13 #define BIGEND_PROT_REG 0x20900290
14 #define AHB_CTRL5_REG 0x20900230
15 #endif
16
17 #ifdef CONFIG_SC8810
18 #define REMAP 0x20900218
19 #define SVC_STACK_TEMP 0x40008000
20 #define GEN2_ADDR 0x8b00002c
21 #define ON_CHIP_RAM_EN 0xF
22 #endif
23 #ifdef CONFIG_TIGER
24 #define REMAP 0x20900218
25 #define SVC_STACK_TEMP 0x00028000
26 #define GEN2_ADDR 0x8b00002c
27 #define ON_CHIP_RAM_EN 0xF
28 #endif
29
30 #ifdef CONFIG_SC8810
31 #define BIGEND_PROT_REG 0x20900290
32 #define AHB_CTRL5_REG 0x20900230
33 #endif
34
35 .globl cpu_spec
36 cpu_spec:
37 #if 0 /*sc8810*/
38         LDR    R0, =REMAP
39         LDR    R1, =0
40         STR    R1, [R0]
41
42         MRC p15,0,r0,c1,c0,0
43 #ifdef CHIP_ENDIAN_BIG
44         ORR r0,r0,#0x80
45 #else
46         BIC r0,r0,#0x80
47 #endif
48
49
50 #ifdef _LITTLE_ENDIAN
51         BIC r0,r0,#1 /*disable MMU*/
52         LDR r1,=0x1004
53         BIC r0,r0,r1  /*disable cache*/
54         LDR r1,=0x1000
55         ORR r0,r0,r1
56 #endif
57         MCR p15,0,r0,c1,c0,0
58
59         /*Set Endian Regs of SC8800G*/
60 #if defined(CHIP_ENDIAN_BIG) && defined(CONFIG_SC8810)
61         LDR     R0, =BIGEND_PROT_REG
62         MOV     R2, #0xD4
63         ORR     R2, R2, #0xC300
64         STR     R2,[R0]
65
66         LDR     R2, =AHB_CTRL5_REG
67         MOV     R1, #0xff
68         ORR     R1, R1, #0x300
69
70         STR     R1, [R2]
71         MOV     R1, #0
72         STR     R1, [R0]
73 #endif
74 #endif/*sc8810*/
75
76         /*set stack limit to 0*/
77         MOV    R10, #0
78
79 #if 0//sc8810
80 #if defined(PLATFORM_SC8800H) || defined(CONFIG_SC8810)
81 #else
82         /*Enable on chip ram for ARM*/
83         LDR     R0, =GEN2_ADDR
84         LDR     R1, =ON_CHIP_RAM_EN
85         LDR     R2, [R0]
86         ORR     R1, R1, R2
87         STR     R1, [R0]
88 #endif
89 #endif
90         /*set up temp stack*/
91         LDR    sp, =SVC_STACK_TEMP
92
93         STMDB sp!,{lr} 
94         bl lowlevel_init
95         @bl MMU_Init
96         /*Re-set up stack
97           The sp here must be in the reserved region
98           */
99         LDMIA sp!, {lr}
100         LDR     sp, =0x008f0000 
101
102         mov     pc,lr
103 /*end of function cpu_spec*/