From: Felipe Balbi <felipe.balbi@nokia.com>
To: ext Sanjeev Premi <premi@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH 1/2] AM35xx: Runtime detection of the device
Date: Tue, 27 Oct 2009 18:11:15 +0200 [thread overview]
Message-ID: <20091027161115.GA16494@nokia.com> (raw)
In-Reply-To: <1256652150-5710-1-git-send-email-premi@ti.com>
Hi,
On Tue, Oct 27, 2009 at 03:02:30PM +0100, ext Sanjeev Premi wrote:
> Add support to detect AM3505/AM3517 devices at runtime.
> Also updates the CPU names printed during boot.
>
> Signed-off-by: Sanjeev Premi <premi@ti.com>
> ---
> arch/arm/mach-omap2/id.c | 43 ++++++++++++++++++++++++++++----
> arch/arm/plat-omap/include/plat/cpu.h | 12 +++++++++
> 2 files changed, 49 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index 1c15112..87efb73 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -242,6 +242,21 @@ void __init omap3_check_revision(void)
> omap_revision = OMAP3630_REV_ES1_0;
> }
> break;
> + case 0xb868:
> + /* Handle OMAP35xx/AM35xx devices
> + *
> + * Set the device to be OMAP3517 here. Actual device
> + * is identified later based on the features.
> + */
> + switch (rev) {
> + case 0:
> + omap_revision = OMAP3505_REV(rev);
> + break;
> + default:
> + /* Use the latest known revision as default */
> + omap_revision = OMAP3505_REV(rev);
if both are the same, what's the point of having this switch ?
> + }
> + break;
> default:
> /* Unknown default to latest silicon rev as default*/
> omap_revision = OMAP3630_REV_ES1_0;
> @@ -267,20 +282,36 @@ void __init omap3_cpuinfo(void)
> * and CPU class bits.
> */
> if (cpu_is_omap3630())
> - strcpy(cpu_name, "3630");
> + strcpy(cpu_name, "OMAP3630");
> + else if (omap_rev() && OMAP35XX_CLASS) {
> + /*
> + * AM3517, AM3505 devices
> + */
> + if (omap3_has_sgx()) {
> + omap_revision = OMAP3517_REV(rev);
> + strcpy(cpu_name, "AM3517");
> + }
> + else {
according to CodingStyle this should be:
} else {
--
balbi
next prev parent reply other threads:[~2009-10-27 16:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-27 14:02 [PATCH 1/2] AM35xx: Runtime detection of the device Sanjeev Premi
2009-10-27 16:11 ` Felipe Balbi [this message]
2009-10-27 18:08 ` Premi, Sanjeev
2009-10-27 21:08 ` Felipe Balbi
2009-10-28 12:40 ` Premi, Sanjeev
2009-10-28 13:42 ` Premi, Sanjeev
2009-10-28 16:59 ` Felipe Balbi
2009-10-28 18:42 ` Premi, Sanjeev
2009-10-28 20:17 ` Felipe Balbi
2009-11-10 10:20 ` Felipe Balbi
2009-11-11 2:49 ` Tony Lindgren
2009-11-12 9:21 ` [PATCH] arm: omap: code cleanup to id.c Felipe Balbi
2009-10-27 18:03 ` [PATCH 1/2] AM35xx: Runtime detection of the device Premi, Sanjeev
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=20091027161115.GA16494@nokia.com \
--to=felipe.balbi@nokia.com \
--cc=linux-omap@vger.kernel.org \
--cc=premi@ti.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