2fb6a7973269a1e9bb0ea8ae108237ef527cbd0e
[bootloader-ap.git] / arch / arm-head.S
1 /*
2   Initialise the Applications Processor
3   Copyright (c) 2010 TJ <linux@tjworld.net>
4
5     This program is free software: you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation, either version 3 of the License, or
8     (at your option) any later version.
9
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14
15     You should have received a copy of the GNU General Public License
16     along with this program (See the COPYRIGHT file the base directory).
17     If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include <boot/linkage.h>
21 #include <boot/version.h>
22
23     .section ".start", #alloc, #execinstr
24 ENTRY(_start)
25     .type _start,#function
26     b       __cpu_early_init
27
28 version:
29     .align 2
30     .asciz VERSION
31     .align 4
32 description:
33     .align 2
34     .asciz DESCRIPTION
35     .align 4
36 release:
37     .align 2
38     .asciz RELEASE
39     .align 4
40 arch:
41     .align 2
42     .asciz IMG_NAME_ARCHITECTURE
43     .align 4
44 build:
45     .align 2
46     .asciz BUILD_STRING
47     .align 4
48
49 ENTRY(__cpu_early_init)
50     mrc     p15,0,r0,c1,c0          @ read control register configuration data
51     bic     r0,r0,#0x0000B000       @ clear bit 10: Should Be Zero
52     bic     r0,r0,#0x00000005       @ bit 2: data cache disabled. bit 0: MMU disable
53     orr     r0,r0,#0x00000002       @ bit 1: strict alignment checks enabled
54     mcr     p15,0,r0,c1,c0          @write control register configuration
55     bl      __init_msm_7x30
56 .ltorg
57
58 // EOF