blob: b2bb2b70832bee2616497505269a2ebfbe6da9b0 [file] [log] [blame]
Kukjin Kimcc511b82011-12-27 08:18:36 +01001/*
2 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
3 * http://www.samsung.com
4 *
5 * Common Codes for EXYNOS
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <linux/kernel.h>
13#include <linux/interrupt.h>
14#include <linux/irq.h>
Rob Herringa900e5d2013-02-12 16:04:52 -060015#include <linux/irqchip.h>
Kukjin Kimcc511b82011-12-27 08:18:36 +010016#include <linux/io.h>
Linus Torvalds7affca32012-01-07 12:03:30 -080017#include <linux/device.h>
Kukjin Kimcc511b82011-12-27 08:18:36 +010018#include <linux/gpio.h>
19#include <linux/sched.h>
20#include <linux/serial_core.h>
Arnd Bergmann237c78b2012-01-07 12:30:20 +000021#include <linux/of.h>
Doug Anderson5b7897d2012-11-27 11:53:14 -080022#include <linux/of_fdt.h>
Arnd Bergmann237c78b2012-01-07 12:30:20 +000023#include <linux/of_irq.h>
Thomas Abraham1e60bc02012-05-15 16:18:35 +090024#include <linux/export.h>
25#include <linux/irqdomain.h>
Rob Herring0529e3152012-11-05 16:18:28 -060026#include <linux/irqchip.h>
Thomas Abrahame873a472012-05-15 16:25:23 +090027#include <linux/of_address.h>
Thomas Abraham6923ae42013-03-09 17:03:29 +090028#include <linux/clocksource.h>
29#include <linux/clk-provider.h>
Rob Herring520f7bd2012-12-27 13:10:24 -060030#include <linux/irqchip/arm-gic.h>
Kukjin Kimcc511b82011-12-27 08:18:36 +010031
32#include <asm/proc-fns.h>
Arnd Bergmann40ba95f2012-01-07 11:51:28 +000033#include <asm/exception.h>
Kukjin Kimcc511b82011-12-27 08:18:36 +010034#include <asm/hardware/cache-l2x0.h>
Kukjin Kimcc511b82011-12-27 08:18:36 +010035#include <asm/mach/map.h>
36#include <asm/mach/irq.h>
Amit Daniel Kachhapb756a502012-03-08 02:07:41 -080037#include <asm/cacheflush.h>
Kukjin Kimcc511b82011-12-27 08:18:36 +010038
39#include <mach/regs-irq.h>
40#include <mach/regs-pmu.h>
41#include <mach/regs-gpio.h>
42
43#include <plat/cpu.h>
Kukjin Kimcc511b82011-12-27 08:18:36 +010044#include <plat/devs.h>
45#include <plat/pm.h>
Kukjin Kimcc511b82011-12-27 08:18:36 +010046#include <plat/sdhci.h>
47#include <plat/gpio-cfg.h>
48#include <plat/adc-core.h>
49#include <plat/fb-core.h>
50#include <plat/fimc-core.h>
51#include <plat/iic-core.h>
52#include <plat/tv-core.h>
Heiko Stuebner308b3af2012-10-17 16:47:11 +090053#include <plat/spi-core.h>
Kukjin Kimcc511b82011-12-27 08:18:36 +010054#include <plat/regs-serial.h>
55
56#include "common.h"
Amit Daniel Kachhap6cdeddc2012-03-08 02:09:12 -080057#define L2_AUX_VAL 0x7C470001
58#define L2_AUX_MASK 0xC200ffff
Kukjin Kimcc511b82011-12-27 08:18:36 +010059
Kukjin Kimcc511b82011-12-27 08:18:36 +010060static const char name_exynos4210[] = "EXYNOS4210";
61static const char name_exynos4212[] = "EXYNOS4212";
62static const char name_exynos4412[] = "EXYNOS4412";
Kukjin Kim94c7ca72012-02-11 22:15:45 +090063static const char name_exynos5250[] = "EXYNOS5250";
Kukjin Kim2edb36c2012-11-15 15:48:56 +090064static const char name_exynos5440[] = "EXYNOS5440";
Kukjin Kimcc511b82011-12-27 08:18:36 +010065
Kukjin Kim906c7892012-02-11 21:27:08 +090066static void exynos4_map_io(void);
Kukjin Kim94c7ca72012-02-11 22:15:45 +090067static void exynos5_map_io(void);
Kukjin Kim2edb36c2012-11-15 15:48:56 +090068static void exynos5440_map_io(void);
Thomas Abraham55b6ef72012-10-29 19:46:49 +090069static void exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no);
Kukjin Kim906c7892012-02-11 21:27:08 +090070static int exynos_init(void);
Kukjin Kimcc511b82011-12-27 08:18:36 +010071
Thomas Abraham92744272013-03-09 17:03:33 +090072unsigned long xxti_f = 0, xusbxti_f = 0;
73
Kukjin Kimcc511b82011-12-27 08:18:36 +010074static struct cpu_table cpu_ids[] __initdata = {
75 {
76 .idcode = EXYNOS4210_CPU_ID,
77 .idmask = EXYNOS4_CPU_MASK,
78 .map_io = exynos4_map_io,
Thomas Abraham55b6ef72012-10-29 19:46:49 +090079 .init_uarts = exynos4_init_uarts,
Kukjin Kimcc511b82011-12-27 08:18:36 +010080 .init = exynos_init,
81 .name = name_exynos4210,
82 }, {
83 .idcode = EXYNOS4212_CPU_ID,
84 .idmask = EXYNOS4_CPU_MASK,
85 .map_io = exynos4_map_io,
Thomas Abraham55b6ef72012-10-29 19:46:49 +090086 .init_uarts = exynos4_init_uarts,
Kukjin Kimcc511b82011-12-27 08:18:36 +010087 .init = exynos_init,
88 .name = name_exynos4212,
89 }, {
90 .idcode = EXYNOS4412_CPU_ID,
91 .idmask = EXYNOS4_CPU_MASK,
92 .map_io = exynos4_map_io,
Thomas Abraham55b6ef72012-10-29 19:46:49 +090093 .init_uarts = exynos4_init_uarts,
Kukjin Kimcc511b82011-12-27 08:18:36 +010094 .init = exynos_init,
95 .name = name_exynos4412,
Kukjin Kim94c7ca72012-02-11 22:15:45 +090096 }, {
97 .idcode = EXYNOS5250_SOC_ID,
98 .idmask = EXYNOS5_SOC_MASK,
99 .map_io = exynos5_map_io,
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900100 .init = exynos_init,
101 .name = name_exynos5250,
Kukjin Kim2edb36c2012-11-15 15:48:56 +0900102 }, {
103 .idcode = EXYNOS5440_SOC_ID,
104 .idmask = EXYNOS5_SOC_MASK,
105 .map_io = exynos5440_map_io,
106 .init = exynos_init,
107 .name = name_exynos5440,
Kukjin Kimcc511b82011-12-27 08:18:36 +0100108 },
109};
110
111/* Initial IO mappings */
112
113static struct map_desc exynos_iodesc[] __initdata = {
114 {
115 .virtual = (unsigned long)S5P_VA_CHIPID,
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900116 .pfn = __phys_to_pfn(EXYNOS_PA_CHIPID),
Kukjin Kimcc511b82011-12-27 08:18:36 +0100117 .length = SZ_4K,
118 .type = MT_DEVICE,
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900119 },
120};
121
Doug Anderson5b7897d2012-11-27 11:53:14 -0800122#ifdef CONFIG_ARCH_EXYNOS5
Kukjin Kim2edb36c2012-11-15 15:48:56 +0900123static struct map_desc exynos5440_iodesc[] __initdata = {
124 {
125 .virtual = (unsigned long)S5P_VA_CHIPID,
126 .pfn = __phys_to_pfn(EXYNOS5440_PA_CHIPID),
127 .length = SZ_4K,
128 .type = MT_DEVICE,
129 },
130};
Doug Anderson5b7897d2012-11-27 11:53:14 -0800131#endif
Kukjin Kim2edb36c2012-11-15 15:48:56 +0900132
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900133static struct map_desc exynos4_iodesc[] __initdata = {
134 {
Kukjin Kimcc511b82011-12-27 08:18:36 +0100135 .virtual = (unsigned long)S3C_VA_SYS,
136 .pfn = __phys_to_pfn(EXYNOS4_PA_SYSCON),
137 .length = SZ_64K,
138 .type = MT_DEVICE,
139 }, {
140 .virtual = (unsigned long)S3C_VA_TIMER,
141 .pfn = __phys_to_pfn(EXYNOS4_PA_TIMER),
142 .length = SZ_16K,
143 .type = MT_DEVICE,
144 }, {
145 .virtual = (unsigned long)S3C_VA_WATCHDOG,
146 .pfn = __phys_to_pfn(EXYNOS4_PA_WATCHDOG),
147 .length = SZ_4K,
148 .type = MT_DEVICE,
149 }, {
150 .virtual = (unsigned long)S5P_VA_SROMC,
151 .pfn = __phys_to_pfn(EXYNOS4_PA_SROMC),
152 .length = SZ_4K,
153 .type = MT_DEVICE,
154 }, {
155 .virtual = (unsigned long)S5P_VA_SYSTIMER,
156 .pfn = __phys_to_pfn(EXYNOS4_PA_SYSTIMER),
157 .length = SZ_4K,
158 .type = MT_DEVICE,
159 }, {
160 .virtual = (unsigned long)S5P_VA_PMU,
161 .pfn = __phys_to_pfn(EXYNOS4_PA_PMU),
162 .length = SZ_64K,
163 .type = MT_DEVICE,
164 }, {
165 .virtual = (unsigned long)S5P_VA_COMBINER_BASE,
166 .pfn = __phys_to_pfn(EXYNOS4_PA_COMBINER),
167 .length = SZ_4K,
168 .type = MT_DEVICE,
169 }, {
170 .virtual = (unsigned long)S5P_VA_GIC_CPU,
171 .pfn = __phys_to_pfn(EXYNOS4_PA_GIC_CPU),
172 .length = SZ_64K,
173 .type = MT_DEVICE,
174 }, {
175 .virtual = (unsigned long)S5P_VA_GIC_DIST,
176 .pfn = __phys_to_pfn(EXYNOS4_PA_GIC_DIST),
177 .length = SZ_64K,
178 .type = MT_DEVICE,
179 }, {
180 .virtual = (unsigned long)S3C_VA_UART,
181 .pfn = __phys_to_pfn(EXYNOS4_PA_UART),
182 .length = SZ_512K,
183 .type = MT_DEVICE,
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900184 }, {
Kukjin Kimcc511b82011-12-27 08:18:36 +0100185 .virtual = (unsigned long)S5P_VA_CMU,
186 .pfn = __phys_to_pfn(EXYNOS4_PA_CMU),
187 .length = SZ_128K,
188 .type = MT_DEVICE,
189 }, {
190 .virtual = (unsigned long)S5P_VA_COREPERI_BASE,
191 .pfn = __phys_to_pfn(EXYNOS4_PA_COREPERI),
192 .length = SZ_8K,
193 .type = MT_DEVICE,
194 }, {
195 .virtual = (unsigned long)S5P_VA_L2CC,
196 .pfn = __phys_to_pfn(EXYNOS4_PA_L2CC),
197 .length = SZ_4K,
198 .type = MT_DEVICE,
199 }, {
Kukjin Kimcc511b82011-12-27 08:18:36 +0100200 .virtual = (unsigned long)S5P_VA_DMC0,
201 .pfn = __phys_to_pfn(EXYNOS4_PA_DMC0),
MyungJoo Ham2bde0b02011-12-01 15:12:30 +0900202 .length = SZ_64K,
203 .type = MT_DEVICE,
204 }, {
205 .virtual = (unsigned long)S5P_VA_DMC1,
206 .pfn = __phys_to_pfn(EXYNOS4_PA_DMC1),
207 .length = SZ_64K,
Kukjin Kimcc511b82011-12-27 08:18:36 +0100208 .type = MT_DEVICE,
209 }, {
Kukjin Kimcc511b82011-12-27 08:18:36 +0100210 .virtual = (unsigned long)S3C_VA_USB_HSPHY,
211 .pfn = __phys_to_pfn(EXYNOS4_PA_HSPHY),
212 .length = SZ_4K,
213 .type = MT_DEVICE,
214 },
215};
216
217static struct map_desc exynos4_iodesc0[] __initdata = {
218 {
219 .virtual = (unsigned long)S5P_VA_SYSRAM,
220 .pfn = __phys_to_pfn(EXYNOS4_PA_SYSRAM0),
221 .length = SZ_4K,
222 .type = MT_DEVICE,
223 },
224};
225
226static struct map_desc exynos4_iodesc1[] __initdata = {
227 {
228 .virtual = (unsigned long)S5P_VA_SYSRAM,
229 .pfn = __phys_to_pfn(EXYNOS4_PA_SYSRAM1),
230 .length = SZ_4K,
231 .type = MT_DEVICE,
232 },
233};
234
Tomasz Figa41de8982012-12-11 13:58:43 +0900235static struct map_desc exynos4210_iodesc[] __initdata = {
236 {
237 .virtual = (unsigned long)S5P_VA_SYSRAM_NS,
238 .pfn = __phys_to_pfn(EXYNOS4210_PA_SYSRAM_NS),
239 .length = SZ_4K,
240 .type = MT_DEVICE,
241 },
242};
243
244static struct map_desc exynos4x12_iodesc[] __initdata = {
245 {
246 .virtual = (unsigned long)S5P_VA_SYSRAM_NS,
247 .pfn = __phys_to_pfn(EXYNOS4x12_PA_SYSRAM_NS),
248 .length = SZ_4K,
249 .type = MT_DEVICE,
250 },
251};
252
253static struct map_desc exynos5250_iodesc[] __initdata = {
254 {
255 .virtual = (unsigned long)S5P_VA_SYSRAM_NS,
256 .pfn = __phys_to_pfn(EXYNOS5250_PA_SYSRAM_NS),
257 .length = SZ_4K,
258 .type = MT_DEVICE,
259 },
260};
261
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900262static struct map_desc exynos5_iodesc[] __initdata = {
263 {
264 .virtual = (unsigned long)S3C_VA_SYS,
265 .pfn = __phys_to_pfn(EXYNOS5_PA_SYSCON),
266 .length = SZ_64K,
267 .type = MT_DEVICE,
268 }, {
269 .virtual = (unsigned long)S3C_VA_TIMER,
270 .pfn = __phys_to_pfn(EXYNOS5_PA_TIMER),
271 .length = SZ_16K,
272 .type = MT_DEVICE,
273 }, {
274 .virtual = (unsigned long)S3C_VA_WATCHDOG,
275 .pfn = __phys_to_pfn(EXYNOS5_PA_WATCHDOG),
276 .length = SZ_4K,
277 .type = MT_DEVICE,
278 }, {
279 .virtual = (unsigned long)S5P_VA_SROMC,
280 .pfn = __phys_to_pfn(EXYNOS5_PA_SROMC),
281 .length = SZ_4K,
282 .type = MT_DEVICE,
283 }, {
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900284 .virtual = (unsigned long)S5P_VA_SYSRAM,
285 .pfn = __phys_to_pfn(EXYNOS5_PA_SYSRAM),
286 .length = SZ_4K,
287 .type = MT_DEVICE,
288 }, {
289 .virtual = (unsigned long)S5P_VA_CMU,
290 .pfn = __phys_to_pfn(EXYNOS5_PA_CMU),
291 .length = 144 * SZ_1K,
292 .type = MT_DEVICE,
293 }, {
294 .virtual = (unsigned long)S5P_VA_PMU,
295 .pfn = __phys_to_pfn(EXYNOS5_PA_PMU),
296 .length = SZ_64K,
297 .type = MT_DEVICE,
298 }, {
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900299 .virtual = (unsigned long)S3C_VA_UART,
300 .pfn = __phys_to_pfn(EXYNOS5_PA_UART),
301 .length = SZ_512K,
302 .type = MT_DEVICE,
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900303 },
304};
305
Kukjin Kim2edb36c2012-11-15 15:48:56 +0900306static struct map_desc exynos5440_iodesc0[] __initdata = {
307 {
308 .virtual = (unsigned long)S3C_VA_UART,
309 .pfn = __phys_to_pfn(EXYNOS5440_PA_UART0),
310 .length = SZ_512K,
311 .type = MT_DEVICE,
312 },
313};
314
Russell King9eb48592012-01-03 11:56:53 +0100315void exynos4_restart(char mode, const char *cmd)
Kukjin Kimcc511b82011-12-27 08:18:36 +0100316{
317 __raw_writel(0x1, S5P_SWRESET);
318}
319
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900320void exynos5_restart(char mode, const char *cmd)
321{
Thomas Abraham60db7e52013-01-24 10:09:13 -0800322 struct device_node *np;
Kukjin Kim2edb36c2012-11-15 15:48:56 +0900323 u32 val;
324 void __iomem *addr;
325
326 if (of_machine_is_compatible("samsung,exynos5250")) {
327 val = 0x1;
328 addr = EXYNOS_SWRESET;
329 } else if (of_machine_is_compatible("samsung,exynos5440")) {
Thomas Abraham60db7e52013-01-24 10:09:13 -0800330 np = of_find_compatible_node(NULL, NULL, "samsung,exynos5440-clock");
331 addr = of_iomap(np, 0) + 0xcc;
332 val = (0xfff << 20) | (0x1 << 16);
Kukjin Kim2edb36c2012-11-15 15:48:56 +0900333 } else {
334 pr_err("%s: cannot support non-DT\n", __func__);
335 return;
336 }
337
338 __raw_writel(val, addr);
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900339}
340
Shawn Guobb13fab2012-04-26 10:35:40 +0800341void __init exynos_init_late(void)
342{
Kukjin Kim2edb36c2012-11-15 15:48:56 +0900343 if (of_machine_is_compatible("samsung,exynos5440"))
344 /* to be supported later */
345 return;
346
Shawn Guobb13fab2012-04-26 10:35:40 +0800347 exynos_pm_late_initcall();
348}
349
Kukjin Kimcc511b82011-12-27 08:18:36 +0100350/*
351 * exynos_map_io
352 *
353 * register the standard cpu IO areas
354 */
355
356void __init exynos_init_io(struct map_desc *mach_desc, int size)
357{
Doug Anderson5b7897d2012-11-27 11:53:14 -0800358 struct map_desc *iodesc = exynos_iodesc;
359 int iodesc_sz = ARRAY_SIZE(exynos_iodesc);
360#if defined(CONFIG_OF) && defined(CONFIG_ARCH_EXYNOS5)
361 unsigned long root = of_get_flat_dt_root();
362
Kukjin Kimcc511b82011-12-27 08:18:36 +0100363 /* initialize the io descriptors we need for initialization */
Doug Anderson5b7897d2012-11-27 11:53:14 -0800364 if (of_flat_dt_is_compatible(root, "samsung,exynos5440")) {
365 iodesc = exynos5440_iodesc;
366 iodesc_sz = ARRAY_SIZE(exynos5440_iodesc);
367 }
368#endif
369
370 iotable_init(iodesc, iodesc_sz);
Kukjin Kim2edb36c2012-11-15 15:48:56 +0900371
Kukjin Kimcc511b82011-12-27 08:18:36 +0100372 if (mach_desc)
373 iotable_init(mach_desc, size);
374
375 /* detect cpu id and rev. */
376 s5p_init_cpu(S5P_VA_CHIPID);
377
378 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
379}
380
Kukjin Kim906c7892012-02-11 21:27:08 +0900381static void __init exynos4_map_io(void)
Kukjin Kimcc511b82011-12-27 08:18:36 +0100382{
383 iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc));
384
385 if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_0)
386 iotable_init(exynos4_iodesc0, ARRAY_SIZE(exynos4_iodesc0));
387 else
388 iotable_init(exynos4_iodesc1, ARRAY_SIZE(exynos4_iodesc1));
389
Tomasz Figa41de8982012-12-11 13:58:43 +0900390 if (soc_is_exynos4210())
391 iotable_init(exynos4210_iodesc, ARRAY_SIZE(exynos4210_iodesc));
392 if (soc_is_exynos4212() || soc_is_exynos4412())
393 iotable_init(exynos4x12_iodesc, ARRAY_SIZE(exynos4x12_iodesc));
394
Kukjin Kimcc511b82011-12-27 08:18:36 +0100395 /* initialize device information early */
396 exynos4_default_sdhci0();
397 exynos4_default_sdhci1();
398 exynos4_default_sdhci2();
399 exynos4_default_sdhci3();
400
401 s3c_adc_setname("samsung-adc-v3");
402
403 s3c_fimc_setname(0, "exynos4-fimc");
404 s3c_fimc_setname(1, "exynos4-fimc");
405 s3c_fimc_setname(2, "exynos4-fimc");
406 s3c_fimc_setname(3, "exynos4-fimc");
407
Thomas Abraham8482c812012-04-14 08:04:46 -0700408 s3c_sdhci_setname(0, "exynos4-sdhci");
409 s3c_sdhci_setname(1, "exynos4-sdhci");
410 s3c_sdhci_setname(2, "exynos4-sdhci");
411 s3c_sdhci_setname(3, "exynos4-sdhci");
412
Kukjin Kimcc511b82011-12-27 08:18:36 +0100413 /* The I2C bus controllers are directly compatible with s3c2440 */
414 s3c_i2c0_setname("s3c2440-i2c");
415 s3c_i2c1_setname("s3c2440-i2c");
416 s3c_i2c2_setname("s3c2440-i2c");
417
418 s5p_fb_setname(0, "exynos4-fb");
419 s5p_hdmi_setname("exynos4-hdmi");
Heiko Stuebner308b3af2012-10-17 16:47:11 +0900420
421 s3c64xx_spi_setname("exynos4210-spi");
Kukjin Kimcc511b82011-12-27 08:18:36 +0100422}
423
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900424static void __init exynos5_map_io(void)
425{
426 iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc));
Tomasz Figa41de8982012-12-11 13:58:43 +0900427
428 if (soc_is_exynos5250())
429 iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc));
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900430}
431
Kukjin Kim2edb36c2012-11-15 15:48:56 +0900432static void __init exynos5440_map_io(void)
433{
434 iotable_init(exynos5440_iodesc0, ARRAY_SIZE(exynos5440_iodesc0));
435}
436
Thomas Abraham6923ae42013-03-09 17:03:29 +0900437void __init exynos_init_time(void)
438{
439 if (of_have_populated_dt()) {
440#ifdef CONFIG_OF
441 of_clk_init(NULL);
442 clocksource_of_init();
443#endif
444 } else {
445 /* todo: remove after migrating legacy E4 platforms to dt */
Thomas Abraham296f3f22013-04-05 15:17:47 +0900446#ifdef CONFIG_ARCH_EXYNOS4
Thomas Abraham6923ae42013-03-09 17:03:29 +0900447 exynos4_clk_init(NULL);
Thomas Abraham92744272013-03-09 17:03:33 +0900448 exynos4_clk_register_fixed_ext(xxti_f, xusbxti_f);
Thomas Abraham296f3f22013-04-05 15:17:47 +0900449#endif
Thomas Abraham6923ae42013-03-09 17:03:29 +0900450 mct_init();
451 }
452}
453
Kukjin Kimcc511b82011-12-27 08:18:36 +0100454void __init exynos4_init_irq(void)
455{
Arnd Bergmann40ba95f2012-01-07 11:51:28 +0000456 unsigned int gic_bank_offset;
Kukjin Kimcc511b82011-12-27 08:18:36 +0100457
458 gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000;
459
Arnd Bergmann237c78b2012-01-07 12:30:20 +0000460 if (!of_have_populated_dt())
Grant Likely75294952012-02-14 14:06:57 -0700461 gic_init_bases(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU, gic_bank_offset, NULL);
Arnd Bergmann237c78b2012-01-07 12:30:20 +0000462#ifdef CONFIG_OF
463 else
Rob Herring0529e3152012-11-05 16:18:28 -0600464 irqchip_init();
Arnd Bergmann237c78b2012-01-07 12:30:20 +0000465#endif
Kukjin Kimcc511b82011-12-27 08:18:36 +0100466
Thomas Abrahame873a472012-05-15 16:25:23 +0900467 if (!of_have_populated_dt())
468 combiner_init(S5P_VA_COMBINER_BASE, NULL);
Kukjin Kimcc511b82011-12-27 08:18:36 +0100469
470 /*
471 * The parameters of s5p_init_irq() are for VIC init.
472 * Theses parameters should be NULL and 0 because EXYNOS4
473 * uses GIC instead of VIC.
474 */
475 s5p_init_irq(NULL, 0);
476}
477
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900478void __init exynos5_init_irq(void)
479{
Tushar Behera6fff5a12012-04-24 13:25:01 -0700480#ifdef CONFIG_OF
Rob Herring0529e3152012-11-05 16:18:28 -0600481 irqchip_init();
Tushar Behera6fff5a12012-04-24 13:25:01 -0700482#endif
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900483 /*
484 * The parameters of s5p_init_irq() are for VIC init.
485 * Theses parameters should be NULL and 0 because EXYNOS4
486 * uses GIC instead of VIC.
487 */
Kukjin Kim12fee192012-12-06 15:31:10 +0900488 if (!of_machine_is_compatible("samsung,exynos5440"))
489 s5p_init_irq(NULL, 0);
Inderpal Singh34455132012-11-22 14:46:21 +0900490
491 gic_arch_extn.irq_set_wake = s3c_irq_wake;
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900492}
493
Thomas Abraham9ee6af92012-05-15 15:47:40 +0900494struct bus_type exynos_subsys = {
495 .name = "exynos-core",
496 .dev_name = "exynos-core",
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900497};
498
Linus Torvalds7affca32012-01-07 12:03:30 -0800499static struct device exynos4_dev = {
Thomas Abraham9ee6af92012-05-15 15:47:40 +0900500 .bus = &exynos_subsys,
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900501};
502
503static int __init exynos_core_init(void)
Kukjin Kimcc511b82011-12-27 08:18:36 +0100504{
Thomas Abraham9ee6af92012-05-15 15:47:40 +0900505 return subsys_system_register(&exynos_subsys, NULL);
Kukjin Kimcc511b82011-12-27 08:18:36 +0100506}
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900507core_initcall(exynos_core_init);
Kukjin Kimcc511b82011-12-27 08:18:36 +0100508
509#ifdef CONFIG_CACHE_L2X0
510static int __init exynos4_l2x0_cache_init(void)
511{
Il Hane1b19942012-04-05 07:59:36 -0700512 int ret;
513
Kukjin Kim2edb36c2012-11-15 15:48:56 +0900514 if (soc_is_exynos5250() || soc_is_exynos5440())
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900515 return 0;
516
Amit Daniel Kachhap6cdeddc2012-03-08 02:09:12 -0800517 ret = l2x0_of_init(L2_AUX_VAL, L2_AUX_MASK);
518 if (!ret) {
519 l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs);
520 clean_dcache_area(&l2x0_regs_phys, sizeof(unsigned long));
521 return 0;
522 }
Kukjin Kimcc511b82011-12-27 08:18:36 +0100523
Amit Daniel Kachhapb756a502012-03-08 02:07:41 -0800524 if (!(__raw_readl(S5P_VA_L2CC + L2X0_CTRL) & 0x1)) {
525 l2x0_saved_regs.phy_base = EXYNOS4_PA_L2CC;
526 /* TAG, Data Latency Control: 2 cycles */
527 l2x0_saved_regs.tag_latency = 0x110;
Kukjin Kimcc511b82011-12-27 08:18:36 +0100528
Amit Daniel Kachhapb756a502012-03-08 02:07:41 -0800529 if (soc_is_exynos4212() || soc_is_exynos4412())
530 l2x0_saved_regs.data_latency = 0x120;
531 else
532 l2x0_saved_regs.data_latency = 0x110;
Kukjin Kimcc511b82011-12-27 08:18:36 +0100533
Amit Daniel Kachhapb756a502012-03-08 02:07:41 -0800534 l2x0_saved_regs.prefetch_ctrl = 0x30000007;
535 l2x0_saved_regs.pwr_ctrl =
536 (L2X0_DYNAMIC_CLK_GATING_EN | L2X0_STNDBY_MODE_EN);
Kukjin Kimcc511b82011-12-27 08:18:36 +0100537
Amit Daniel Kachhapb756a502012-03-08 02:07:41 -0800538 l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs);
Kukjin Kimcc511b82011-12-27 08:18:36 +0100539
Amit Daniel Kachhapb756a502012-03-08 02:07:41 -0800540 __raw_writel(l2x0_saved_regs.tag_latency,
541 S5P_VA_L2CC + L2X0_TAG_LATENCY_CTRL);
542 __raw_writel(l2x0_saved_regs.data_latency,
543 S5P_VA_L2CC + L2X0_DATA_LATENCY_CTRL);
544
545 /* L2X0 Prefetch Control */
546 __raw_writel(l2x0_saved_regs.prefetch_ctrl,
547 S5P_VA_L2CC + L2X0_PREFETCH_CTRL);
548
549 /* L2X0 Power Control */
550 __raw_writel(l2x0_saved_regs.pwr_ctrl,
551 S5P_VA_L2CC + L2X0_POWER_CTRL);
552
553 clean_dcache_area(&l2x0_regs_phys, sizeof(unsigned long));
554 clean_dcache_area(&l2x0_saved_regs, sizeof(struct l2x0_regs));
555 }
Kukjin Kimcc511b82011-12-27 08:18:36 +0100556
Amit Daniel Kachhap6cdeddc2012-03-08 02:09:12 -0800557 l2x0_init(S5P_VA_L2CC, L2_AUX_VAL, L2_AUX_MASK);
Kukjin Kimcc511b82011-12-27 08:18:36 +0100558 return 0;
559}
Kukjin Kimcc511b82011-12-27 08:18:36 +0100560early_initcall(exynos4_l2x0_cache_init);
561#endif
562
Kukjin Kim906c7892012-02-11 21:27:08 +0900563static int __init exynos_init(void)
Kukjin Kimcc511b82011-12-27 08:18:36 +0100564{
565 printk(KERN_INFO "EXYNOS: Initializing architecture\n");
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900566
Thomas Abraham9ee6af92012-05-15 15:47:40 +0900567 return device_register(&exynos4_dev);
Kukjin Kimcc511b82011-12-27 08:18:36 +0100568}
569
Kukjin Kimcc511b82011-12-27 08:18:36 +0100570/* uart registration process */
571
Thomas Abraham55b6ef72012-10-29 19:46:49 +0900572static void __init exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no)
Kukjin Kimcc511b82011-12-27 08:18:36 +0100573{
574 struct s3c2410_uartcfg *tcfg = cfg;
575 u32 ucnt;
576
Arnd Bergmann237c78b2012-01-07 12:30:20 +0000577 for (ucnt = 0; ucnt < no; ucnt++, tcfg++)
578 tcfg->has_fracval = 1;
Kukjin Kimcc511b82011-12-27 08:18:36 +0100579
Thomas Abraham55b6ef72012-10-29 19:46:49 +0900580 s3c24xx_init_uartdevs("exynos4210-uart", exynos4_uart_resources, cfg, no);
Kukjin Kimcc511b82011-12-27 08:18:36 +0100581}
582
Eunki Kim330c90a2012-03-14 01:43:31 -0700583static void __iomem *exynos_eint_base;
584
Kukjin Kimcc511b82011-12-27 08:18:36 +0100585static DEFINE_SPINLOCK(eint_lock);
586
587static unsigned int eint0_15_data[16];
588
Eunki Kim330c90a2012-03-14 01:43:31 -0700589static inline int exynos4_irq_to_gpio(unsigned int irq)
Kukjin Kimcc511b82011-12-27 08:18:36 +0100590{
Eunki Kim330c90a2012-03-14 01:43:31 -0700591 if (irq < IRQ_EINT(0))
592 return -EINVAL;
Kukjin Kimcc511b82011-12-27 08:18:36 +0100593
Eunki Kim330c90a2012-03-14 01:43:31 -0700594 irq -= IRQ_EINT(0);
595 if (irq < 8)
596 return EXYNOS4_GPX0(irq);
Kukjin Kimcc511b82011-12-27 08:18:36 +0100597
Eunki Kim330c90a2012-03-14 01:43:31 -0700598 irq -= 8;
599 if (irq < 8)
600 return EXYNOS4_GPX1(irq);
601
602 irq -= 8;
603 if (irq < 8)
604 return EXYNOS4_GPX2(irq);
605
606 irq -= 8;
607 if (irq < 8)
608 return EXYNOS4_GPX3(irq);
609
610 return -EINVAL;
Kukjin Kimcc511b82011-12-27 08:18:36 +0100611}
612
Eunki Kim330c90a2012-03-14 01:43:31 -0700613static inline int exynos5_irq_to_gpio(unsigned int irq)
614{
615 if (irq < IRQ_EINT(0))
616 return -EINVAL;
617
618 irq -= IRQ_EINT(0);
619 if (irq < 8)
620 return EXYNOS5_GPX0(irq);
621
622 irq -= 8;
623 if (irq < 8)
624 return EXYNOS5_GPX1(irq);
625
626 irq -= 8;
627 if (irq < 8)
628 return EXYNOS5_GPX2(irq);
629
630 irq -= 8;
631 if (irq < 8)
632 return EXYNOS5_GPX3(irq);
633
634 return -EINVAL;
635}
636
Kukjin Kimbb19a752012-01-25 13:48:11 +0900637static unsigned int exynos4_eint0_15_src_int[16] = {
638 EXYNOS4_IRQ_EINT0,
639 EXYNOS4_IRQ_EINT1,
640 EXYNOS4_IRQ_EINT2,
641 EXYNOS4_IRQ_EINT3,
642 EXYNOS4_IRQ_EINT4,
643 EXYNOS4_IRQ_EINT5,
644 EXYNOS4_IRQ_EINT6,
645 EXYNOS4_IRQ_EINT7,
646 EXYNOS4_IRQ_EINT8,
647 EXYNOS4_IRQ_EINT9,
648 EXYNOS4_IRQ_EINT10,
649 EXYNOS4_IRQ_EINT11,
650 EXYNOS4_IRQ_EINT12,
651 EXYNOS4_IRQ_EINT13,
652 EXYNOS4_IRQ_EINT14,
653 EXYNOS4_IRQ_EINT15,
654};
Kukjin Kimcc511b82011-12-27 08:18:36 +0100655
Kukjin Kimbb19a752012-01-25 13:48:11 +0900656static unsigned int exynos5_eint0_15_src_int[16] = {
657 EXYNOS5_IRQ_EINT0,
658 EXYNOS5_IRQ_EINT1,
659 EXYNOS5_IRQ_EINT2,
660 EXYNOS5_IRQ_EINT3,
661 EXYNOS5_IRQ_EINT4,
662 EXYNOS5_IRQ_EINT5,
663 EXYNOS5_IRQ_EINT6,
664 EXYNOS5_IRQ_EINT7,
665 EXYNOS5_IRQ_EINT8,
666 EXYNOS5_IRQ_EINT9,
667 EXYNOS5_IRQ_EINT10,
668 EXYNOS5_IRQ_EINT11,
669 EXYNOS5_IRQ_EINT12,
670 EXYNOS5_IRQ_EINT13,
671 EXYNOS5_IRQ_EINT14,
672 EXYNOS5_IRQ_EINT15,
673};
Eunki Kim330c90a2012-03-14 01:43:31 -0700674static inline void exynos_irq_eint_mask(struct irq_data *data)
Kukjin Kimcc511b82011-12-27 08:18:36 +0100675{
676 u32 mask;
677
678 spin_lock(&eint_lock);
Eunki Kim330c90a2012-03-14 01:43:31 -0700679 mask = __raw_readl(EINT_MASK(exynos_eint_base, data->irq));
680 mask |= EINT_OFFSET_BIT(data->irq);
681 __raw_writel(mask, EINT_MASK(exynos_eint_base, data->irq));
Kukjin Kimcc511b82011-12-27 08:18:36 +0100682 spin_unlock(&eint_lock);
683}
684
Eunki Kim330c90a2012-03-14 01:43:31 -0700685static void exynos_irq_eint_unmask(struct irq_data *data)
Kukjin Kimcc511b82011-12-27 08:18:36 +0100686{
687 u32 mask;
688
689 spin_lock(&eint_lock);
Eunki Kim330c90a2012-03-14 01:43:31 -0700690 mask = __raw_readl(EINT_MASK(exynos_eint_base, data->irq));
691 mask &= ~(EINT_OFFSET_BIT(data->irq));
692 __raw_writel(mask, EINT_MASK(exynos_eint_base, data->irq));
Kukjin Kimcc511b82011-12-27 08:18:36 +0100693 spin_unlock(&eint_lock);
694}
695
Eunki Kim330c90a2012-03-14 01:43:31 -0700696static inline void exynos_irq_eint_ack(struct irq_data *data)
Kukjin Kimcc511b82011-12-27 08:18:36 +0100697{
Eunki Kim330c90a2012-03-14 01:43:31 -0700698 __raw_writel(EINT_OFFSET_BIT(data->irq),
699 EINT_PEND(exynos_eint_base, data->irq));
Kukjin Kimcc511b82011-12-27 08:18:36 +0100700}
701
Eunki Kim330c90a2012-03-14 01:43:31 -0700702static void exynos_irq_eint_maskack(struct irq_data *data)
Kukjin Kimcc511b82011-12-27 08:18:36 +0100703{
Eunki Kim330c90a2012-03-14 01:43:31 -0700704 exynos_irq_eint_mask(data);
705 exynos_irq_eint_ack(data);
Kukjin Kimcc511b82011-12-27 08:18:36 +0100706}
707
Eunki Kim330c90a2012-03-14 01:43:31 -0700708static int exynos_irq_eint_set_type(struct irq_data *data, unsigned int type)
Kukjin Kimcc511b82011-12-27 08:18:36 +0100709{
710 int offs = EINT_OFFSET(data->irq);
711 int shift;
712 u32 ctrl, mask;
713 u32 newvalue = 0;
714
715 switch (type) {
716 case IRQ_TYPE_EDGE_RISING:
717 newvalue = S5P_IRQ_TYPE_EDGE_RISING;
718 break;
719
720 case IRQ_TYPE_EDGE_FALLING:
721 newvalue = S5P_IRQ_TYPE_EDGE_FALLING;
722 break;
723
724 case IRQ_TYPE_EDGE_BOTH:
725 newvalue = S5P_IRQ_TYPE_EDGE_BOTH;
726 break;
727
728 case IRQ_TYPE_LEVEL_LOW:
729 newvalue = S5P_IRQ_TYPE_LEVEL_LOW;
730 break;
731
732 case IRQ_TYPE_LEVEL_HIGH:
733 newvalue = S5P_IRQ_TYPE_LEVEL_HIGH;
734 break;
735
736 default:
737 printk(KERN_ERR "No such irq type %d", type);
738 return -EINVAL;
739 }
740
741 shift = (offs & 0x7) * 4;
742 mask = 0x7 << shift;
743
744 spin_lock(&eint_lock);
Eunki Kim330c90a2012-03-14 01:43:31 -0700745 ctrl = __raw_readl(EINT_CON(exynos_eint_base, data->irq));
Kukjin Kimcc511b82011-12-27 08:18:36 +0100746 ctrl &= ~mask;
747 ctrl |= newvalue << shift;
Eunki Kim330c90a2012-03-14 01:43:31 -0700748 __raw_writel(ctrl, EINT_CON(exynos_eint_base, data->irq));
Kukjin Kimcc511b82011-12-27 08:18:36 +0100749 spin_unlock(&eint_lock);
750
Eunki Kim330c90a2012-03-14 01:43:31 -0700751 if (soc_is_exynos5250())
752 s3c_gpio_cfgpin(exynos5_irq_to_gpio(data->irq), S3C_GPIO_SFN(0xf));
753 else
754 s3c_gpio_cfgpin(exynos4_irq_to_gpio(data->irq), S3C_GPIO_SFN(0xf));
Kukjin Kimcc511b82011-12-27 08:18:36 +0100755
756 return 0;
757}
758
Eunki Kim330c90a2012-03-14 01:43:31 -0700759static struct irq_chip exynos_irq_eint = {
760 .name = "exynos-eint",
761 .irq_mask = exynos_irq_eint_mask,
762 .irq_unmask = exynos_irq_eint_unmask,
763 .irq_mask_ack = exynos_irq_eint_maskack,
764 .irq_ack = exynos_irq_eint_ack,
765 .irq_set_type = exynos_irq_eint_set_type,
Kukjin Kimcc511b82011-12-27 08:18:36 +0100766#ifdef CONFIG_PM
767 .irq_set_wake = s3c_irqext_wake,
768#endif
769};
770
771/*
772 * exynos4_irq_demux_eint
773 *
774 * This function demuxes the IRQ from from EINTs 16 to 31.
775 * It is designed to be inlined into the specific handler
776 * s5p_irq_demux_eintX_Y.
777 *
778 * Each EINT pend/mask registers handle eight of them.
779 */
Eunki Kim330c90a2012-03-14 01:43:31 -0700780static inline void exynos_irq_demux_eint(unsigned int start)
Kukjin Kimcc511b82011-12-27 08:18:36 +0100781{
782 unsigned int irq;
783
Eunki Kim330c90a2012-03-14 01:43:31 -0700784 u32 status = __raw_readl(EINT_PEND(exynos_eint_base, start));
785 u32 mask = __raw_readl(EINT_MASK(exynos_eint_base, start));
Kukjin Kimcc511b82011-12-27 08:18:36 +0100786
787 status &= ~mask;
788 status &= 0xff;
789
790 while (status) {
791 irq = fls(status) - 1;
792 generic_handle_irq(irq + start);
793 status &= ~(1 << irq);
794 }
795}
796
Eunki Kim330c90a2012-03-14 01:43:31 -0700797static void exynos_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc)
Kukjin Kimcc511b82011-12-27 08:18:36 +0100798{
799 struct irq_chip *chip = irq_get_chip(irq);
800 chained_irq_enter(chip, desc);
Eunki Kim330c90a2012-03-14 01:43:31 -0700801 exynos_irq_demux_eint(IRQ_EINT(16));
802 exynos_irq_demux_eint(IRQ_EINT(24));
Kukjin Kimcc511b82011-12-27 08:18:36 +0100803 chained_irq_exit(chip, desc);
804}
805
Kukjin Kimbb19a752012-01-25 13:48:11 +0900806static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc)
Kukjin Kimcc511b82011-12-27 08:18:36 +0100807{
808 u32 *irq_data = irq_get_handler_data(irq);
809 struct irq_chip *chip = irq_get_chip(irq);
810
811 chained_irq_enter(chip, desc);
Kukjin Kimcc511b82011-12-27 08:18:36 +0100812 generic_handle_irq(*irq_data);
Kukjin Kimcc511b82011-12-27 08:18:36 +0100813 chained_irq_exit(chip, desc);
814}
815
Eunki Kim330c90a2012-03-14 01:43:31 -0700816static int __init exynos_init_irq_eint(void)
Kukjin Kimcc511b82011-12-27 08:18:36 +0100817{
818 int irq;
819
Thomas Abrahamfef05c22012-09-07 06:07:40 +0900820#ifdef CONFIG_PINCTRL_SAMSUNG
821 /*
822 * The Samsung pinctrl driver provides an integrated gpio/pinmux/pinconf
823 * functionality along with support for external gpio and wakeup
824 * interrupts. If the samsung pinctrl driver is enabled and includes
825 * the wakeup interrupt support, then the setting up external wakeup
826 * interrupts here can be skipped. This check here is temporary to
827 * allow exynos4 platforms that do not use Samsung pinctrl driver to
828 * co-exist with platforms that do. When all of the Samsung Exynos4
829 * platforms switch over to using the pinctrl driver, the wakeup
830 * interrupt support code here can be completely removed.
831 */
Tomasz Figaab7b51f2012-11-07 08:44:51 +0900832 static const struct of_device_id exynos_pinctrl_ids[] = {
Kukjin Kimb533c862013-01-02 16:05:42 -0800833 { .compatible = "samsung,exynos4210-pinctrl", },
834 { .compatible = "samsung,exynos4x12-pinctrl", },
Tomasz Figaab7b51f2012-11-07 08:44:51 +0900835 };
Thomas Abrahamfef05c22012-09-07 06:07:40 +0900836 struct device_node *pctrl_np, *wkup_np;
Thomas Abrahamfef05c22012-09-07 06:07:40 +0900837 const char *wkup_compat = "samsung,exynos4210-wakeup-eint";
838
Tomasz Figaab7b51f2012-11-07 08:44:51 +0900839 for_each_matching_node(pctrl_np, exynos_pinctrl_ids) {
Thomas Abrahamfef05c22012-09-07 06:07:40 +0900840 if (of_device_is_available(pctrl_np)) {
841 wkup_np = of_find_compatible_node(pctrl_np, NULL,
842 wkup_compat);
843 if (wkup_np)
844 return -ENODEV;
845 }
846 }
847#endif
Kukjin Kim2edb36c2012-11-15 15:48:56 +0900848 if (soc_is_exynos5440())
849 return 0;
Thomas Abrahamfef05c22012-09-07 06:07:40 +0900850
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900851 if (soc_is_exynos5250())
Eunki Kim330c90a2012-03-14 01:43:31 -0700852 exynos_eint_base = ioremap(EXYNOS5_PA_GPIO1, SZ_4K);
853 else
854 exynos_eint_base = ioremap(EXYNOS4_PA_GPIO2, SZ_4K);
855
856 if (exynos_eint_base == NULL) {
857 pr_err("unable to ioremap for EINT base address\n");
858 return -ENOMEM;
859 }
Kukjin Kim94c7ca72012-02-11 22:15:45 +0900860
Kukjin Kimcc511b82011-12-27 08:18:36 +0100861 for (irq = 0 ; irq <= 31 ; irq++) {
Eunki Kim330c90a2012-03-14 01:43:31 -0700862 irq_set_chip_and_handler(IRQ_EINT(irq), &exynos_irq_eint,
Kukjin Kimcc511b82011-12-27 08:18:36 +0100863 handle_level_irq);
864 set_irq_flags(IRQ_EINT(irq), IRQF_VALID);
865 }
866
Eunki Kim330c90a2012-03-14 01:43:31 -0700867 irq_set_chained_handler(EXYNOS_IRQ_EINT16_31, exynos_irq_demux_eint16_31);
Kukjin Kimcc511b82011-12-27 08:18:36 +0100868
869 for (irq = 0 ; irq <= 15 ; irq++) {
870 eint0_15_data[irq] = IRQ_EINT(irq);
871
Kukjin Kimbb19a752012-01-25 13:48:11 +0900872 if (soc_is_exynos5250()) {
873 irq_set_handler_data(exynos5_eint0_15_src_int[irq],
874 &eint0_15_data[irq]);
875 irq_set_chained_handler(exynos5_eint0_15_src_int[irq],
876 exynos_irq_eint0_15);
877 } else {
878 irq_set_handler_data(exynos4_eint0_15_src_int[irq],
879 &eint0_15_data[irq]);
880 irq_set_chained_handler(exynos4_eint0_15_src_int[irq],
881 exynos_irq_eint0_15);
882 }
Kukjin Kimcc511b82011-12-27 08:18:36 +0100883 }
884
885 return 0;
886}
Eunki Kim330c90a2012-03-14 01:43:31 -0700887arch_initcall(exynos_init_irq_eint);