From 0931aff7226abb7e1dab018488e363294385fa66 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Fri, 15 May 2015 11:41:39 +0800 Subject: ARM: imx: define an enum for gpt timer device type Define an enum for gpt timer device type in include/soc/imx/timer.h to tell the gpt block differences among SoCs. Update non-DT users (clock drivers) to pass the device type. As we now have include/soc/imx/timer.h, the declaration of mxc_timer_init() is moved into there as the best fit. Signed-off-by: Shawn Guo --- arch/arm/mach-imx/time.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c index 7c131e1b2637..307cbc7abc8e 100644 --- a/arch/arm/mach-imx/time.c +++ b/arch/arm/mach-imx/time.c @@ -32,6 +32,7 @@ #include #include #include +#include #include @@ -86,6 +87,7 @@ static struct clock_event_device clockevent_mxc; static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED; struct imx_timer { + enum imx_gpt_type type; void __iomem *base; int irq; struct clk *clk_per; @@ -356,7 +358,7 @@ static void __init _mxc_timer_init(struct imx_timer *imxtm) setup_irq(imxtm->irq, &mxc_timer_irq); } -void __init mxc_timer_init(unsigned long pbase, int irq) +void __init mxc_timer_init(unsigned long pbase, int irq, enum imx_gpt_type type) { struct imx_timer *imxtm; @@ -369,6 +371,8 @@ void __init mxc_timer_init(unsigned long pbase, int irq) imxtm->base = ioremap(pbase, SZ_4K); BUG_ON(!imxtm->base); + imxtm->type = type; + _mxc_timer_init(imxtm); } -- cgit v1.2.3