aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/boot
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/boot')
-rw-r--r--arch/arm/boot/compressed/Makefile4
-rw-r--r--arch/arm/boot/compressed/head.S22
-rw-r--r--arch/arm/boot/compressed/misc.c21
3 files changed, 41 insertions, 6 deletions
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 2adc1527e0eb..adddc7131685 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -51,7 +51,11 @@ OBJS += head-at91rm9200.o
51endif 51endif
52 52
53ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) 53ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
54ifeq ($(CONFIG_CPU_CP15),y)
54OBJS += big-endian.o 55OBJS += big-endian.o
56else
57# The endian should be set by h/w design.
58endif
55endif 59endif
56 60
57# 61#
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index 14a9ff9c68df..e5ab51b9cceb 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -20,11 +20,21 @@
20#ifdef DEBUG 20#ifdef DEBUG
21 21
22#if defined(CONFIG_DEBUG_ICEDCC) 22#if defined(CONFIG_DEBUG_ICEDCC)
23
24#ifdef CONFIG_CPU_V6
25 .macro loadsp, rb
26 .endm
27 .macro writeb, ch, rb
28 mcr p14, 0, \ch, c0, c5, 0
29 .endm
30#else
23 .macro loadsp, rb 31 .macro loadsp, rb
24 .endm 32 .endm
25 .macro writeb, ch, rb 33 .macro writeb, ch, rb
26 mcr p14, 0, \ch, c0, c1, 0 34 mcr p14, 0, \ch, c0, c1, 0
27 .endm 35 .endm
36#endif
37
28#else 38#else
29 39
30#include <asm/arch/debug-macro.S> 40#include <asm/arch/debug-macro.S>
@@ -42,12 +52,6 @@
42 add \rb, \rb, #0x00010000 @ Ser1 52 add \rb, \rb, #0x00010000 @ Ser1
43#endif 53#endif
44 .endm 54 .endm
45#elif defined(CONFIG_ARCH_IOP331)
46 .macro loadsp, rb
47 mov \rb, #0xff000000
48 orr \rb, \rb, #0x00ff0000
49 orr \rb, \rb, #0x0000f700 @ location of the UART
50 .endm
51#elif defined(CONFIG_ARCH_S3C2410) 55#elif defined(CONFIG_ARCH_S3C2410)
52 .macro loadsp, rb 56 .macro loadsp, rb
53 mov \rb, #0x50000000 57 mov \rb, #0x50000000
@@ -78,9 +82,11 @@
78 kphex r6, 8 /* processor id */ 82 kphex r6, 8 /* processor id */
79 kputc #':' 83 kputc #':'
80 kphex r7, 8 /* architecture id */ 84 kphex r7, 8 /* architecture id */
85#ifdef CONFIG_CPU_CP15
81 kputc #':' 86 kputc #':'
82 mrc p15, 0, r0, c1, c0 87 mrc p15, 0, r0, c1, c0
83 kphex r0, 8 /* control reg */ 88 kphex r0, 8 /* control reg */
89#endif
84 kputc #'\n' 90 kputc #'\n'
85 kphex r5, 8 /* decompressed kernel start */ 91 kphex r5, 8 /* decompressed kernel start */
86 kputc #'-' 92 kputc #'-'
@@ -503,7 +509,11 @@ call_kernel: bl cache_clean_flush
503 */ 509 */
504 510
505call_cache_fn: adr r12, proc_types 511call_cache_fn: adr r12, proc_types
512#ifdef CONFIG_CPU_CP15
506 mrc p15, 0, r6, c0, c0 @ get processor ID 513 mrc p15, 0, r6, c0, c0 @ get processor ID
514#else
515 ldr r6, =CONFIG_PROCESSOR_ID
516#endif
5071: ldr r1, [r12, #0] @ get value 5171: ldr r1, [r12, #0] @ get value
508 ldr r2, [r12, #4] @ get mask 518 ldr r2, [r12, #4] @ get mask
509 eor r1, r1, r6 @ (real ^ match) 519 eor r1, r1, r6 @ (real ^ match)
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index ace3fb5835d9..283891c736c4 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -30,6 +30,25 @@ static void putstr(const char *ptr);
30#include <asm/arch/uncompress.h> 30#include <asm/arch/uncompress.h>
31 31
32#ifdef CONFIG_DEBUG_ICEDCC 32#ifdef CONFIG_DEBUG_ICEDCC
33
34#ifdef CONFIG_CPU_V6
35
36static void icedcc_putc(int ch)
37{
38 int status, i = 0x4000000;
39
40 do {
41 if (--i < 0)
42 return;
43
44 asm volatile ("mrc p14, 0, %0, c0, c1, 0" : "=r" (status));
45 } while (status & (1 << 29));
46
47 asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch));
48}
49
50#else
51
33static void icedcc_putc(int ch) 52static void icedcc_putc(int ch)
34{ 53{
35 int status, i = 0x4000000; 54 int status, i = 0x4000000;
@@ -44,6 +63,8 @@ static void icedcc_putc(int ch)
44 asm("mcr p14, 0, %0, c1, c0, 0" : : "r" (ch)); 63 asm("mcr p14, 0, %0, c1, c0, 0" : : "r" (ch));
45} 64}
46 65
66#endif
67
47#define putc(ch) icedcc_putc(ch) 68#define putc(ch) icedcc_putc(ch)
48#define flush() do { } while (0) 69#define flush() do { } while (0)
49#endif 70#endif