MOXA linux-2.6.x / linux-2.6.19-uc1 from UC-7110-LX-BOOTLOADER-1.9_VERSION-4.2.tgz
[linux-2.6.19-moxart.git] / arch / arm / mach-espd_4510b / head.S
blob3044cfc4e2ad3de9717d58afcb354b7a9e47b0d4
1 /*
2  *  linux/arch/armnommu/mach-espd_4510b/head.S
3  *
4  *  Copyright (C) 2003 Hyok S. Choi
5  *  <hyok.choi@samsung.com>
6  *
7  *  uClinux kernel startup code for s3c4510b
8  */
9 #include <linux/linkage.h>
10 #include <linux/init.h>
12 #include <asm/hardware.h>
13 #include <asm/assembler.h>
14 #include <asm/mach-types.h>
15 #include <asm/procinfo.h>
16 #include <asm/ptrace.h>
17 #include <asm/mach/arch.h>
19 #define MACHINFO_TYPE           0
20 #define MACHINFO_PHYSRAM        4
21 #define MACHINFO_PHYSIO         8
22 #define MACHINFO_PGOFFIO        12
23 #define MACHINFO_NAME           16
26  * Kernel startup entry point.
27  */
28         __INIT
29         .type   stext, #function
30 ENTRY(stext)
31         mov     r12, r0
32         mov     r0, #PSR_F_BIT | PSR_I_BIT | SVC_MODE   @ make sure svc mode
33         msr     cpsr_c, r0                      @ and all irqs disabled
35         adr     r5, LC0
36         ldmia   r5, {r5, r6, r8, r9, sp}                        @ Setup stack
38         /*  Copy data sections to their new home.  */
41         /*  Clear BSS */
42         mov     r4, #0
43 1:      cmp     r5, r8                                  
44         strcc   r4, [r5],#4
45         bcc     1b
47         /*  Pretend we know what our processor code is (for arm_id)   */
49         /* cache clean and flush
51  * cf. Ch-5 of S3C4510 user's manual for
52  *     "Cache flush operation"
53  * To clear Tag RAM area.
54  */
55         ldr     r4, =0x11000000
56         mov     r5, #0
57         mov     r0, #256
58 cache_flush_loop:
59         str     r5, [r4], #4
60         subs    r0, r0, #1
61         bne     cache_flush_loop
63         /* cache/write buffer on */
64         ldr     r0, =0x3FF0000          @ SYSCFG
65         ldr     r2, [r0]
66         bic     r2, r2, #0x30
67         orr     r2, r2, #0x10           @ 0-Kbyte SRAM, 8-Kbyte cache
68         orr     r2, r2, #6              @ Cache and write buffer
69         str     r2, [r0]
71         ldr     r5, =REG_IOPDATA
72         /* P0: LED, P2: ETH_MDDIS */
73         ldr     r4, =0xFA
74         str     r4, [r5]
75         
76         ldr     r2, S3C4510B_PROCESSOR_TYPE
78         str     r2, [r6]
79         ldr     r2, ESPD_4510B_MACH_TYPE
80         str     r2, [r9]
82         mov fp, #0
83         b       start_kernel
84         
85 LC0:    .long   __bss_start
86         .long   processor_id
87         .long   _end
88         .long   __machine_arch_type
89         .long   init_thread_union+8192
90         
91 S3C4510B_PROCESSOR_TYPE:
92         .long   0x36807001
93 ESPD_4510B_MACH_TYPE:
94         .long   MACH_TYPE_ESPD_4510B
96 #include "../kernel/head-common.S"