diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2015-05-15 05:41:39 +0200 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2015-06-03 08:52:26 +0200 |
commit | 0931aff7226abb7e1dab018488e363294385fa66 (patch) | |
tree | 608a40c038ae0d8934b7f931e0af221247cda44e /arch/arm/mach-imx | |
parent | ARM: imx: move timer resources into a structure (diff) | |
download | linux-0931aff7226abb7e1dab018488e363294385fa66.tar.xz linux-0931aff7226abb7e1dab018488e363294385fa66.zip |
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 <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/time.c | 6 |
1 files changed, 5 insertions, 1 deletions
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 <linux/of.h> #include <linux/of_address.h> #include <linux/of_irq.h> +#include <soc/imx/timer.h> #include <asm/mach/time.h> @@ -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); } |