1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#include <linux/linkage.h>
16#include <asm/mach-types.h>
17
18#ifndef CONFIG_PXA_SHARPSL
19
20#endif
21
22 .section ".start", "ax"
23
24__SharpSL_start:
25
26
27 ldr r7, .TOSAID
28 mov r1,
29 mov r6,
30 ldrh r3, [r1,
31 cmp r6, r3
32 beq .SHARPEND @ Success -> tosa
33
34
35 mrc p15, 0, r4, c0, c0 @ Get Processor ID
36 and r4, r4,
37 ldr r3, .PXA270ID
38 cmp r4, r3
39 beq .PXA270
40
41
42 ldr r1, .W100ADDR @ Base address of w100 chip + regs offset
43
44 mov r6,
45 str r6, [r1,
46 mov r5,
47.W100LOOP:
48 subs r5, r5,
49 bne .W100LOOP
50 mov r6,
51 str r6, [r1,
52
53 ldr r6, [r1,
54 ldr r3, .W100ID
55 ldr r7, .POODLEID
56 cmp r6, r3
57 bne .SHARPEND @ We have no w100 - Poodle
58
59
60 ldr r7, .CORGIID
61 ldr r3, .PXA255ID
62 cmp r4, r3
63 blo .SHARPEND @ We have a PXA250 - Corgi
64
65
66 bl get_flash_ids
67 ldr r7, .SHEPHERDID
68 cmp r3,
69 beq .SHARPEND @ We have Shepherd
70
71
72 ldr r7, .HUSKYID @ Must be Husky
73 b .SHARPEND
74
75.PXA270:
76
77 bl get_flash_ids
78 ldr r7, .SPITZID
79 cmp r3,
80 beq .SHARPEND @ We have Spitz
81
82
83 ldr r1, .SCOOP2ADDR
84 ldr r7, .BORZOIID
85 mov r6,
86 strh r6, [r1]
87 ldrh r6, [r1]
88 cmp r6,
89 beq .SHARPEND @ We have Borzoi
90
91
92 ldr r7, .AKITAID
93 b .SHARPEND @ We have Borzoi
94
95.PXA255ID:
96 .word 0x69052d00 @ PXA255 Processor ID
97.PXA270ID:
98 .word 0x69054100 @ PXA270 Processor ID
99.W100ID:
100 .word 0x57411002 @ w100 Chip ID
101.W100ADDR:
102 .word 0x08010000 @ w100 Chip ID Reg Address
103.SCOOP2ADDR:
104 .word 0x08800040
105.POODLEID:
106 .word MACH_TYPE_POODLE
107.CORGIID:
108 .word MACH_TYPE_CORGI
109.SHEPHERDID:
110 .word MACH_TYPE_SHEPHERD
111.HUSKYID:
112 .word MACH_TYPE_HUSKY
113.TOSAID:
114 .word MACH_TYPE_TOSA
115.SPITZID:
116 .word MACH_TYPE_SPITZ
117.AKITAID:
118 .word MACH_TYPE_AKITA
119.BORZOIID:
120 .word MACH_TYPE_BORZOI
121
122
123
124
125
126
127get_flash_ids:
128 mov r1,
129 ldrb r3, [r1,
130 bic r3, r3,
131 orr r3, r3,
132 strb r3, [r1,
133 mov r2,
134 strb r2, [r1,
135 bic r3, r3,
136 orr r3, r3,
137 strb r3, [r1,
138 mov r2,
139 strb r2, [r1,
140 bic r3, r3,
141 strb r3, [r1,
142.fids1:
143 ldrb r3, [r1,
144 tst r3,
145 beq .fids1
146 ldrb r2, [r1,
147 ldrb r3, [r1,
148 mov pc, lr
149
150.SHARPEND:
151