Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clocksource: exynos_mct: remove platform header dependency

For the non-DT case, the mct_init() function requires access
to a couple of platform specific constants, but cannot include
the header files in case we are building for multiplatform.

This changes the interface to the platform so we pass all
the necessary data as arguments to mct_init.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>

+8 -17
+1 -1
arch/arm/mach-exynos/common.c
··· 416 416 exynos4_clk_init(NULL, !soc_is_exynos4210(), S5P_VA_CMU, readl(S5P_VA_CHIPID + 8) & 1); 417 417 exynos4_clk_register_fixed_ext(xxti_f, xusbxti_f); 418 418 #endif 419 - mct_init(); 419 + mct_init(S5P_VA_SYSTIMER, EXYNOS4_IRQ_MCT_G0, EXYNOS4_IRQ_MCT_L0, EXYNOS4_IRQ_MCT_L1); 420 420 } 421 421 } 422 422
+1 -1
arch/arm/mach-exynos/common.h
··· 14 14 15 15 #include <linux/of.h> 16 16 17 - extern void mct_init(void); 17 + void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1); 18 18 void exynos_init_time(void); 19 19 extern unsigned long xxti_f, xusbxti_f; 20 20
+6 -15
drivers/clocksource/exynos_mct.c
··· 26 26 27 27 #include <asm/arch_timer.h> 28 28 #include <asm/localtimer.h> 29 - 30 - #include <plat/cpu.h> 31 - 32 - #include <mach/map.h> 33 - #include <mach/irqs.h> 34 29 #include <asm/mach/time.h> 35 30 36 31 #define EXYNOS4_MCTREG(x) (x) ··· 506 511 #endif /* CONFIG_LOCAL_TIMERS */ 507 512 } 508 513 509 - void __init mct_init(void) 514 + void __init mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1) 510 515 { 511 - if (soc_is_exynos4210()) { 512 - mct_irqs[MCT_G0_IRQ] = EXYNOS4_IRQ_MCT_G0; 513 - mct_irqs[MCT_L0_IRQ] = EXYNOS4_IRQ_MCT_L0; 514 - mct_irqs[MCT_L1_IRQ] = EXYNOS4_IRQ_MCT_L1; 515 - mct_int_type = MCT_INT_SPI; 516 - } else { 517 - panic("unable to determine mct controller type\n"); 518 - } 516 + mct_irqs[MCT_G0_IRQ] = irq_g0; 517 + mct_irqs[MCT_L0_IRQ] = irq_l0; 518 + mct_irqs[MCT_L1_IRQ] = irq_l1; 519 + mct_int_type = MCT_INT_SPI; 519 520 520 - exynos4_timer_resources(NULL, S5P_VA_SYSTIMER); 521 + exynos4_timer_resources(NULL, base); 521 522 exynos4_clocksource_init(); 522 523 exynos4_clockevent_init(); 523 524 }