diff options
author | Arnd Bergmann <arnd@arndb.de> | 2013-04-09 16:24:06 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2013-04-09 16:28:45 -0400 |
commit | 19ce4f4a03e52bc694dc837a4a832111cb4271b3 (patch) | |
tree | 79757bb645e035166ca012373992e185f8d07081 /arch/arm/mach-exynos/common.c | |
parent | 228e3023eb0430b4b9ed0736f8f87c96a6cd9c7a (diff) | |
parent | da821eb7d42935b0f7056d98c75fd1150f6636f4 (diff) |
Merge tag 'clk-exynos-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/drivers
From Kukjin Kim <kgene.kim@samsung.com>:
add suppport common clock framework for exynos
* tag 'clk-exynos-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: (73 commits)
ARM: EXYNOS: fix compilation error introduced due to common clock migration
clk: exynos5250: Fix divider values for sclk_mmc{0,1,2,3}
clk: exynos4: export clocks required for fimc-is
clk: samsung: Fix compilation error
clk: exynos5250: register display block gate clocks to common clock framework
clk: exynos4: Add support for SoC-specific register save list
clk: exynos4: Add missing registers to suspend save list
clk: exynos4: Remove E4X12 prefix from SRC_DMC register
clk: exynos4: Add E4210 prefix to GATE_IP_PERIR register
clk: exynos4: Add E4210 prefix to LCD1 clock registers
clk: exynos4: Remove SoC-specific registers from save list
clk: exynos4: Use SRC_MASK_PERIL{0,1} definitions
clk: exynos4: Define {E,V}PLL registers
clk: exynos4: Add missing mout_sata on Exynos4210
clk: exynos4: Add missing CMU_TOP and ISP clocks
clk: exynos4: Add G3D clocks
clk: exynos4: Add camera related clock definitions
clk: exynos4: Export mout_core clock of Exynos4210
clk: samsung: Remove unimplemented ops for pll
clk: exynos4: Export clocks used by exynos cpufreq drivers
...
[arnd: add missing #address-cells property in mshc DT node]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-exynos/common.c')
-rw-r--r-- | arch/arm/mach-exynos/common.c | 54 |
1 files changed, 17 insertions, 37 deletions
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index db7dbd0eb6b4..d3efd6768ff8 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
@@ -25,6 +25,8 @@ | |||
25 | #include <linux/irqdomain.h> | 25 | #include <linux/irqdomain.h> |
26 | #include <linux/irqchip.h> | 26 | #include <linux/irqchip.h> |
27 | #include <linux/of_address.h> | 27 | #include <linux/of_address.h> |
28 | #include <linux/clocksource.h> | ||
29 | #include <linux/clk-provider.h> | ||
28 | #include <linux/irqchip/arm-gic.h> | 30 | #include <linux/irqchip/arm-gic.h> |
29 | 31 | ||
30 | #include <asm/proc-fns.h> | 32 | #include <asm/proc-fns.h> |
@@ -39,7 +41,6 @@ | |||
39 | #include <mach/regs-gpio.h> | 41 | #include <mach/regs-gpio.h> |
40 | 42 | ||
41 | #include <plat/cpu.h> | 43 | #include <plat/cpu.h> |
42 | #include <plat/clock.h> | ||
43 | #include <plat/devs.h> | 44 | #include <plat/devs.h> |
44 | #include <plat/pm.h> | 45 | #include <plat/pm.h> |
45 | #include <plat/sdhci.h> | 46 | #include <plat/sdhci.h> |
@@ -65,17 +66,16 @@ static const char name_exynos5440[] = "EXYNOS5440"; | |||
65 | static void exynos4_map_io(void); | 66 | static void exynos4_map_io(void); |
66 | static void exynos5_map_io(void); | 67 | static void exynos5_map_io(void); |
67 | static void exynos5440_map_io(void); | 68 | static void exynos5440_map_io(void); |
68 | static void exynos4_init_clocks(int xtal); | ||
69 | static void exynos5_init_clocks(int xtal); | ||
70 | static void exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no); | 69 | static void exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
71 | static int exynos_init(void); | 70 | static int exynos_init(void); |
72 | 71 | ||
72 | unsigned long xxti_f = 0, xusbxti_f = 0; | ||
73 | |||
73 | static struct cpu_table cpu_ids[] __initdata = { | 74 | static struct cpu_table cpu_ids[] __initdata = { |
74 | { | 75 | { |
75 | .idcode = EXYNOS4210_CPU_ID, | 76 | .idcode = EXYNOS4210_CPU_ID, |
76 | .idmask = EXYNOS4_CPU_MASK, | 77 | .idmask = EXYNOS4_CPU_MASK, |
77 | .map_io = exynos4_map_io, | 78 | .map_io = exynos4_map_io, |
78 | .init_clocks = exynos4_init_clocks, | ||
79 | .init_uarts = exynos4_init_uarts, | 79 | .init_uarts = exynos4_init_uarts, |
80 | .init = exynos_init, | 80 | .init = exynos_init, |
81 | .name = name_exynos4210, | 81 | .name = name_exynos4210, |
@@ -83,7 +83,6 @@ static struct cpu_table cpu_ids[] __initdata = { | |||
83 | .idcode = EXYNOS4212_CPU_ID, | 83 | .idcode = EXYNOS4212_CPU_ID, |
84 | .idmask = EXYNOS4_CPU_MASK, | 84 | .idmask = EXYNOS4_CPU_MASK, |
85 | .map_io = exynos4_map_io, | 85 | .map_io = exynos4_map_io, |
86 | .init_clocks = exynos4_init_clocks, | ||
87 | .init_uarts = exynos4_init_uarts, | 86 | .init_uarts = exynos4_init_uarts, |
88 | .init = exynos_init, | 87 | .init = exynos_init, |
89 | .name = name_exynos4212, | 88 | .name = name_exynos4212, |
@@ -91,7 +90,6 @@ static struct cpu_table cpu_ids[] __initdata = { | |||
91 | .idcode = EXYNOS4412_CPU_ID, | 90 | .idcode = EXYNOS4412_CPU_ID, |
92 | .idmask = EXYNOS4_CPU_MASK, | 91 | .idmask = EXYNOS4_CPU_MASK, |
93 | .map_io = exynos4_map_io, | 92 | .map_io = exynos4_map_io, |
94 | .init_clocks = exynos4_init_clocks, | ||
95 | .init_uarts = exynos4_init_uarts, | 93 | .init_uarts = exynos4_init_uarts, |
96 | .init = exynos_init, | 94 | .init = exynos_init, |
97 | .name = name_exynos4412, | 95 | .name = name_exynos4412, |
@@ -99,7 +97,6 @@ static struct cpu_table cpu_ids[] __initdata = { | |||
99 | .idcode = EXYNOS5250_SOC_ID, | 97 | .idcode = EXYNOS5250_SOC_ID, |
100 | .idmask = EXYNOS5_SOC_MASK, | 98 | .idmask = EXYNOS5_SOC_MASK, |
101 | .map_io = exynos5_map_io, | 99 | .map_io = exynos5_map_io, |
102 | .init_clocks = exynos5_init_clocks, | ||
103 | .init = exynos_init, | 100 | .init = exynos_init, |
104 | .name = name_exynos5250, | 101 | .name = name_exynos5250, |
105 | }, { | 102 | }, { |
@@ -397,43 +394,26 @@ static void __init exynos5_map_io(void) | |||
397 | iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc)); | 394 | iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc)); |
398 | } | 395 | } |
399 | 396 | ||
400 | static void __init exynos4_init_clocks(int xtal) | ||
401 | { | ||
402 | printk(KERN_DEBUG "%s: initializing clocks\n", __func__); | ||
403 | |||
404 | s3c24xx_register_baseclocks(xtal); | ||
405 | s5p_register_clocks(xtal); | ||
406 | |||
407 | if (soc_is_exynos4210()) | ||
408 | exynos4210_register_clocks(); | ||
409 | else if (soc_is_exynos4212() || soc_is_exynos4412()) | ||
410 | exynos4212_register_clocks(); | ||
411 | |||
412 | exynos4_register_clocks(); | ||
413 | exynos4_setup_clocks(); | ||
414 | } | ||
415 | |||
416 | static void __init exynos5440_map_io(void) | 397 | static void __init exynos5440_map_io(void) |
417 | { | 398 | { |
418 | iotable_init(exynos5440_iodesc0, ARRAY_SIZE(exynos5440_iodesc0)); | 399 | iotable_init(exynos5440_iodesc0, ARRAY_SIZE(exynos5440_iodesc0)); |
419 | } | 400 | } |
420 | 401 | ||
421 | static void __init exynos5_init_clocks(int xtal) | 402 | void __init exynos_init_time(void) |
422 | { | 403 | { |
423 | printk(KERN_DEBUG "%s: initializing clocks\n", __func__); | 404 | if (of_have_populated_dt()) { |
424 | 405 | #ifdef CONFIG_OF | |
425 | /* EXYNOS5440 can support only common clock framework */ | 406 | of_clk_init(NULL); |
426 | 407 | clocksource_of_init(); | |
427 | if (soc_is_exynos5440()) | 408 | #endif |
428 | return; | 409 | } else { |
429 | 410 | /* todo: remove after migrating legacy E4 platforms to dt */ | |
430 | #ifdef CONFIG_SOC_EXYNOS5250 | 411 | #ifdef CONFIG_ARCH_EXYNOS4 |
431 | s3c24xx_register_baseclocks(xtal); | 412 | exynos4_clk_init(NULL); |
432 | s5p_register_clocks(xtal); | 413 | exynos4_clk_register_fixed_ext(xxti_f, xusbxti_f); |
433 | |||
434 | exynos5_register_clocks(); | ||
435 | exynos5_setup_clocks(); | ||
436 | #endif | 414 | #endif |
415 | mct_init(); | ||
416 | } | ||
437 | } | 417 | } |
438 | 418 | ||
439 | void __init exynos4_init_irq(void) | 419 | void __init exynos4_init_irq(void) |