diff options
author | Changhwan Youn <chaos.youn@samsung.com> | 2010-07-26 08:08:52 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-08-05 05:32:41 -0400 |
commit | 2b12b5c4ff9e0f1c5f4e5d5bde57b919fe522df2 (patch) | |
tree | 4e55113c74f9946b6f267449977a0bddb816c323 /arch/arm/mach-s5pv310/include | |
parent | 88baf2096c1c625c14831bc3438fd1e69bf1cef5 (diff) |
ARM: S5PV310: Add new CPU initialization support
This patch adds Samsung S5PV310/S5PC210 CPU support.
The S5PV310/S5PC210 integrates a ARM Cortex A9 multi-core.
Signed-off-by: Changhwan Youn <chaos.youn@samsung.com>
Signed-off-by: Jongpill Lee <boyko.lee@samsung.com>
Signed-off-by: Jiseong Oh <jiseong.oh@samsung.com>
[kgene.kim@samsung.com: fix build errors]
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5pv310/include')
-rw-r--r-- | arch/arm/mach-s5pv310/include/mach/debug-macro.S | 36 | ||||
-rw-r--r-- | arch/arm/mach-s5pv310/include/mach/entry-macro.S | 84 | ||||
-rw-r--r-- | arch/arm/mach-s5pv310/include/mach/gpio.h | 135 | ||||
-rw-r--r-- | arch/arm/mach-s5pv310/include/mach/hardware.h | 18 | ||||
-rw-r--r-- | arch/arm/mach-s5pv310/include/mach/io.h | 26 | ||||
-rw-r--r-- | arch/arm/mach-s5pv310/include/mach/map.h | 69 | ||||
-rw-r--r-- | arch/arm/mach-s5pv310/include/mach/memory.h | 22 | ||||
-rw-r--r-- | arch/arm/mach-s5pv310/include/mach/smp.h | 29 | ||||
-rw-r--r-- | arch/arm/mach-s5pv310/include/mach/system.h | 22 | ||||
-rw-r--r-- | arch/arm/mach-s5pv310/include/mach/timex.h | 29 | ||||
-rw-r--r-- | arch/arm/mach-s5pv310/include/mach/uncompress.h | 30 | ||||
-rw-r--r-- | arch/arm/mach-s5pv310/include/mach/vmalloc.h | 22 |
12 files changed, 522 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv310/include/mach/debug-macro.S b/arch/arm/mach-s5pv310/include/mach/debug-macro.S new file mode 100644 index 000000000000..6fb3893486be --- /dev/null +++ b/arch/arm/mach-s5pv310/include/mach/debug-macro.S | |||
@@ -0,0 +1,36 @@ | |||
1 | /* linux/arch/arm/mach-s5pv310/include/mach/debug-macro.S | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Based on arch/arm/mach-s3c6400/include/mach/debug-macro.S | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | /* pull in the relevant register and map files. */ | ||
14 | |||
15 | #include <mach/map.h> | ||
16 | |||
17 | /* note, for the boot process to work we have to keep the UART | ||
18 | * virtual address aligned to an 1MiB boundary for the L1 | ||
19 | * mapping the head code makes. We keep the UART virtual address | ||
20 | * aligned and add in the offset when we load the value here. | ||
21 | */ | ||
22 | |||
23 | .macro addruart, rx, tmp | ||
24 | mrc p15, 0, \rx, c1, c0 | ||
25 | tst \rx, #1 | ||
26 | ldreq \rx, = S3C_PA_UART | ||
27 | ldrne \rx, = S3C_VA_UART | ||
28 | #if CONFIG_DEBUG_S3C_UART != 0 | ||
29 | add \rx, \rx, #(0x10000 * CONFIG_DEBUG_S3C_UART) | ||
30 | #endif | ||
31 | .endm | ||
32 | |||
33 | #define fifo_full fifo_full_s5pv210 | ||
34 | #define fifo_level fifo_level_s5pv210 | ||
35 | |||
36 | #include <plat/debug-macro.S> | ||
diff --git a/arch/arm/mach-s5pv310/include/mach/entry-macro.S b/arch/arm/mach-s5pv310/include/mach/entry-macro.S new file mode 100644 index 000000000000..e600e1d522df --- /dev/null +++ b/arch/arm/mach-s5pv310/include/mach/entry-macro.S | |||
@@ -0,0 +1,84 @@ | |||
1 | /* arch/arm/mach-s5pv310/include/mach/entry-macro.S | ||
2 | * | ||
3 | * Cloned from arch/arm/mach-realview/include/mach/entry-macro.S | ||
4 | * | ||
5 | * Low-level IRQ helper macros for S5PV310 platforms | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public | ||
8 | * License version 2. This program is licensed "as is" without any | ||
9 | * warranty of any kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | #include <mach/hardware.h> | ||
13 | #include <asm/hardware/gic.h> | ||
14 | |||
15 | .macro disable_fiq | ||
16 | .endm | ||
17 | |||
18 | .macro get_irqnr_preamble, base, tmp | ||
19 | ldr \base, =gic_cpu_base_addr | ||
20 | ldr \base, [\base] | ||
21 | .endm | ||
22 | |||
23 | .macro arch_ret_to_user, tmp1, tmp2 | ||
24 | .endm | ||
25 | |||
26 | /* | ||
27 | * The interrupt numbering scheme is defined in the | ||
28 | * interrupt controller spec. To wit: | ||
29 | * | ||
30 | * Interrupts 0-15 are IPI | ||
31 | * 16-28 are reserved | ||
32 | * 29-31 are local. We allow 30 to be used for the watchdog. | ||
33 | * 32-1020 are global | ||
34 | * 1021-1022 are reserved | ||
35 | * 1023 is "spurious" (no interrupt) | ||
36 | * | ||
37 | * For now, we ignore all local interrupts so only return an interrupt if it's | ||
38 | * between 30 and 1020. The test_for_ipi routine below will pick up on IPIs. | ||
39 | * | ||
40 | * A simple read from the controller will tell us the number of the highest | ||
41 | * priority enabled interrupt. We then just need to check whether it is in the | ||
42 | * valid range for an IRQ (30-1020 inclusive). | ||
43 | */ | ||
44 | |||
45 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
46 | |||
47 | ldr \irqstat, [\base, #GIC_CPU_INTACK] /* bits 12-10 = src CPU, 9-0 = int # */ | ||
48 | |||
49 | ldr \tmp, =1021 | ||
50 | |||
51 | bic \irqnr, \irqstat, #0x1c00 | ||
52 | |||
53 | cmp \irqnr, #29 | ||
54 | cmpcc \irqnr, \irqnr | ||
55 | cmpne \irqnr, \tmp | ||
56 | cmpcs \irqnr, \irqnr | ||
57 | addne \irqnr, \irqnr, #32 | ||
58 | |||
59 | .endm | ||
60 | |||
61 | /* We assume that irqstat (the raw value of the IRQ acknowledge | ||
62 | * register) is preserved from the macro above. | ||
63 | * If there is an IPI, we immediately signal end of interrupt on the | ||
64 | * controller, since this requires the original irqstat value which | ||
65 | * we won't easily be able to recreate later. | ||
66 | */ | ||
67 | |||
68 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
69 | bic \irqnr, \irqstat, #0x1c00 | ||
70 | cmp \irqnr, #16 | ||
71 | strcc \irqstat, [\base, #GIC_CPU_EOI] | ||
72 | cmpcs \irqnr, \irqnr | ||
73 | .endm | ||
74 | |||
75 | /* As above, this assumes that irqstat and base are preserved.. */ | ||
76 | |||
77 | .macro test_for_ltirq, irqnr, irqstat, base, tmp | ||
78 | bic \irqnr, \irqstat, #0x1c00 | ||
79 | mov \tmp, #0 | ||
80 | cmp \irqnr, #29 | ||
81 | moveq \tmp, #1 | ||
82 | streq \irqstat, [\base, #GIC_CPU_EOI] | ||
83 | cmp \tmp, #0 | ||
84 | .endm | ||
diff --git a/arch/arm/mach-s5pv310/include/mach/gpio.h b/arch/arm/mach-s5pv310/include/mach/gpio.h new file mode 100644 index 000000000000..20cb80c23466 --- /dev/null +++ b/arch/arm/mach-s5pv310/include/mach/gpio.h | |||
@@ -0,0 +1,135 @@ | |||
1 | /* linux/arch/arm/mach-s5pv310/include/mach/gpio.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5PV310 - GPIO lib support | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_GPIO_H | ||
14 | #define __ASM_ARCH_GPIO_H __FILE__ | ||
15 | |||
16 | #define gpio_get_value __gpio_get_value | ||
17 | #define gpio_set_value __gpio_set_value | ||
18 | #define gpio_cansleep __gpio_cansleep | ||
19 | #define gpio_to_irq __gpio_to_irq | ||
20 | |||
21 | /* Practically, GPIO banks upto GPZ are the configurable gpio banks */ | ||
22 | |||
23 | /* GPIO bank sizes */ | ||
24 | #define S5PV310_GPIO_A0_NR (8) | ||
25 | #define S5PV310_GPIO_A1_NR (6) | ||
26 | #define S5PV310_GPIO_B_NR (8) | ||
27 | #define S5PV310_GPIO_C0_NR (5) | ||
28 | #define S5PV310_GPIO_C1_NR (5) | ||
29 | #define S5PV310_GPIO_D0_NR (4) | ||
30 | #define S5PV310_GPIO_D1_NR (4) | ||
31 | #define S5PV310_GPIO_E0_NR (5) | ||
32 | #define S5PV310_GPIO_E1_NR (8) | ||
33 | #define S5PV310_GPIO_E2_NR (6) | ||
34 | #define S5PV310_GPIO_E3_NR (8) | ||
35 | #define S5PV310_GPIO_E4_NR (8) | ||
36 | #define S5PV310_GPIO_F0_NR (8) | ||
37 | #define S5PV310_GPIO_F1_NR (8) | ||
38 | #define S5PV310_GPIO_F2_NR (8) | ||
39 | #define S5PV310_GPIO_F3_NR (6) | ||
40 | #define S5PV310_GPIO_J0_NR (8) | ||
41 | #define S5PV310_GPIO_J1_NR (5) | ||
42 | #define S5PV310_GPIO_K0_NR (7) | ||
43 | #define S5PV310_GPIO_K1_NR (7) | ||
44 | #define S5PV310_GPIO_K2_NR (7) | ||
45 | #define S5PV310_GPIO_K3_NR (7) | ||
46 | #define S5PV310_GPIO_L0_NR (8) | ||
47 | #define S5PV310_GPIO_L1_NR (3) | ||
48 | #define S5PV310_GPIO_L2_NR (8) | ||
49 | #define S5PV310_GPIO_X0_NR (8) | ||
50 | #define S5PV310_GPIO_X1_NR (8) | ||
51 | #define S5PV310_GPIO_X2_NR (8) | ||
52 | #define S5PV310_GPIO_X3_NR (8) | ||
53 | #define S5PV310_GPIO_Z_NR (7) | ||
54 | |||
55 | /* GPIO bank numbers */ | ||
56 | |||
57 | #define S5PV310_GPIO_NEXT(__gpio) \ | ||
58 | ((__gpio##_START) + (__gpio##_NR) + CONFIG_S3C_GPIO_SPACE + 1) | ||
59 | |||
60 | enum s5p_gpio_number { | ||
61 | S5PV310_GPIO_A0_START = 0, | ||
62 | S5PV310_GPIO_A1_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_A0), | ||
63 | S5PV310_GPIO_B_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_A1), | ||
64 | S5PV310_GPIO_C0_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_B), | ||
65 | S5PV310_GPIO_C1_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_C0), | ||
66 | S5PV310_GPIO_D0_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_C1), | ||
67 | S5PV310_GPIO_D1_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_D0), | ||
68 | S5PV310_GPIO_E0_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_D1), | ||
69 | S5PV310_GPIO_E1_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_E0), | ||
70 | S5PV310_GPIO_E2_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_E1), | ||
71 | S5PV310_GPIO_E3_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_E2), | ||
72 | S5PV310_GPIO_E4_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_E3), | ||
73 | S5PV310_GPIO_F0_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_E4), | ||
74 | S5PV310_GPIO_F1_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_F0), | ||
75 | S5PV310_GPIO_F2_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_F1), | ||
76 | S5PV310_GPIO_F3_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_F2), | ||
77 | S5PV310_GPIO_J0_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_F3), | ||
78 | S5PV310_GPIO_J1_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_J0), | ||
79 | S5PV310_GPIO_K0_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_J1), | ||
80 | S5PV310_GPIO_K1_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_K0), | ||
81 | S5PV310_GPIO_K2_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_K1), | ||
82 | S5PV310_GPIO_K3_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_K2), | ||
83 | S5PV310_GPIO_L0_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_K3), | ||
84 | S5PV310_GPIO_L1_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_L0), | ||
85 | S5PV310_GPIO_L2_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_L1), | ||
86 | S5PV310_GPIO_X0_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_L2), | ||
87 | S5PV310_GPIO_X1_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_X0), | ||
88 | S5PV310_GPIO_X2_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_X1), | ||
89 | S5PV310_GPIO_X3_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_X2), | ||
90 | S5PV310_GPIO_Z_START = S5PV310_GPIO_NEXT(S5PV310_GPIO_X3), | ||
91 | }; | ||
92 | |||
93 | /* S5PV310 GPIO number definitions */ | ||
94 | #define S5PV310_GPA0(_nr) (S5PV310_GPIO_A0_START + (_nr)) | ||
95 | #define S5PV310_GPA1(_nr) (S5PV310_GPIO_A1_START + (_nr)) | ||
96 | #define S5PV310_GPB(_nr) (S5PV310_GPIO_B_START + (_nr)) | ||
97 | #define S5PV310_GPC0(_nr) (S5PV310_GPIO_C0_START + (_nr)) | ||
98 | #define S5PV310_GPC1(_nr) (S5PV310_GPIO_C1_START + (_nr)) | ||
99 | #define S5PV310_GPD0(_nr) (S5PV310_GPIO_D0_START + (_nr)) | ||
100 | #define S5PV310_GPD1(_nr) (S5PV310_GPIO_D1_START + (_nr)) | ||
101 | #define S5PV310_GPE0(_nr) (S5PV310_GPIO_E0_START + (_nr)) | ||
102 | #define S5PV310_GPE1(_nr) (S5PV310_GPIO_E1_START + (_nr)) | ||
103 | #define S5PV310_GPE2(_nr) (S5PV310_GPIO_E2_START + (_nr)) | ||
104 | #define S5PV310_GPE3(_nr) (S5PV310_GPIO_E3_START + (_nr)) | ||
105 | #define S5PV310_GPE4(_nr) (S5PV310_GPIO_E4_START + (_nr)) | ||
106 | #define S5PV310_GPF0(_nr) (S5PV310_GPIO_F0_START + (_nr)) | ||
107 | #define S5PV310_GPF1(_nr) (S5PV310_GPIO_F1_START + (_nr)) | ||
108 | #define S5PV310_GPF2(_nr) (S5PV310_GPIO_F2_START + (_nr)) | ||
109 | #define S5PV310_GPF3(_nr) (S5PV310_GPIO_F3_START + (_nr)) | ||
110 | #define S5PV310_GPJ0(_nr) (S5PV310_GPIO_J0_START + (_nr)) | ||
111 | #define S5PV310_GPJ1(_nr) (S5PV310_GPIO_J1_START + (_nr)) | ||
112 | #define S5PV310_GPK0(_nr) (S5PV310_GPIO_K0_START + (_nr)) | ||
113 | #define S5PV310_GPK1(_nr) (S5PV310_GPIO_K1_START + (_nr)) | ||
114 | #define S5PV310_GPK2(_nr) (S5PV310_GPIO_K2_START + (_nr)) | ||
115 | #define S5PV310_GPK3(_nr) (S5PV310_GPIO_K3_START + (_nr)) | ||
116 | #define S5PV310_GPL0(_nr) (S5PV310_GPIO_L0_START + (_nr)) | ||
117 | #define S5PV310_GPL1(_nr) (S5PV310_GPIO_L1_START + (_nr)) | ||
118 | #define S5PV310_GPL2(_nr) (S5PV310_GPIO_L2_START + (_nr)) | ||
119 | #define S5PV310_GPX0(_nr) (S5PV310_GPIO_X0_START + (_nr)) | ||
120 | #define S5PV310_GPX1(_nr) (S5PV310_GPIO_X1_START + (_nr)) | ||
121 | #define S5PV310_GPX2(_nr) (S5PV310_GPIO_X2_START + (_nr)) | ||
122 | #define S5PV310_GPX3(_nr) (S5PV310_GPIO_X3_START + (_nr)) | ||
123 | #define S5PV310_GPZ(_nr) (S5PV310_GPIO_Z_START + (_nr)) | ||
124 | |||
125 | /* the end of the S5PV310 specific gpios */ | ||
126 | #define S5PV310_GPIO_END (S5PV310_GPZ(S5PV310_GPIO_Z_NR) + 1) | ||
127 | #define S3C_GPIO_END S5PV310_GPIO_END | ||
128 | |||
129 | /* define the number of gpios we need to the one after the GPZ() range */ | ||
130 | #define ARCH_NR_GPIOS (S5PV310_GPZ(S5PV310_GPIO_Z_NR) + \ | ||
131 | CONFIG_SAMSUNG_GPIO_EXTRA + 1) | ||
132 | |||
133 | #include <asm-generic/gpio.h> | ||
134 | |||
135 | #endif /* __ASM_ARCH_GPIO_H */ | ||
diff --git a/arch/arm/mach-s5pv310/include/mach/hardware.h b/arch/arm/mach-s5pv310/include/mach/hardware.h new file mode 100644 index 000000000000..28ff9881f1a6 --- /dev/null +++ b/arch/arm/mach-s5pv310/include/mach/hardware.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* linux/arch/arm/mach-s5pv310/include/mach/hardware.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5PV310 - Hardware support | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_HARDWARE_H | ||
14 | #define __ASM_ARCH_HARDWARE_H __FILE__ | ||
15 | |||
16 | /* currently nothing here, placeholder */ | ||
17 | |||
18 | #endif /* __ASM_ARCH_HARDWARE_H */ | ||
diff --git a/arch/arm/mach-s5pv310/include/mach/io.h b/arch/arm/mach-s5pv310/include/mach/io.h new file mode 100644 index 000000000000..8a7f9128391f --- /dev/null +++ b/arch/arm/mach-s5pv310/include/mach/io.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* linux/arch/arm/mach-s5pv310/include/mach/io.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Copyright 2008-2010 Ben Dooks <ben-linux@fluff.org> | ||
7 | * | ||
8 | * Based on arch/arm/mach-s5p6442/include/mach/io.h | ||
9 | * | ||
10 | * Default IO routines for S5PV310 | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License version 2 as | ||
14 | * published by the Free Software Foundation. | ||
15 | */ | ||
16 | |||
17 | #ifndef __ASM_ARM_ARCH_IO_H | ||
18 | #define __ASM_ARM_ARCH_IO_H __FILE__ | ||
19 | |||
20 | /* No current ISA/PCI bus support. */ | ||
21 | #define __io(a) __typesafe_io(a) | ||
22 | #define __mem_pci(a) (a) | ||
23 | |||
24 | #define IO_SPACE_LIMIT (0xFFFFFFFF) | ||
25 | |||
26 | #endif /* __ASM_ARM_ARCH_IO_H */ | ||
diff --git a/arch/arm/mach-s5pv310/include/mach/map.h b/arch/arm/mach-s5pv310/include/mach/map.h new file mode 100644 index 000000000000..87697c9fca5b --- /dev/null +++ b/arch/arm/mach-s5pv310/include/mach/map.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /* linux/arch/arm/mach-s5pv310/include/mach/map.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5PV310 - Memory map definitions | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_MAP_H | ||
14 | #define __ASM_ARCH_MAP_H __FILE__ | ||
15 | |||
16 | #include <plat/map-base.h> | ||
17 | |||
18 | /* | ||
19 | * S5PV310 UART offset is 0x10000 but the older S5P SoCs are 0x400. | ||
20 | * So need to define it, and here is to avoid redefinition warning. | ||
21 | */ | ||
22 | #define S3C_UART_OFFSET (0x10000) | ||
23 | |||
24 | #include <plat/map-s5p.h> | ||
25 | |||
26 | #define S5PV310_PA_CHIPID (0x10000000) | ||
27 | #define S5P_PA_CHIPID S5PV310_PA_CHIPID | ||
28 | |||
29 | #define S5PV310_PA_SYSCON (0x10020000) | ||
30 | #define S5P_PA_SYSCON S5PV310_PA_SYSCON | ||
31 | |||
32 | #define S5PV310_PA_WATCHDOG (0x10060000) | ||
33 | |||
34 | #define S5PV310_PA_COMBINER (0x10448000) | ||
35 | |||
36 | #define S5PV310_PA_COREPERI (0x10500000) | ||
37 | #define S5PV310_PA_GIC_CPU (0x10500100) | ||
38 | #define S5PV310_PA_TWD (0x10500600) | ||
39 | #define S5PV310_PA_GIC_DIST (0x10501000) | ||
40 | #define S5PV310_PA_L2CC (0x10502000) | ||
41 | |||
42 | #define S5PV310_PA_GPIO (0x11000000) | ||
43 | #define S5P_PA_GPIO S5PV310_PA_GPIO | ||
44 | |||
45 | #define S5PV310_PA_UART (0x13800000) | ||
46 | |||
47 | #define S5P_PA_UART(x) (S5PV310_PA_UART + ((x) * S3C_UART_OFFSET)) | ||
48 | #define S5P_PA_UART0 S5P_PA_UART(0) | ||
49 | #define S5P_PA_UART1 S5P_PA_UART(1) | ||
50 | #define S5P_PA_UART2 S5P_PA_UART(2) | ||
51 | #define S5P_PA_UART3 S5P_PA_UART(3) | ||
52 | #define S5P_PA_UART4 S5P_PA_UART(4) | ||
53 | |||
54 | #define S5P_SZ_UART SZ_256 | ||
55 | |||
56 | #define S5PV310_PA_IIC0 (0x13860000) | ||
57 | |||
58 | #define S5PV310_PA_TIMER (0x139D0000) | ||
59 | #define S5P_PA_TIMER S5PV310_PA_TIMER | ||
60 | |||
61 | #define S5PV310_PA_SDRAM (0x40000000) | ||
62 | #define S5P_PA_SDRAM S5PV310_PA_SDRAM | ||
63 | |||
64 | /* compatibiltiy defines. */ | ||
65 | #define S3C_PA_UART S5PV310_PA_UART | ||
66 | #define S3C_PA_IIC S5PV310_PA_IIC0 | ||
67 | #define S3C_PA_WDT S5PV310_PA_WATCHDOG | ||
68 | |||
69 | #endif /* __ASM_ARCH_MAP_H */ | ||
diff --git a/arch/arm/mach-s5pv310/include/mach/memory.h b/arch/arm/mach-s5pv310/include/mach/memory.h new file mode 100644 index 000000000000..1dffb4823245 --- /dev/null +++ b/arch/arm/mach-s5pv310/include/mach/memory.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* linux/arch/arm/mach-s5pv310/include/mach/memory.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5PV310 - Memory definitions | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_MEMORY_H | ||
14 | #define __ASM_ARCH_MEMORY_H __FILE__ | ||
15 | |||
16 | #define PHYS_OFFSET UL(0x40000000) | ||
17 | |||
18 | /* Maximum of 256MiB in one bank */ | ||
19 | #define MAX_PHYSMEM_BITS 32 | ||
20 | #define SECTION_SIZE_BITS 28 | ||
21 | |||
22 | #endif /* __ASM_ARCH_MEMORY_H */ | ||
diff --git a/arch/arm/mach-s5pv310/include/mach/smp.h b/arch/arm/mach-s5pv310/include/mach/smp.h new file mode 100644 index 000000000000..990f3ba88a1f --- /dev/null +++ b/arch/arm/mach-s5pv310/include/mach/smp.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* linux/arch/arm/mach-s5pv310/include/mach/smp.h | ||
2 | * | ||
3 | * Cloned from arch/arm/mach-realview/include/mach/smp.h | ||
4 | */ | ||
5 | |||
6 | #ifndef ASM_ARCH_SMP_H | ||
7 | #define ASM_ARCH_SMP_H __FILE__ | ||
8 | |||
9 | #include <asm/hardware/gic.h> | ||
10 | |||
11 | extern void __iomem *gic_cpu_base_addr; | ||
12 | |||
13 | #define hard_smp_processor_id() \ | ||
14 | ({ \ | ||
15 | unsigned int cpunum; \ | ||
16 | __asm__("mrc p15, 0, %0, c0, c0, 5" \ | ||
17 | : "=r" (cpunum)); \ | ||
18 | cpunum &= 0x03; \ | ||
19 | }) | ||
20 | |||
21 | /* | ||
22 | * We use IRQ1 as the IPI | ||
23 | */ | ||
24 | static inline void smp_cross_call(const struct cpumask *mask) | ||
25 | { | ||
26 | gic_raise_softirq(mask, 1); | ||
27 | } | ||
28 | |||
29 | #endif | ||
diff --git a/arch/arm/mach-s5pv310/include/mach/system.h b/arch/arm/mach-s5pv310/include/mach/system.h new file mode 100644 index 000000000000..d10c009cf0f1 --- /dev/null +++ b/arch/arm/mach-s5pv310/include/mach/system.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* linux/arch/arm/mach-s5pv310/include/mach/system.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5PV310 - system support header | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_SYSTEM_H | ||
14 | #define __ASM_ARCH_SYSTEM_H __FILE__ | ||
15 | |||
16 | #include <plat/system-reset.h> | ||
17 | |||
18 | static void arch_idle(void) | ||
19 | { | ||
20 | /* nothing here yet */ | ||
21 | } | ||
22 | #endif /* __ASM_ARCH_SYSTEM_H */ | ||
diff --git a/arch/arm/mach-s5pv310/include/mach/timex.h b/arch/arm/mach-s5pv310/include/mach/timex.h new file mode 100644 index 000000000000..bd2359b952b4 --- /dev/null +++ b/arch/arm/mach-s5pv310/include/mach/timex.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* linux/arch/arm/mach-s5pv310/include/mach/timex.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Copyright (c) 2003-2010 Simtec Electronics | ||
7 | * Ben Dooks <ben@simtec.co.uk> | ||
8 | * | ||
9 | * Based on arch/arm/mach-s5p6442/include/mach/timex.h | ||
10 | * | ||
11 | * S5PV310 - time parameters | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify | ||
14 | * it under the terms of the GNU General Public License version 2 as | ||
15 | * published by the Free Software Foundation. | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_ARCH_TIMEX_H | ||
19 | #define __ASM_ARCH_TIMEX_H __FILE__ | ||
20 | |||
21 | /* CLOCK_TICK_RATE needs to be evaluatable by the cpp, so making it | ||
22 | * a variable is useless. It seems as long as we make our timers an | ||
23 | * exact multiple of HZ, any value that makes a 1->1 correspondence | ||
24 | * for the time conversion functions to/from jiffies is acceptable. | ||
25 | */ | ||
26 | |||
27 | #define CLOCK_TICK_RATE 12000000 | ||
28 | |||
29 | #endif /* __ASM_ARCH_TIMEX_H */ | ||
diff --git a/arch/arm/mach-s5pv310/include/mach/uncompress.h b/arch/arm/mach-s5pv310/include/mach/uncompress.h new file mode 100644 index 000000000000..59593c1e2416 --- /dev/null +++ b/arch/arm/mach-s5pv310/include/mach/uncompress.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* linux/arch/arm/mach-s5pv310/include/mach/uncompress.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5PV310 - uncompress code | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_UNCOMPRESS_H | ||
14 | #define __ASM_ARCH_UNCOMPRESS_H __FILE__ | ||
15 | |||
16 | #include <mach/map.h> | ||
17 | #include <plat/uncompress.h> | ||
18 | |||
19 | static void arch_detect_cpu(void) | ||
20 | { | ||
21 | /* we do not need to do any cpu detection here at the moment. */ | ||
22 | |||
23 | /* | ||
24 | * For preventing FIFO overrun or infinite loop of UART console, | ||
25 | * fifo_max should be the minimum fifo size of all of the UART channels | ||
26 | */ | ||
27 | fifo_mask = S5PV210_UFSTAT_TXMASK; | ||
28 | fifo_max = 15 << S5PV210_UFSTAT_TXSHIFT; | ||
29 | } | ||
30 | #endif /* __ASM_ARCH_UNCOMPRESS_H */ | ||
diff --git a/arch/arm/mach-s5pv310/include/mach/vmalloc.h b/arch/arm/mach-s5pv310/include/mach/vmalloc.h new file mode 100644 index 000000000000..3f565ebb7daa --- /dev/null +++ b/arch/arm/mach-s5pv310/include/mach/vmalloc.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* linux/arch/arm/mach-s5pv310/include/mach/vmalloc.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Copyright 2010 Ben Dooks <ben-linux@fluff.org> | ||
7 | * | ||
8 | * Based on arch/arm/mach-s5p6440/include/mach/vmalloc.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 | * S5PV310 vmalloc definition | ||
15 | */ | ||
16 | |||
17 | #ifndef __ASM_ARCH_VMALLOC_H | ||
18 | #define __ASM_ARCH_VMALLOC_H __FILE__ | ||
19 | |||
20 | #define VMALLOC_END (0xF0000000) | ||
21 | |||
22 | #endif /* __ASM_ARCH_VMALLOC_H */ | ||