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-atmel / head.S
blob32023b6c0d1c9285de7329a5a02778fa6acbc31f
1 /*
2  *  linux/arch/arm/mach-atmel/head.S
3  *
4  *  Copyright (C) 2003 Hyok S. Choi
5  *  <hyok.choi@samsung.com>
6  *
7  *  uClinux kernel startup code for atmel
8  *  which has no bootloader
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23  */
24 #include <linux/linkage.h>
25 #include <linux/init.h>
27 #include <asm/assembler.h>
28 #include <asm/mach-types.h>
29 #include <asm/procinfo.h>
30 #include <asm/ptrace.h>
31 #include <asm/asm-offsets.h>
32 #include <asm/mach/arch.h>
34 #define MACHINFO_TYPE           0
35 #define MACHINFO_PHYSRAM        4
36 #define MACHINFO_PHYSIO         8
37 #define MACHINFO_PGOFFIO        12
38 #define MACHINFO_NAME           16
41  * Kernel startup entry point.
42  */
43         __INIT
44         .type   stext, #function
45 ENTRY(stext)
46         mov     r12, r0
47         mov     r0, #PSR_F_BIT | PSR_I_BIT | SVC_MODE   @ make sure svc mode
48         msr     cpsr_c, r0                              @ and all irqs disabled
50         adr     r5, LC0
51         ldmia   r5, {r5, r6, r8, r9, sp}                @ Setup stack
53         /*  Copy data sections to their new home.  */
56         /*  Clear BSS */
57         mov     r4, #0
58 1:      cmp     r5, r8
59         strcc   r4, [r5],#4
60         bcc     1b
62         /*  Pretend we know what our processor code is (for arm_id)   */
64         ldr     r2, L_AT91_SF_CIDR
65         ldr     r2, [r2]                @ read processor id
67         str     r2, [r6]
68         mov     r2, #MACH_TYPE_ATMEL
69         str     r2, [r9]
71         mov fp, #0
72         b       start_kernel
74 LC0:    .long   __bss_start
75         .long   processor_id
76         .long   _end
77         .long   __machine_arch_type
78         .long   init_thread_union+8192
80 L_AT91_SF_CIDR:
81         .long   0xfff00000
83 #include "../kernel/head-common.S"