]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: msm: Migrate msm_timer to CLOCKSOURCE_OF_DECLARE
authorStephen Boyd <sboyd@codeaurora.org>
Wed, 24 Jul 2013 20:54:30 +0000 (13:54 -0700)
committerDavid Brown <davidb@codeaurora.org>
Tue, 6 Aug 2013 18:18:02 +0000 (11:18 -0700)
This allows us to remove the init_time callback in the DT machine
descriptors, shrinking the code.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
arch/arm/Kconfig
arch/arm/mach-msm/board-dt-8660.c
arch/arm/mach-msm/board-dt-8960.c
arch/arm/mach-msm/common.h
arch/arm/mach-msm/timer.c

index ba412e02ec0c492abed190202cab324d976d0eec..36dfd06eaaa2fcbcf57114678dd5bbea9640b2bd 100644 (file)
@@ -630,6 +630,7 @@ config ARCH_MSM
        bool "Qualcomm MSM"
        select ARCH_REQUIRE_GPIOLIB
        select CLKDEV_LOOKUP
+       select CLKSRC_OF if OF
        select COMMON_CLK
        select GENERIC_CLOCKEVENTS
        help
index f1d9c827f24e059ef568ab7cbe34ec9cb264d9fd..95f9cae43ce861bc8fb62d7d1c81082534173d75 100644 (file)
@@ -45,6 +45,5 @@ DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
        .smp = smp_ops(msm_smp_ops),
        .init_machine = msm8x60_dt_init,
        .init_late = msm8x60_init_late,
-       .init_time      = msm_dt_timer_init,
        .dt_compat = msm8x60_fluid_match,
 MACHINE_END
index f930eaf8f54c9f2451d0799cb25b4935f83e9904..d4ca52c45111bb719d2a8a01ddb732e7265b60d7 100644 (file)
@@ -30,7 +30,6 @@ static const char * const msm8960_dt_match[] __initconst = {
 
 DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)")
        .smp = smp_ops(msm_smp_ops),
-       .init_time      = msm_dt_timer_init,
        .init_machine = msm_dt_init,
        .dt_compat = msm8960_dt_match,
 MACHINE_END
index 569bd1605c181c017d2859917eb18c2552f74b58..20ebf872793054be59209ab19b58617796ce19ee 100644 (file)
@@ -14,7 +14,6 @@
 
 extern void msm7x01_timer_init(void);
 extern void msm7x30_timer_init(void);
-extern void msm_dt_timer_init(void);
 extern void qsd8x50_timer_init(void);
 
 extern void msm_map_common_io(void);
index 8697cfc0d0b6a74538a59eaf92bd3266a10bab9f..57a9aecd4f418ecaaa2eca8314e7e0ea30bfb618 100644 (file)
@@ -219,15 +219,8 @@ err:
 }
 
 #ifdef CONFIG_OF
-static const struct of_device_id msm_timer_match[] __initconst = {
-       { .compatible = "qcom,kpss-timer" },
-       { .compatible = "qcom,scss-timer" },
-       { },
-};
-
-void __init msm_dt_timer_init(void)
+static void __init msm_dt_timer_init(struct device_node *np)
 {
-       struct device_node *np;
        u32 freq;
        int irq;
        struct resource res;
@@ -235,12 +228,6 @@ void __init msm_dt_timer_init(void)
        void __iomem *base;
        void __iomem *cpu0_base;
 
-       np = of_find_matching_node(NULL, msm_timer_match);
-       if (!np) {
-               pr_err("Can't find msm timer DT node\n");
-               return;
-       }
-
        base = of_iomap(np, 0);
        if (!base) {
                pr_err("Failed to map event base\n");
@@ -283,6 +270,8 @@ void __init msm_dt_timer_init(void)
 
        msm_timer_init(freq, 32, irq, !!percpu_offset);
 }
+CLOCKSOURCE_OF_DECLARE(kpss_timer, "qcom,kpss-timer", msm_dt_timer_init);
+CLOCKSOURCE_OF_DECLARE(scss_timer, "qcom,scss-timer", msm_dt_timer_init);
 #endif
 
 static int __init msm_timer_map(phys_addr_t addr, u32 event, u32 source,