mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Amit Kucheria <amit.kucheria@canonical.com>
Cc: List Linux Kernel <linux-kernel@vger.kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org, linux@arm.linux.org.uk,
	valentin.longchamp@epfl.ch, daniel@caiaq.de,
	Dinh.Nguyen@freescale.com, r.herring@freescale.com,
	bryan.wu@canonical.com
Subject: Re: [PATCHv2 02/11] mxc timer: refactor timer code to use timer  versions
Date: Wed, 3 Feb 2010 09:23:18 -0700	[thread overview]
Message-ID: <fa686aa41002030823r7ebf0ee5l156ffafb57a8d5d2@mail.gmail.com> (raw)
In-Reply-To: <9fa7a3c70c46a1f776c6520051481cff6525ef02.1265173480.git.amit.kucheria@canonical.com>

On Tue, Feb 2, 2010 at 10:16 PM, Amit Kucheria
<amit.kucheria@canonical.com> wrote:
> From: Sascha Hauer <s.hauer@pengutronix.de>
>
> Refactor the timer code into version 1 and version 2.
>
> Essentially there are 2 versions of the timer hardware. Version 1 is found on
> MX1/MXL and MX21. Version 2 is found on MX25, MX27, MX31, MX35, MX37, MX51,
> and future parts.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> Acked-by: Amit Kucheria <amit.kucheria@canonical.com>
> Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com>
> ---
>  arch/arm/plat-mxc/time.c |   19 +++++++++++--------
>  1 files changed, 11 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c
> index 844567e..7d6499e 100644
> --- a/arch/arm/plat-mxc/time.c
> +++ b/arch/arm/plat-mxc/time.c
> @@ -57,6 +57,9 @@
>  #define MX3_TCN                        0x24
>  #define MX3_TCMP               0x10
>
> +#define timer_is_v1()  (cpu_is_mx1() || cpu_is_mx27())
> +#define timer_is_v2()  (cpu_is_mx3() || cpu_is_mx25())

Just from a defensive programming standpoint, it may be better to
define timer_is_v2() as (!timer_is_v1()).  I assume future parts are
more likely to be v2, and doing it that way means one less place in
the code to modify when new parts appear.

Otherwise,
Acked-by: Grant Likely <grant.likely@secretlab.ca>

  reply	other threads:[~2010-02-03 16:23 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-03  5:16 [PATCHv2 00/11] Base support for Freescale i.MX51 SoC platform Amit Kucheria
     [not found] ` <cover.1265173480.git.amit.kucheria@canonical.com>
2010-02-03  5:16   ` [PATCHv2 01/11] arm: mxc: TrustZone interrupt controller (TZIC) for i.MX5 family Amit Kucheria
2010-02-03  6:23     ` Eric Miao
2010-02-03  9:45       ` Sascha Hauer
2010-02-03 13:24       ` Amit Kucheria
2010-02-03 15:09         ` Eric Miao
2010-02-04  0:54           ` Eric Miao
2010-02-04 17:09         ` Nguyen Dinh-R00091
2010-02-03  5:16   ` [PATCHv2 02/11] mxc timer: refactor timer code to use timer versions Amit Kucheria
2010-02-03 16:23     ` Grant Likely [this message]
2010-02-03  5:16   ` [PATCHv2 03/11] mxc: Fix Drive Strength Field in the IOMUX controller Amit Kucheria
2010-02-03  6:29     ` Eric Miao
2010-02-03  9:40       ` Sascha Hauer
2010-02-03 16:27     ` Grant Likely
2010-02-04  0:25       ` Amit Kucheria
2010-02-03  5:16   ` [PATCHv2 04/11] mxc: changes to common plat-mxc code to add support for i.MX5 Amit Kucheria
2010-02-03  6:43     ` Eric Miao
2010-02-03  9:49       ` Sascha Hauer
2010-02-03 13:38         ` Amit Kucheria
2010-02-03 15:16           ` Eric Miao
2010-02-03 16:35     ` Grant Likely
2010-02-03  5:16   ` [PATCHv2 05/11] mxc: Core support for i.MX5 series of processors from Freescale Amit Kucheria
2010-02-03  7:03     ` Eric Miao
2010-02-03 14:20       ` Amit Kucheria
2010-02-03  9:24     ` Russell King - ARM Linux
2010-02-03 11:04     ` Sascha Hauer
2010-02-03 20:07       ` Amit Kucheria
2010-02-03 16:08     ` Rabin Vincent
2010-02-03  5:16   ` [PATCHv2 06/11] mxc: enable support for Freescale i.MX5 series of processors Amit Kucheria
2010-02-03  5:16   ` [PATCHv2 07/11] mxc: Add support for the Babbage board Amit Kucheria
2010-02-03 11:10     ` Sascha Hauer
2010-02-03  5:16   ` [PATCHv2 08/11] fec: fix uninitialized rx buffer usage Amit Kucheria
2010-02-03 16:46     ` Grant Likely
2010-02-03 18:33       ` Amit Kucheria
2010-02-03 18:38         ` Grant Likely
2010-02-03 20:23           ` Grant Likely
2010-02-03  5:16   ` [PATCHv2 09/11] fec: Add LAN8700 phy support Amit Kucheria
2010-02-03  5:16   ` [PATCHv2 10/11] fec: Add ARCH_MX5 as a dependency Amit Kucheria
2010-02-03  5:16   ` [PATCHv2 11/11] mxc: Add imx51_defconfig Amit Kucheria
2010-02-05  6:48     ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fa686aa41002030823r7ebf0ee5l156ffafb57a8d5d2@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=Dinh.Nguyen@freescale.com \
    --cc=amit.kucheria@canonical.com \
    --cc=bryan.wu@canonical.com \
    --cc=daniel@caiaq.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=r.herring@freescale.com \
    --cc=s.hauer@pengutronix.de \
    --cc=valentin.longchamp@epfl.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome