mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Dinh.Nguyen@freescale.com
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, s.hauer@pengutronix.de,
	u.kleine-koenig@pengutronix.de, valentin.longchamp@epfl.ch,
	daniel@caiaq.de, grant.likely@secretlab.ca,
	amit.kucheria@canonical.com, xiao-lizhang@freescale.com
Subject: Re: [PATCH 2/2] ARM: imx: Add mx53 support to common msl functions.
Date: Tue, 2 Nov 2010 22:21:11 +0000	[thread overview]
Message-ID: <20101102222111.GA5169@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1288736227-800-2-git-send-email-Dinh.Nguyen@freescale.com>

On Tue, Nov 02, 2010 at 05:17:07PM -0500, Dinh.Nguyen@freescale.com wrote:
>  static void query_silicon_parameter(void)
>  {
> -	void __iomem *rom = ioremap(MX51_IROM_BASE_ADDR, MX51_IROM_SIZE);
> +	void __iomem *rom;
>  	u32 rev;
>  
> +	if (cpu_is_mx51())
> +		rom = ioremap(MX51_IROM_BASE_ADDR, MX51_IROM_SIZE);
> +	else if (cpu_is_mx53())
> +		rom = ioremap(MX53_IROM_BASE_ADDR, MX53_IROM_SIZE);

	else
		rom is uninitialized;

I'd also suggest that the above set two variables - base and size, rather
than repeating the ioremap.  If you look at the generated code, I suspect
you'll find that the above generates two ioremap calls, whereas using
variables for base and size, and having a common ioremap will reduce the
code size.

  reply	other threads:[~2010-11-02 22:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-02 22:17 [PATCH 1/2] ARM: imx: Add core definitions for MX53 Dinh.Nguyen
2010-11-02 22:17 ` [PATCH 2/2] ARM: imx: Add mx53 support to common msl functions Dinh.Nguyen
2010-11-02 22:21   ` Russell King - ARM Linux [this message]
2010-11-03  9:15   ` Eric Bénard
2010-11-04 19:21     ` Nguyen Dinh-R00091
2010-11-04 20:30       ` Eric Bénard
2010-11-04 21:24         ` Nguyen Dinh-R00091
2010-11-04 21:30         ` Nguyen Dinh-R00091

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=20101102222111.GA5169@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=Dinh.Nguyen@freescale.com \
    --cc=amit.kucheria@canonical.com \
    --cc=daniel@caiaq.de \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=valentin.longchamp@epfl.ch \
    --cc=xiao-lizhang@freescale.com \
    /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