From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/6] arm: mx5: always use __mxc_cpu_type to check cpu type
Date: Thu, 9 Dec 2010 08:10:26 +0100 [thread overview]
Message-ID: <20101209071026.GI17441@pengutronix.de> (raw)
In-Reply-To: <1291903716-31388-4-git-send-email-richard.zhao@freescale.com>
On Thu, Dec 09, 2010 at 10:08:34PM +0800, Richard Zhao wrote:
> Every SoC in mach-mx5 calls mxc_set_cpu_type to set cpu type.
I don't like that. Your change makes the usage of cpu_is_mx51() for
single-machine builds more expensive.
>
> Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
> ---
> arch/arm/plat-mxc/include/mach/mxc.h | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h
> index 4abbdd1..04afa33 100644
> --- a/arch/arm/plat-mxc/include/mach/mxc.h
> +++ b/arch/arm/plat-mxc/include/mach/mxc.h
> @@ -129,10 +129,8 @@ extern unsigned int __mxc_cpu_type;
> #ifdef CONFIG_ARCH_MX5
> # ifdef mxc_cpu_type
> # undef mxc_cpu_type
> -# define mxc_cpu_type __mxc_cpu_type
> -# else
> -# define mxc_cpu_type MXC_CPU_MX51
> # endif
> +# define mxc_cpu_type __mxc_cpu_type
> # define cpu_is_mx51() (mxc_cpu_type == MXC_CPU_MX51)
> # define cpu_is_mx53() (mxc_cpu_type == MXC_CPU_MX53)
> #else
Here is a bug. cpu_is_mx53 will never be true for a mx5-only build.
(That is currently always true for images supporting mx5.)
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2010-12-09 7:10 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-09 14:08 [PATCH 1/6] ARM: mx5: use config to define boot related addresses Richard Zhao
2010-12-09 7:04 ` Uwe Kleine-König
2010-12-09 7:28 ` Richard Zhao
2010-12-09 8:44 ` Russell King - ARM Linux
2010-12-09 8:52 ` Uwe Kleine-König
2010-12-09 9:00 ` Russell King - ARM Linux
2010-12-10 5:21 ` Richard Zhao
2010-12-10 8:00 ` Uwe Kleine-König
2010-12-09 14:08 ` [PATCH 2/6] arm: plat-mxc: add full parameter macro to define gpio port Richard Zhao
2010-12-09 7:12 ` Uwe Kleine-König
2010-12-09 14:08 ` [PATCH 3/6] arm: mx51: define mx51's own MXC_GPIO_IRQS Richard Zhao
2010-12-09 14:08 ` [PATCH 4/6] arm: mx5: always use __mxc_cpu_type to check cpu type Richard Zhao
2010-12-09 7:10 ` Uwe Kleine-König [this message]
2010-12-09 7:52 ` Richard Zhao
2010-12-09 8:31 ` Uwe Kleine-König
2010-12-09 14:08 ` [PATCH 5/6] arm: mx50: add core functions support Richard Zhao
2010-12-09 8:25 ` Uwe Kleine-König
2010-12-10 7:08 ` Richard Zhao
2010-12-10 8:42 ` Uwe Kleine-König
2010-12-10 9:30 ` Richard Zhao
2010-12-10 10:56 ` Uwe Kleine-König
2010-12-10 12:51 ` Richard Zhao
2010-12-09 9:02 ` Sascha Hauer
2010-12-10 8:03 ` Richard Zhao
2010-12-09 14:08 ` [PATCH 6/6] arm: mx50: add mx50 reference design board support Richard Zhao
2010-12-09 8:29 ` Uwe Kleine-König
2010-12-09 8:51 ` Richard Zhao
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=20101209071026.GI17441@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).