aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-exynos/common.c')
-rw-r--r--arch/arm/mach-exynos/common.c53
1 files changed, 19 insertions, 34 deletions
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index b6ac6ee658c0..c59e18871006 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -17,8 +17,11 @@
17#include <linux/gpio.h> 17#include <linux/gpio.h>
18#include <linux/sched.h> 18#include <linux/sched.h>
19#include <linux/serial_core.h> 19#include <linux/serial_core.h>
20#include <linux/of.h>
21#include <linux/of_irq.h>
20 22
21#include <asm/proc-fns.h> 23#include <asm/proc-fns.h>
24#include <asm/exception.h>
22#include <asm/hardware/cache-l2x0.h> 25#include <asm/hardware/cache-l2x0.h>
23#include <asm/hardware/gic.h> 26#include <asm/hardware/gic.h>
24#include <asm/mach/map.h> 27#include <asm/mach/map.h>
@@ -43,8 +46,6 @@
43 46
44#include "common.h" 47#include "common.h"
45 48
46unsigned int gic_bank_offset __read_mostly;
47
48static const char name_exynos4210[] = "EXYNOS4210"; 49static const char name_exynos4210[] = "EXYNOS4210";
49static const char name_exynos4212[] = "EXYNOS4212"; 50static const char name_exynos4212[] = "EXYNOS4212";
50static const char name_exynos4412[] = "EXYNOS4412"; 51static const char name_exynos4412[] = "EXYNOS4412";
@@ -386,27 +387,26 @@ static void __init combiner_init(unsigned int combiner_nr, void __iomem *base,
386 } 387 }
387} 388}
388 389
389static void exynos4_gic_irq_fix_base(struct irq_data *d) 390#ifdef CONFIG_OF
390{ 391static const struct of_device_id exynos4_dt_irq_match[] = {
391 struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); 392 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
392 393 {},
393 gic_data->cpu_base = S5P_VA_GIC_CPU + 394};
394 (gic_bank_offset * smp_processor_id()); 395#endif
395
396 gic_data->dist_base = S5P_VA_GIC_DIST +
397 (gic_bank_offset * smp_processor_id());
398}
399 396
400void __init exynos4_init_irq(void) 397void __init exynos4_init_irq(void)
401{ 398{
402 int irq; 399 int irq;
400 unsigned int gic_bank_offset;
403 401
404 gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000; 402 gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000;
405 403
406 gic_init(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU); 404 if (!of_have_populated_dt())
407 gic_arch_extn.irq_eoi = exynos4_gic_irq_fix_base; 405 gic_init_bases(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU, gic_bank_offset);
408 gic_arch_extn.irq_unmask = exynos4_gic_irq_fix_base; 406#ifdef CONFIG_OF
409 gic_arch_extn.irq_mask = exynos4_gic_irq_fix_base; 407 else
408 of_irq_init(exynos4_dt_irq_match);
409#endif
410 410
411 for (irq = 0; irq < MAX_COMBINER_NR; irq++) { 411 for (irq = 0; irq < MAX_COMBINER_NR; irq++) {
412 412
@@ -474,15 +474,6 @@ int __init exynos_init(void)
474 return device_register(&exynos4_dev); 474 return device_register(&exynos4_dev);
475} 475}
476 476
477static struct s3c24xx_uart_clksrc exynos4_serial_clocks[] = {
478 [0] = {
479 .name = "uclk1",
480 .divisor = 1,
481 .min_baud = 0,
482 .max_baud = 0,
483 },
484};
485
486/* uart registration process */ 477/* uart registration process */
487 478
488void __init exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no) 479void __init exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no)
@@ -490,16 +481,10 @@ void __init exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no)
490 struct s3c2410_uartcfg *tcfg = cfg; 481 struct s3c2410_uartcfg *tcfg = cfg;
491 u32 ucnt; 482 u32 ucnt;
492 483
493 for (ucnt = 0; ucnt < no; ucnt++, tcfg++) { 484 for (ucnt = 0; ucnt < no; ucnt++, tcfg++)
494 if (!tcfg->clocks) { 485 tcfg->has_fracval = 1;
495 tcfg->has_fracval = 1;
496 tcfg->clocks = exynos4_serial_clocks;
497 tcfg->clocks_size = ARRAY_SIZE(exynos4_serial_clocks);
498 }
499 tcfg->flags |= NO_NEED_CHECK_CLKSRC;
500 }
501 486
502 s3c24xx_init_uartdevs("s5pv210-uart", s5p_uart_resources, cfg, no); 487 s3c24xx_init_uartdevs("exynos4210-uart", s5p_uart_resources, cfg, no);
503} 488}
504 489
505static DEFINE_SPINLOCK(eint_lock); 490static DEFINE_SPINLOCK(eint_lock);