summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos/mct.c
diff options
context:
space:
mode:
authorThomas Abraham2013-03-09 08:10:03 +0100
committerKukjin Kim2013-03-09 08:18:08 +0100
commit9fbf0c85a1c0f1c927822c3026c8db9539570267 (patch)
tree2db215a9aa14f5d38e51985bf925008f7a8ce427 /arch/arm/mach-exynos/mct.c
parentARM: EXYNOS: add device tree support for MCT controller driver (diff)
downloadkernel-qcow2-linux-9fbf0c85a1c0f1c927822c3026c8db9539570267.tar.gz
kernel-qcow2-linux-9fbf0c85a1c0f1c927822c3026c8db9539570267.tar.xz
kernel-qcow2-linux-9fbf0c85a1c0f1c927822c3026c8db9539570267.zip
ARM: EXYNOS: allow dt based discovery of mct controller using clocksource_of_init
Add entries to __clksrc_of_table so that Exynos MCT controller is discoverable using call to clocksource_of_init. With this change, it would be appropriate to rename the function 'exynos4_timer_init' as 'mct_init' since it aptly describes this function. Additionally, the 'init_time' callback of all machine descriptors for exynos platforms that were previously set to 'exynos4_timer_init' are now set to either 'mct_init' or 'clocksource_of_init'. Cc: Changhwan Youn <chaos.youn@samsung.com> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos/mct.c')
-rw-r--r--arch/arm/mach-exynos/mct.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/arm/mach-exynos/mct.c b/arch/arm/mach-exynos/mct.c
index f34c933314f3..545c98976e93 100644
--- a/arch/arm/mach-exynos/mct.c
+++ b/arch/arm/mach-exynos/mct.c
@@ -22,6 +22,7 @@
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/of_address.h>
+#include <linux/clocksource.h>
#include <asm/arch_timer.h>
#include <asm/localtimer.h>
@@ -507,17 +508,12 @@ static const struct of_device_id exynos_mct_ids[] = {
{ .compatible = "samsung,exynos4412-mct", .data = (void *)MCT_INT_PPI },
};
-void __init exynos4_timer_init(void)
+void __init mct_init(void)
{
struct device_node *np = NULL;
const struct of_device_id *match;
u32 nr_irqs, i;
- if (soc_is_exynos5440()) {
- arch_timer_of_register();
- return;
- }
-
#ifdef CONFIG_OF
np = of_find_matching_node_and_match(NULL, exynos_mct_ids, &match);
#endif
@@ -550,3 +546,5 @@ void __init exynos4_timer_init(void)
exynos4_clocksource_init();
exynos4_clockevent_init();
}
+CLOCKSOURCE_OF_DECLARE(exynos4210, "samsung,exynos4210-mct", mct_init)
+CLOCKSOURCE_OF_DECLARE(exynos4412, "samsung,exynos4412-mct", mct_init)