diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-01 23:25:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-01 23:25:36 -0400 |
commit | f906fb1d70e016726fccfb0d978c5d425503db9d (patch) | |
tree | b2bac5fbe7d2eb81dd7fe6cc88e27dddd0189c84 /arch/arm/mach-exynos4/cpu.c | |
parent | 510597e26e2a072e2d46ea5bc57feaf385e37f70 (diff) | |
parent | a7fadac10ffbfd16cc7ccf951eab1ecf85e1abdf (diff) |
Merge branch 'next/board' of git://git.linaro.org/people/arnd/arm-soc
* 'next/board' of git://git.linaro.org/people/arnd/arm-soc: (34 commits)
ep93xx: add support Vision EP9307 SoM
ARM: mxs: Add initial support for DENX MX28
ARM: EXYNOS4: Add support SMDK4412 Board
ARM: EXYNOS4: Add MCT support for EXYNOS4412
ARM: EXYNOS4: Add functions for gic interrupt handling
ARM: EXYNOS4: Add support clock for EXYNOS4412
ARM: EXYNOS4: Add support new EXYNOS4412 SoC
ARM: EXYNOS4: Add support MCT PPI for EXYNOS4212
ARM: EXYNOS4: Add support PPI in external GIC
ARM: EXYNOS4: convert boot_params to atag_offset
ixp4xx: support omicron ixp425 based boards
ARM: EXYNOS4: Add support SMDK4212 Board
ARM: EXYNOS4: Add support PM for EXYNOS4212
ARM: EXYNOS4: Add support clock for EXYNOS4212
ARM: EXYNOS4: Add support new EXYNOS4212 SoC
at91: USB-A9G20 C01 & C11 board support
at91: merge board USB-A9260 and USB-A9263 together
at91: add support for RSIs EWS board
ARM: SAMSUNG: Fix mask value for S5P64X0 CPU IDs
ARM: SAMSUNG: Fix mask for S3C64xx CPU IDs
...
Diffstat (limited to 'arch/arm/mach-exynos4/cpu.c')
-rw-r--r-- | arch/arm/mach-exynos4/cpu.c | 57 |
1 files changed, 47 insertions, 10 deletions
diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c index 746d6fc6d397..a348434f17b5 100644 --- a/arch/arm/mach-exynos4/cpu.c +++ b/arch/arm/mach-exynos4/cpu.c | |||
@@ -32,6 +32,8 @@ | |||
32 | #include <mach/regs-irq.h> | 32 | #include <mach/regs-irq.h> |
33 | #include <mach/regs-pmu.h> | 33 | #include <mach/regs-pmu.h> |
34 | 34 | ||
35 | unsigned int gic_bank_offset __read_mostly; | ||
36 | |||
35 | extern int combiner_init(unsigned int combiner_nr, void __iomem *base, | 37 | extern int combiner_init(unsigned int combiner_nr, void __iomem *base, |
36 | unsigned int irq_start); | 38 | unsigned int irq_start); |
37 | extern void combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq); | 39 | extern void combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq); |
@@ -44,11 +46,6 @@ static struct map_desc exynos4_iodesc[] __initdata = { | |||
44 | .length = SZ_4K, | 46 | .length = SZ_4K, |
45 | .type = MT_DEVICE, | 47 | .type = MT_DEVICE, |
46 | }, { | 48 | }, { |
47 | .virtual = (unsigned long)S5P_VA_SYSRAM, | ||
48 | .pfn = __phys_to_pfn(EXYNOS4_PA_SYSRAM), | ||
49 | .length = SZ_4K, | ||
50 | .type = MT_DEVICE, | ||
51 | }, { | ||
52 | .virtual = (unsigned long)S5P_VA_CMU, | 49 | .virtual = (unsigned long)S5P_VA_CMU, |
53 | .pfn = __phys_to_pfn(EXYNOS4_PA_CMU), | 50 | .pfn = __phys_to_pfn(EXYNOS4_PA_CMU), |
54 | .length = SZ_128K, | 51 | .length = SZ_128K, |
@@ -121,6 +118,24 @@ static struct map_desc exynos4_iodesc[] __initdata = { | |||
121 | }, | 118 | }, |
122 | }; | 119 | }; |
123 | 120 | ||
121 | static struct map_desc exynos4_iodesc0[] __initdata = { | ||
122 | { | ||
123 | .virtual = (unsigned long)S5P_VA_SYSRAM, | ||
124 | .pfn = __phys_to_pfn(EXYNOS4_PA_SYSRAM0), | ||
125 | .length = SZ_4K, | ||
126 | .type = MT_DEVICE, | ||
127 | }, | ||
128 | }; | ||
129 | |||
130 | static struct map_desc exynos4_iodesc1[] __initdata = { | ||
131 | { | ||
132 | .virtual = (unsigned long)S5P_VA_SYSRAM, | ||
133 | .pfn = __phys_to_pfn(EXYNOS4_PA_SYSRAM1), | ||
134 | .length = SZ_4K, | ||
135 | .type = MT_DEVICE, | ||
136 | }, | ||
137 | }; | ||
138 | |||
124 | static void exynos4_idle(void) | 139 | static void exynos4_idle(void) |
125 | { | 140 | { |
126 | if (!need_resched()) | 141 | if (!need_resched()) |
@@ -143,6 +158,11 @@ void __init exynos4_map_io(void) | |||
143 | { | 158 | { |
144 | iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc)); | 159 | iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc)); |
145 | 160 | ||
161 | if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_0) | ||
162 | iotable_init(exynos4_iodesc0, ARRAY_SIZE(exynos4_iodesc0)); | ||
163 | else | ||
164 | iotable_init(exynos4_iodesc1, ARRAY_SIZE(exynos4_iodesc1)); | ||
165 | |||
146 | /* initialize device information early */ | 166 | /* initialize device information early */ |
147 | exynos4_default_sdhci0(); | 167 | exynos4_default_sdhci0(); |
148 | exynos4_default_sdhci1(); | 168 | exynos4_default_sdhci1(); |
@@ -170,24 +190,37 @@ void __init exynos4_init_clocks(int xtal) | |||
170 | 190 | ||
171 | s3c24xx_register_baseclocks(xtal); | 191 | s3c24xx_register_baseclocks(xtal); |
172 | s5p_register_clocks(xtal); | 192 | s5p_register_clocks(xtal); |
193 | |||
194 | if (soc_is_exynos4210()) | ||
195 | exynos4210_register_clocks(); | ||
196 | else if (soc_is_exynos4212() || soc_is_exynos4412()) | ||
197 | exynos4212_register_clocks(); | ||
198 | |||
173 | exynos4_register_clocks(); | 199 | exynos4_register_clocks(); |
174 | exynos4_setup_clocks(); | 200 | exynos4_setup_clocks(); |
175 | } | 201 | } |
176 | 202 | ||
177 | static void exynos4_gic_irq_eoi(struct irq_data *d) | 203 | static void exynos4_gic_irq_fix_base(struct irq_data *d) |
178 | { | 204 | { |
179 | struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); | 205 | struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); |
180 | 206 | ||
181 | gic_data->cpu_base = S5P_VA_GIC_CPU + | 207 | gic_data->cpu_base = S5P_VA_GIC_CPU + |
182 | (EXYNOS4_GIC_BANK_OFFSET * smp_processor_id()); | 208 | (gic_bank_offset * smp_processor_id()); |
209 | |||
210 | gic_data->dist_base = S5P_VA_GIC_DIST + | ||
211 | (gic_bank_offset * smp_processor_id()); | ||
183 | } | 212 | } |
184 | 213 | ||
185 | void __init exynos4_init_irq(void) | 214 | void __init exynos4_init_irq(void) |
186 | { | 215 | { |
187 | int irq; | 216 | int irq; |
188 | 217 | ||
189 | gic_init(0, IRQ_SPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU); | 218 | gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000; |
190 | gic_arch_extn.irq_eoi = exynos4_gic_irq_eoi; | 219 | |
220 | gic_init(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU); | ||
221 | gic_arch_extn.irq_eoi = exynos4_gic_irq_fix_base; | ||
222 | gic_arch_extn.irq_unmask = exynos4_gic_irq_fix_base; | ||
223 | gic_arch_extn.irq_mask = exynos4_gic_irq_fix_base; | ||
191 | 224 | ||
192 | for (irq = 0; irq < MAX_COMBINER_NR; irq++) { | 225 | for (irq = 0; irq < MAX_COMBINER_NR; irq++) { |
193 | 226 | ||
@@ -223,7 +256,11 @@ static int __init exynos4_l2x0_cache_init(void) | |||
223 | { | 256 | { |
224 | /* TAG, Data Latency Control: 2cycle */ | 257 | /* TAG, Data Latency Control: 2cycle */ |
225 | __raw_writel(0x110, S5P_VA_L2CC + L2X0_TAG_LATENCY_CTRL); | 258 | __raw_writel(0x110, S5P_VA_L2CC + L2X0_TAG_LATENCY_CTRL); |
226 | __raw_writel(0x110, S5P_VA_L2CC + L2X0_DATA_LATENCY_CTRL); | 259 | |
260 | if (soc_is_exynos4210()) | ||
261 | __raw_writel(0x110, S5P_VA_L2CC + L2X0_DATA_LATENCY_CTRL); | ||
262 | else if (soc_is_exynos4212() || soc_is_exynos4412()) | ||
263 | __raw_writel(0x120, S5P_VA_L2CC + L2X0_DATA_LATENCY_CTRL); | ||
227 | 264 | ||
228 | /* L2X0 Prefetch Control */ | 265 | /* L2X0 Prefetch Control */ |
229 | __raw_writel(0x30000007, S5P_VA_L2CC + L2X0_PREFETCH_CTRL); | 266 | __raw_writel(0x30000007, S5P_VA_L2CC + L2X0_PREFETCH_CTRL); |