diff options
author | Byungho Min <bhminjames@gmail.com> | 2009-06-23 08:40:15 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2009-08-16 18:24:58 -0400 |
commit | 8acd1ade2ede18408303c968e1449220c427a182 (patch) | |
tree | 598b77da0749b07868f2de84f210511707fe9f93 /arch/arm/mach-s5pc100/include | |
parent | 433a915fc6456ee3a4b740fe4d92caa78164fdce (diff) |
ARM: S5PC100: CPU initialization
Signed-off-by: Byungho Min <bhmin@samsung.com>
[ben-linux@fluff.org: subject fixup]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s5pc100/include')
-rw-r--r-- | arch/arm/mach-s5pc100/include/mach/debug-macro.S | 38 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/include/mach/entry-macro.S | 50 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/include/mach/hardware.h | 14 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/include/mach/system.h | 24 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/include/mach/uncompress.h | 28 |
5 files changed, 154 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pc100/include/mach/debug-macro.S b/arch/arm/mach-s5pc100/include/mach/debug-macro.S new file mode 100644 index 000000000000..9d142ccf654b --- /dev/null +++ b/arch/arm/mach-s5pc100/include/mach/debug-macro.S | |||
@@ -0,0 +1,38 @@ | |||
1 | /* arch/arm/mach-s5pc100/include/mach/debug-macro.S | ||
2 | * | ||
3 | * Copyright 2009 Samsung Electronics Co. | ||
4 | * Byungho Min <bhmin@samsung.com> | ||
5 | * | ||
6 | * | ||
7 | * Based on mach-s3c6400/include/mach/debug-macro.S | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | /* pull in the relevant register and map files. */ | ||
15 | |||
16 | #include <mach/map.h> | ||
17 | #include <plat/regs-serial.h> | ||
18 | |||
19 | /* note, for the boot process to work we have to keep the UART | ||
20 | * virtual address aligned to an 1MiB boundary for the L1 | ||
21 | * mapping the head code makes. We keep the UART virtual address | ||
22 | * aligned and add in the offset when we load the value here. | ||
23 | */ | ||
24 | |||
25 | .macro addruart, rx | ||
26 | mrc p15, 0, \rx, c1, c0 | ||
27 | tst \rx, #1 | ||
28 | ldreq \rx, = S3C_PA_UART | ||
29 | ldrne \rx, = (S3C_VA_UART + S3C_PA_UART & 0xfffff) | ||
30 | add \rx, \rx, #(0x400 * CONFIG_DEBUG_S3C_UART) | ||
31 | .endm | ||
32 | |||
33 | /* include the reset of the code which will do the work, we're only | ||
34 | * compiling for a single cpu processor type so the default of s3c2440 | ||
35 | * will be fine with us. | ||
36 | */ | ||
37 | |||
38 | #include <plat/debug-macro.S> | ||
diff --git a/arch/arm/mach-s5pc100/include/mach/entry-macro.S b/arch/arm/mach-s5pc100/include/mach/entry-macro.S new file mode 100644 index 000000000000..67131939e626 --- /dev/null +++ b/arch/arm/mach-s5pc100/include/mach/entry-macro.S | |||
@@ -0,0 +1,50 @@ | |||
1 | /* arch/arm/mach-s5pc100/include/mach/entry-macro.S | ||
2 | * | ||
3 | * Copyright 2009 Samsung Electronics Co. | ||
4 | * Byungho Min <bhmin@samsung.com> | ||
5 | * | ||
6 | * Based on mach-s3c6400/include/mach/entry-macro.S | ||
7 | * | ||
8 | * Low-level IRQ helper macros for the Samsung S5PC1XX series | ||
9 | * | ||
10 | * This file is licensed under the terms of the GNU General Public | ||
11 | * License version 2. This program is licensed "as is" without any | ||
12 | * warranty of any kind, whether express or implied. | ||
13 | */ | ||
14 | |||
15 | #include <asm/hardware/vic.h> | ||
16 | #include <mach/map.h> | ||
17 | #include <plat/irqs.h> | ||
18 | |||
19 | .macro disable_fiq | ||
20 | .endm | ||
21 | |||
22 | .macro get_irqnr_preamble, base, tmp | ||
23 | ldr \base, =S3C_VA_VIC0 | ||
24 | .endm | ||
25 | |||
26 | .macro arch_ret_to_user, tmp1, tmp2 | ||
27 | .endm | ||
28 | |||
29 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
30 | |||
31 | @ check the vic0 | ||
32 | mov \irqnr, # S3C_IRQ_OFFSET + 31 | ||
33 | ldr \irqstat, [ \base, # VIC_IRQ_STATUS ] | ||
34 | teq \irqstat, #0 | ||
35 | |||
36 | @ otherwise try vic1 | ||
37 | addeq \tmp, \base, #(S3C_VA_VIC1 - S3C_VA_VIC0) | ||
38 | addeq \irqnr, \irqnr, #32 | ||
39 | ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] | ||
40 | teqeq \irqstat, #0 | ||
41 | |||
42 | @ otherwise try vic2 | ||
43 | addeq \tmp, \base, #(S3C_VA_VIC2 - S3C_VA_VIC0) | ||
44 | addeq \irqnr, \irqnr, #32 | ||
45 | ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] | ||
46 | teqeq \irqstat, #0 | ||
47 | |||
48 | clzne \irqstat, \irqstat | ||
49 | subne \irqnr, \irqnr, \irqstat | ||
50 | .endm | ||
diff --git a/arch/arm/mach-s5pc100/include/mach/hardware.h b/arch/arm/mach-s5pc100/include/mach/hardware.h new file mode 100644 index 000000000000..38ce8206a1a6 --- /dev/null +++ b/arch/arm/mach-s5pc100/include/mach/hardware.h | |||
@@ -0,0 +1,14 @@ | |||
1 | /* linux/arch/arm/mach-s5pc100/include/mach/hardware.h | ||
2 | * | ||
3 | * Copyright 2009 Samsung Electronics Co. | ||
4 | * Byungho Min <bhmin@samsung.com> | ||
5 | * | ||
6 | * S3C6400 - Hardware support | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_HARDWARE_H | ||
10 | #define __ASM_ARCH_HARDWARE_H __FILE__ | ||
11 | |||
12 | /* currently nothing here, placeholder */ | ||
13 | |||
14 | #endif /* __ASM_ARCH_HARDWARE_H */ | ||
diff --git a/arch/arm/mach-s5pc100/include/mach/system.h b/arch/arm/mach-s5pc100/include/mach/system.h new file mode 100644 index 000000000000..e39014375470 --- /dev/null +++ b/arch/arm/mach-s5pc100/include/mach/system.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* linux/arch/arm/mach-s5pc100/include/mach/system.h | ||
2 | * | ||
3 | * Copyright 2009 Samsung Electronics Co. | ||
4 | * Byungho Min <bhmin@samsung.com> | ||
5 | * | ||
6 | * S5PC1XX - system implementation | ||
7 | * | ||
8 | * Based on mach-s3c6400/include/mach/system.h | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_SYSTEM_H | ||
12 | #define __ASM_ARCH_SYSTEM_H __FILE__ | ||
13 | |||
14 | static void arch_idle(void) | ||
15 | { | ||
16 | /* nothing here yet */ | ||
17 | } | ||
18 | |||
19 | static void arch_reset(char mode, const char *cmd) | ||
20 | { | ||
21 | /* nothing here yet */ | ||
22 | } | ||
23 | |||
24 | #endif /* __ASM_ARCH_IRQ_H */ | ||
diff --git a/arch/arm/mach-s5pc100/include/mach/uncompress.h b/arch/arm/mach-s5pc100/include/mach/uncompress.h new file mode 100644 index 000000000000..01ccf535e76c --- /dev/null +++ b/arch/arm/mach-s5pc100/include/mach/uncompress.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* arch/arm/mach-s5pc100/include/mach/uncompress.h | ||
2 | * | ||
3 | * Copyright 2009 Samsung Electronics Co. | ||
4 | * Byungho Min <bhmin@samsung.com> | ||
5 | * | ||
6 | * S5PC100 - uncompress code | ||
7 | * | ||
8 | * Based on mach-s3c6400/include/mach/uncompress.h | ||
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 version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_UNCOMPRESS_H | ||
16 | #define __ASM_ARCH_UNCOMPRESS_H | ||
17 | |||
18 | #include <mach/map.h> | ||
19 | #include <plat/uncompress.h> | ||
20 | |||
21 | static void arch_detect_cpu(void) | ||
22 | { | ||
23 | /* we do not need to do any cpu detection here at the moment. */ | ||
24 | fifo_mask = S3C2440_UFSTAT_TXMASK; | ||
25 | fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT; | ||
26 | } | ||
27 | |||
28 | #endif /* __ASM_ARCH_UNCOMPRESS_H */ | ||