diff options
Diffstat (limited to 'arch/arm/boot')
-rw-r--r-- | arch/arm/boot/compressed/head.S | 105 |
1 files changed, 22 insertions, 83 deletions
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index c0e7aff3dec2..7c7f475e213e 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -18,48 +18,30 @@ | |||
18 | * Please select one of the following when turning on debugging. | 18 | * Please select one of the following when turning on debugging. |
19 | */ | 19 | */ |
20 | #ifdef DEBUG | 20 | #ifdef DEBUG |
21 | #if defined(CONFIG_DEBUG_DC21285_PORT) | 21 | |
22 | .macro loadsp, rb | 22 | #include <asm/arch/debug-macro.S> |
23 | mov \rb, #0x42000000 | 23 | |
24 | .endm | 24 | #if defined(CONFIG_DEBUG_ICEDCC) |
25 | .macro writeb, rb | ||
26 | str \rb, [r3, #0x160] | ||
27 | .endm | ||
28 | #elif defined(CONFIG_DEBUG_ICEDCC) | ||
29 | .macro loadsp, rb | 25 | .macro loadsp, rb |
30 | .endm | 26 | .endm |
31 | .macro writeb, rb | 27 | .macro writeb, ch, rb |
32 | mcr p14, 0, \rb, c0, c1, 0 | 28 | mcr p14, 0, \ch, c0, c1, 0 |
33 | .endm | ||
34 | #elif defined(CONFIG_FOOTBRIDGE) | ||
35 | .macro loadsp, rb | ||
36 | mov \rb, #0x7c000000 | ||
37 | .endm | 29 | .endm |
38 | .macro writeb, rb | 30 | #else |
39 | strb \rb, [r3, #0x3f8] | 31 | .macro writeb, ch, rb |
32 | senduart \ch, \rb | ||
40 | .endm | 33 | .endm |
41 | #elif defined(CONFIG_ARCH_RPC) | 34 | |
35 | #if defined(CONFIG_FOOTBRIDGE) || \ | ||
36 | defined(CONFIG_ARCH_RPC) || \ | ||
37 | defined(CONFIG_ARCH_INTEGRATOR) || \ | ||
38 | defined(CONFIG_ARCH_PXA) || \ | ||
39 | defined(CONFIG_ARCH_IXP4XX) || \ | ||
40 | defined(CONFIG_ARCH_IXP2000) || \ | ||
41 | defined(CONFIG_ARCH_LH7A40X) || \ | ||
42 | defined(CONFIG_ARCH_OMAP) | ||
42 | .macro loadsp, rb | 43 | .macro loadsp, rb |
43 | mov \rb, #0x03000000 | 44 | addruart \rb |
44 | orr \rb, \rb, #0x00010000 | ||
45 | .endm | ||
46 | .macro writeb, rb | ||
47 | strb \rb, [r3, #0x3f8 << 2] | ||
48 | .endm | ||
49 | #elif defined(CONFIG_ARCH_INTEGRATOR) | ||
50 | .macro loadsp, rb | ||
51 | mov \rb, #0x16000000 | ||
52 | .endm | ||
53 | .macro writeb, rb | ||
54 | strb \rb, [r3, #0] | ||
55 | .endm | ||
56 | #elif defined(CONFIG_ARCH_PXA) /* Xscale-type */ | ||
57 | .macro loadsp, rb | ||
58 | mov \rb, #0x40000000 | ||
59 | orr \rb, \rb, #0x00100000 | ||
60 | .endm | ||
61 | .macro writeb, rb | ||
62 | strb \rb, [r3, #0] | ||
63 | .endm | 45 | .endm |
64 | #elif defined(CONFIG_ARCH_SA1100) | 46 | #elif defined(CONFIG_ARCH_SA1100) |
65 | .macro loadsp, rb | 47 | .macro loadsp, rb |
@@ -70,65 +52,22 @@ | |||
70 | add \rb, \rb, #0x00010000 @ Ser1 | 52 | add \rb, \rb, #0x00010000 @ Ser1 |
71 | # endif | 53 | # endif |
72 | .endm | 54 | .endm |
73 | .macro writeb, rb | ||
74 | str \rb, [r3, #0x14] @ UTDR | ||
75 | .endm | ||
76 | #elif defined(CONFIG_ARCH_IXP4XX) | ||
77 | .macro loadsp, rb | ||
78 | mov \rb, #0xc8000000 | ||
79 | .endm | ||
80 | .macro writeb, rb | ||
81 | str \rb, [r3, #0] | ||
82 | #elif defined(CONFIG_ARCH_IXP2000) | ||
83 | .macro loadsp, rb | ||
84 | mov \rb, #0xc0000000 | ||
85 | orr \rb, \rb, #0x00030000 | ||
86 | .endm | ||
87 | .macro writeb, rb | ||
88 | str \rb, [r3, #0] | ||
89 | .endm | ||
90 | #elif defined(CONFIG_ARCH_LH7A40X) | ||
91 | .macro loadsp, rb | ||
92 | ldr \rb, =0x80000700 @ UART2 UARTBASE | ||
93 | .endm | ||
94 | .macro writeb, rb | ||
95 | strb \rb, [r3, #0] | ||
96 | .endm | ||
97 | #elif defined(CONFIG_ARCH_OMAP) | ||
98 | .macro loadsp, rb | ||
99 | mov \rb, #0xff000000 @ physical base address | ||
100 | add \rb, \rb, #0x00fb0000 | ||
101 | #if defined(CONFIG_OMAP_LL_DEBUG_UART2) || defined(CONFIG_OMAP_LL_DEBUG_UART3) | ||
102 | add \rb, \rb, #0x00000800 | ||
103 | #endif | ||
104 | #ifdef CONFIG_OMAP_LL_DEBUG_UART3 | ||
105 | add \rb, \rb, #0x00009000 | ||
106 | #endif | ||
107 | .endm | ||
108 | .macro writeb, rb | ||
109 | strb \rb, [r3] | ||
110 | .endm | ||
111 | #elif defined(CONFIG_ARCH_IOP331) | 55 | #elif defined(CONFIG_ARCH_IOP331) |
112 | .macro loadsp, rb | 56 | .macro loadsp, rb |
113 | mov \rb, #0xff000000 | 57 | mov \rb, #0xff000000 |
114 | orr \rb, \rb, #0x00ff0000 | 58 | orr \rb, \rb, #0x00ff0000 |
115 | orr \rb, \rb, #0x0000f700 @ location of the UART | 59 | orr \rb, \rb, #0x0000f700 @ location of the UART |
116 | .endm | 60 | .endm |
117 | .macro writeb, rb | ||
118 | str \rb, [r3, #0] | ||
119 | .endm | ||
120 | #elif defined(CONFIG_ARCH_S3C2410) | 61 | #elif defined(CONFIG_ARCH_S3C2410) |
121 | .macro loadsp, rb | 62 | .macro loadsp, rb |
122 | mov \rb, #0x50000000 | 63 | mov \rb, #0x50000000 |
123 | add \rb, \rb, #0x4000 * CONFIG_S3C2410_LOWLEVEL_UART_PORT | 64 | add \rb, \rb, #0x4000 * CONFIG_S3C2410_LOWLEVEL_UART_PORT |
124 | .endm | 65 | .endm |
125 | .macro writeb, rb | ||
126 | strb \rb, [r3, #0x20] | ||
127 | .endm | ||
128 | #else | 66 | #else |
129 | #error no serial architecture defined | 67 | #error no serial architecture defined |
130 | #endif | 68 | #endif |
131 | #endif | 69 | #endif |
70 | #endif | ||
132 | 71 | ||
133 | .macro kputc,val | 72 | .macro kputc,val |
134 | mov r0, \val | 73 | mov r0, \val |
@@ -734,7 +673,7 @@ puts: loadsp r3 | |||
734 | 1: ldrb r2, [r0], #1 | 673 | 1: ldrb r2, [r0], #1 |
735 | teq r2, #0 | 674 | teq r2, #0 |
736 | moveq pc, lr | 675 | moveq pc, lr |
737 | 2: writeb r2 | 676 | 2: writeb r2, r3 |
738 | mov r1, #0x00020000 | 677 | mov r1, #0x00020000 |
739 | 3: subs r1, r1, #1 | 678 | 3: subs r1, r1, #1 |
740 | bne 3b | 679 | bne 3b |