diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-06-11 11:33:12 -0400 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2012-07-11 20:58:45 -0400 |
commit | a613163dff04cbfcb7d66b06ef4a5f65498ee59b (patch) | |
tree | 51841b8f22c1eeb71068e2a71bb92c152e68a543 /arch/arm/mach-integrator/core.c | |
parent | 91b87a4795c42b97b8d18c3757eff352458ecef4 (diff) |
ARM: integrator: convert to common clock
This converts the Integrator platform to use common clock
and the ICST driver. Since from this point not all ARM
reference platforms use the clock, we define
CONFIG_PLAT_VERSATILE_CLOCK and select it for all platforms
except the Integrator.
Open issue: I could not use the .init_early() field of the
machine descriptor to initialize the clocks, but had to
move them to .init_irq(), so presumably .init_early() is
so early that common clock is not up, and .init_machine()
is too late since it's needed for the clockevent/clocksource
initialization. Any suggestions on how to solve this is
very welcome.
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[mturquette@linaro.org: use 'select' instead of versatile Kconfig]
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'arch/arm/mach-integrator/core.c')
-rw-r--r-- | arch/arm/mach-integrator/core.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index 2a20bba246fb..ebf680bebdf2 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/amba/bus.h> | 21 | #include <linux/amba/bus.h> |
22 | #include <linux/amba/serial.h> | 22 | #include <linux/amba/serial.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/clkdev.h> | ||
25 | 24 | ||
26 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
27 | #include <mach/platform.h> | 26 | #include <mach/platform.h> |
@@ -61,50 +60,6 @@ static struct amba_device *amba_devs[] __initdata = { | |||
61 | &kmi1_device, | 60 | &kmi1_device, |
62 | }; | 61 | }; |
63 | 62 | ||
64 | /* | ||
65 | * These are fixed clocks. | ||
66 | */ | ||
67 | static struct clk clk24mhz = { | ||
68 | .rate = 24000000, | ||
69 | }; | ||
70 | |||
71 | static struct clk uartclk = { | ||
72 | .rate = 14745600, | ||
73 | }; | ||
74 | |||
75 | static struct clk dummy_apb_pclk; | ||
76 | |||
77 | static struct clk_lookup lookups[] = { | ||
78 | { /* Bus clock */ | ||
79 | .con_id = "apb_pclk", | ||
80 | .clk = &dummy_apb_pclk, | ||
81 | }, { | ||
82 | /* Integrator/AP timer frequency */ | ||
83 | .dev_id = "ap_timer", | ||
84 | .clk = &clk24mhz, | ||
85 | }, { /* UART0 */ | ||
86 | .dev_id = "uart0", | ||
87 | .clk = &uartclk, | ||
88 | }, { /* UART1 */ | ||
89 | .dev_id = "uart1", | ||
90 | .clk = &uartclk, | ||
91 | }, { /* KMI0 */ | ||
92 | .dev_id = "kmi0", | ||
93 | .clk = &clk24mhz, | ||
94 | }, { /* KMI1 */ | ||
95 | .dev_id = "kmi1", | ||
96 | .clk = &clk24mhz, | ||
97 | }, { /* MMCI - IntegratorCP */ | ||
98 | .dev_id = "mmci", | ||
99 | .clk = &uartclk, | ||
100 | } | ||
101 | }; | ||
102 | |||
103 | void __init integrator_init_early(void) | ||
104 | { | ||
105 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | ||
106 | } | ||
107 | |||
108 | static int __init integrator_init(void) | 63 | static int __init integrator_init(void) |
109 | { | 64 | { |
110 | int i; | 65 | int i; |