From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Subject: Re: [PATCH v5 08/11] ARM: imx: add gpt system timer support for imx7d Date: Tue, 21 Apr 2015 15:25:01 -0500 Message-ID: References: <1429628007-8892-1-git-send-email-Frank.Li@freescale.com> <1429628007-8892-9-git-send-email-Frank.Li@freescale.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <1429628007-8892-9-git-send-email-Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org Cc: lznuaa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, Shawn Guo , Linus Walleij , Rob Herring , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , "linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Anson Huang List-Id: devicetree@vger.kernel.org On Tue, Apr 21, 2015 at 9:53 AM, wrote: > From: Frank Li > > Add GPT system timer support for i.MX7D, it has same hardware > as i.MX6DL. > > Signed-off-by: Frank Li > Signed-off-by: Anson Huang > --- > arch/arm/mach-imx/time.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c > index 15d18e1..7c1d8a3 100644 > --- a/arch/arm/mach-imx/time.c > +++ b/arch/arm/mach-imx/time.c > @@ -321,7 +321,7 @@ static void __init _mxc_timer_init(int irq, > tctl_val = V2_TCTL_FRR | V2_TCTL_WAITEN | MXC_TCTL_TEN; > if (clk_get_rate(clk_per) == V2_TIMER_RATE_OSC_DIV8) { > tctl_val |= V2_TCTL_CLK_OSC_DIV8; > - if (cpu_is_imx6dl() || cpu_is_imx6sx()) { > + if (cpu_is_imx6dl() || cpu_is_imx6sx() || cpu_is_imx7d()) { You should get this information from DT so you aren't changing this again on the next chip. > /* 24 / 8 = 3 MHz */ > __raw_writel(7 << V2_TPRER_PRE24M, > timer_base + MXC_TPRER); > @@ -383,3 +383,4 @@ CLOCKSOURCE_OF_DECLARE(mx53_timer, "fsl,imx53-gpt", mxc_timer_init_dt); > CLOCKSOURCE_OF_DECLARE(mx6q_timer, "fsl,imx6q-gpt", mxc_timer_init_dt); > CLOCKSOURCE_OF_DECLARE(mx6sl_timer, "fsl,imx6sl-gpt", mxc_timer_init_dt); > CLOCKSOURCE_OF_DECLARE(mx6sx_timer, "fsl,imx6sx-gpt", mxc_timer_init_dt); > +CLOCKSOURCE_OF_DECLARE(mx7d_timer, "fsl,imx7d-gpt", mxc_timer_init_dt); > -- > 1.9.1 > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html