]> git.karo-electronics.de Git - linux-beck.git/commitdiff
timer: vt8500: Convert vt8500 to use CLKSRC_OF
authorTony Prisk <linux@prisktech.co.nz>
Tue, 15 Jan 2013 06:50:49 +0000 (19:50 +1300)
committerOlof Johansson <olof@lixom.net>
Tue, 15 Jan 2013 18:56:24 +0000 (10:56 -0800)
This patch converts arch-vt8500 to make use of CLKSRC_OF. Doing so
removes the need for include/linux/vt8500_timer.h as vt8500_timer_init
no longer needs to be visible outside vt8500_timer.c

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
arch/arm/mach-vt8500/Kconfig
arch/arm/mach-vt8500/vt8500.c
drivers/clocksource/vt8500_timer.c
include/linux/vt8500_timer.h [deleted file]

index 570a801fb8628cdf873cd73067c8d424477997ee..d1cbda66dc9c9868179ee61f2ade76416ad68617 100644 (file)
@@ -4,6 +4,7 @@ config ARCH_VT8500
        select ARCH_HAS_CPUFREQ
        select ARCH_REQUIRE_GPIOLIB
        select CLKDEV_LOOKUP
+       select CLKSRC_OF
        select CPU_ARM926T
        select GENERIC_CLOCKEVENTS
        select GENERIC_GPIO
index b9fd9d3cbfb3a321e4d10507c012033921655853..fe99b709f11f737567aa41891acc536d857f7ac4 100644 (file)
@@ -18,9 +18,9 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include <linux/clocksource.h>
 #include <linux/io.h>
 #include <linux/pm.h>
-#include <linux/vt8500_timer.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -186,8 +186,8 @@ DT_MACHINE_START(WMT_DT, "VIA/Wondermedia SoC (Device Tree Support)")
        .dt_compat      = vt8500_dt_compat,
        .map_io         = vt8500_map_io,
        .init_irq       = vt8500_init_irq,
-       .init_time      = vt8500_timer_init,
        .init_machine   = vt8500_init,
+       .init_time      = clocksource_of_init,
        .restart        = vt8500_restart,
        .handle_irq     = vt8500_handle_irq,
 MACHINE_END
index 3dd21a47881ff2c83ed384e36faa77213ad834f7..b75b8e31dab4749c227901d2f26752cf68c6f82f 100644 (file)
@@ -134,7 +134,7 @@ static struct of_device_id vt8500_timer_ids[] = {
        { }
 };
 
-void __init vt8500_timer_init(void)
+static void __init vt8500_timer_init(void)
 {
        struct device_node *np;
        int timer_irq;
@@ -182,3 +182,4 @@ void __init vt8500_timer_init(void)
        clockevents_register_device(&clockevent);
 }
 
+CLOCKSOURCE_OF_DECLARE(vt8500, "via,vt8500-timer", vt8500_timer_init)
diff --git a/include/linux/vt8500_timer.h b/include/linux/vt8500_timer.h
deleted file mode 100644 (file)
index 33b0ee8..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2012 Tony Prisk <linux@prisktech.co.nz>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#ifndef __VT8500_TIMER_H
-#define __VT8500_TIMER_H
-
-#include <asm/mach/time.h>
-
-void vt8500_timer_init(void);
-
-#endif