From: Nishanth Menon <nm@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"G, Manjunath Kondaiah" <manjugk@ti.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"Gadiyar, Anand" <gadiyar@ti.com>
Subject: Re: [PATCH 2/3] OMAP3630: Add ES1.1 and ES1.2 detection
Date: Wed, 4 Aug 2010 14:02:04 -0500 [thread overview]
Message-ID: <4C59B92C.5060300@ti.com> (raw)
In-Reply-To: <20100804113307.25027.8630.stgit@baageli.muru.com>
Tony Lindgren had written, on 08/04/2010 06:33 AM, the following:
> From: Anand Gadiyar <gadiyar@ti.com>
>
> Add revision detection for ES1.1 and ES1.2. Set default
> revision as ES1.2.
>
> Add CHIP_GE_OMAP3630ES1_1 to detect revisions 1.1 and later.
> This is needed for at least one feature that is broken in
> 3630ES1.0 but exists on older (3430 ES3.1) and newer revisions.
>
> Additionally, update some of the CHIP_GE_* macros to use other
> macros for ease of maintenance.
>
> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Manjunatha GK <manjugk@ti.com>
> [tony@atomide.com: update to remove fallthrough handling]
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
> arch/arm/mach-omap2/id.c | 28 +++++++++++++++++++++++++---
> arch/arm/plat-omap/include/plat/cpu.h | 15 +++++++++++----
> 2 files changed, 36 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index fd1904b..e8256a2 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -269,11 +269,27 @@ static void __init omap3_check_revision(void)
> omap_chip.oc |= CHIP_IS_OMAP3430ES3_1;
> break;
> case 0xb891:
> - /* FALLTHROUGH */
> + /* Handle 36xx devices */
> + omap_chip.oc |= CHIP_IS_OMAP3630ES1;
> +
> + switch(rev) {
> + case 0: /* Take care of early samples */
> + omap_revision = OMAP3630_REV_ES1_0;
> + break;
> + case 1:
> + omap_revision = OMAP3630_REV_ES1_1;
> + omap_chip.oc |= CHIP_IS_OMAP3630ES1_1;
> + break;
> + case 2:
> + default:
> + omap_revision = OMAP3630_REV_ES1_2;
> + omap_chip.oc |= CHIP_IS_OMAP3630ES1_2;
> + break;
> + }
we need to add a break here. to jump out of the main switch statement.
currently with ES1.0 3630, it reports as 3630 ES1.2
Tested and verified on SDP3630 with OMAP3630 ES1.0
> default:
> /* Unknown default to latest silicon rev as default*/
> - omap_revision = OMAP3630_REV_ES1_0;
> - omap_chip.oc |= CHIP_IS_OMAP3630ES1;
> + omap_revision = OMAP3630_REV_ES1_2;
> + omap_chip.oc |= CHIP_IS_OMAP3630ES1_2;
> }
> }
>
> @@ -349,6 +365,12 @@ static void __init omap3_cpuinfo(void)
> case OMAP_REVBITS_00:
> strcpy(cpu_rev, "1.0");
> break;
> + case OMAP_REVBITS_01:
> + strcpy(cpu_rev, "1.1");
> + break;
> + case OMAP_REVBITS_02:
> + strcpy(cpu_rev, "1.2");
> + break;
> case OMAP_REVBITS_10:
> strcpy(cpu_rev, "2.0");
> break;
> diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
> index aa2f4f0..2e2ae53 100644
> --- a/arch/arm/plat-omap/include/plat/cpu.h
> +++ b/arch/arm/plat-omap/include/plat/cpu.h
> @@ -66,6 +66,8 @@ unsigned int omap_rev(void);
> * family. This difference can be handled separately.
> */
> #define OMAP_REVBITS_00 0x00
> +#define OMAP_REVBITS_01 0x01
> +#define OMAP_REVBITS_02 0x02
> #define OMAP_REVBITS_10 0x10
> #define OMAP_REVBITS_20 0x20
> #define OMAP_REVBITS_30 0x30
> @@ -376,6 +378,8 @@ IS_OMAP_TYPE(3517, 0x3517)
> #define OMAP3430_REV_ES3_1_2 0x34305034
>
> #define OMAP3630_REV_ES1_0 0x36300034
> +#define OMAP3630_REV_ES1_1 0x36300134
> +#define OMAP3630_REV_ES1_2 0x36300234
>
> #define OMAP35XX_CLASS 0x35000034
> #define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 8))
> @@ -411,6 +415,8 @@ IS_OMAP_TYPE(3517, 0x3517)
> #define CHIP_IS_OMAP3430ES3_1 (1 << 6)
> #define CHIP_IS_OMAP3630ES1 (1 << 7)
> #define CHIP_IS_OMAP4430ES1 (1 << 8)
> +#define CHIP_IS_OMAP3630ES1_1 (1 << 9)
> +#define CHIP_IS_OMAP3630ES1_2 (1 << 10)
>
> #define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
>
> @@ -424,11 +430,12 @@ IS_OMAP_TYPE(3517, 0x3517)
> */
> #define CHIP_GE_OMAP3430ES2 (CHIP_IS_OMAP3430ES2 | \
> CHIP_IS_OMAP3430ES3_0 | \
> - CHIP_IS_OMAP3430ES3_1 | \
> - CHIP_IS_OMAP3630ES1)
> + CHIP_GE_OMAP3430ES3_1)
> #define CHIP_GE_OMAP3430ES3_1 (CHIP_IS_OMAP3430ES3_1 | \
> - CHIP_IS_OMAP3630ES1)
> -
> + CHIP_IS_OMAP3630ES1 | \
> + CHIP_GE_OMAP3630ES1_1)
> +#define CHIP_GE_OMAP3630ES1_1 (CHIP_IS_OMAP3630ES1_1 | \
> + CHIP_IS_OMAP3630ES1_2)
>
> int omap_chip_is(struct omap_chip_id oci);
> void omap2_check_revision(void);
>
--
Regards,
Nishanth Menon
WARNING: multiple messages have this Message-ID (diff)
From: nm@ti.com (Nishanth Menon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] OMAP3630: Add ES1.1 and ES1.2 detection
Date: Wed, 4 Aug 2010 14:02:04 -0500 [thread overview]
Message-ID: <4C59B92C.5060300@ti.com> (raw)
In-Reply-To: <20100804113307.25027.8630.stgit@baageli.muru.com>
Tony Lindgren had written, on 08/04/2010 06:33 AM, the following:
> From: Anand Gadiyar <gadiyar@ti.com>
>
> Add revision detection for ES1.1 and ES1.2. Set default
> revision as ES1.2.
>
> Add CHIP_GE_OMAP3630ES1_1 to detect revisions 1.1 and later.
> This is needed for at least one feature that is broken in
> 3630ES1.0 but exists on older (3430 ES3.1) and newer revisions.
>
> Additionally, update some of the CHIP_GE_* macros to use other
> macros for ease of maintenance.
>
> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Manjunatha GK <manjugk@ti.com>
> [tony at atomide.com: update to remove fallthrough handling]
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
> arch/arm/mach-omap2/id.c | 28 +++++++++++++++++++++++++---
> arch/arm/plat-omap/include/plat/cpu.h | 15 +++++++++++----
> 2 files changed, 36 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index fd1904b..e8256a2 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -269,11 +269,27 @@ static void __init omap3_check_revision(void)
> omap_chip.oc |= CHIP_IS_OMAP3430ES3_1;
> break;
> case 0xb891:
> - /* FALLTHROUGH */
> + /* Handle 36xx devices */
> + omap_chip.oc |= CHIP_IS_OMAP3630ES1;
> +
> + switch(rev) {
> + case 0: /* Take care of early samples */
> + omap_revision = OMAP3630_REV_ES1_0;
> + break;
> + case 1:
> + omap_revision = OMAP3630_REV_ES1_1;
> + omap_chip.oc |= CHIP_IS_OMAP3630ES1_1;
> + break;
> + case 2:
> + default:
> + omap_revision = OMAP3630_REV_ES1_2;
> + omap_chip.oc |= CHIP_IS_OMAP3630ES1_2;
> + break;
> + }
we need to add a break here. to jump out of the main switch statement.
currently with ES1.0 3630, it reports as 3630 ES1.2
Tested and verified on SDP3630 with OMAP3630 ES1.0
> default:
> /* Unknown default to latest silicon rev as default*/
> - omap_revision = OMAP3630_REV_ES1_0;
> - omap_chip.oc |= CHIP_IS_OMAP3630ES1;
> + omap_revision = OMAP3630_REV_ES1_2;
> + omap_chip.oc |= CHIP_IS_OMAP3630ES1_2;
> }
> }
>
> @@ -349,6 +365,12 @@ static void __init omap3_cpuinfo(void)
> case OMAP_REVBITS_00:
> strcpy(cpu_rev, "1.0");
> break;
> + case OMAP_REVBITS_01:
> + strcpy(cpu_rev, "1.1");
> + break;
> + case OMAP_REVBITS_02:
> + strcpy(cpu_rev, "1.2");
> + break;
> case OMAP_REVBITS_10:
> strcpy(cpu_rev, "2.0");
> break;
> diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
> index aa2f4f0..2e2ae53 100644
> --- a/arch/arm/plat-omap/include/plat/cpu.h
> +++ b/arch/arm/plat-omap/include/plat/cpu.h
> @@ -66,6 +66,8 @@ unsigned int omap_rev(void);
> * family. This difference can be handled separately.
> */
> #define OMAP_REVBITS_00 0x00
> +#define OMAP_REVBITS_01 0x01
> +#define OMAP_REVBITS_02 0x02
> #define OMAP_REVBITS_10 0x10
> #define OMAP_REVBITS_20 0x20
> #define OMAP_REVBITS_30 0x30
> @@ -376,6 +378,8 @@ IS_OMAP_TYPE(3517, 0x3517)
> #define OMAP3430_REV_ES3_1_2 0x34305034
>
> #define OMAP3630_REV_ES1_0 0x36300034
> +#define OMAP3630_REV_ES1_1 0x36300134
> +#define OMAP3630_REV_ES1_2 0x36300234
>
> #define OMAP35XX_CLASS 0x35000034
> #define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 8))
> @@ -411,6 +415,8 @@ IS_OMAP_TYPE(3517, 0x3517)
> #define CHIP_IS_OMAP3430ES3_1 (1 << 6)
> #define CHIP_IS_OMAP3630ES1 (1 << 7)
> #define CHIP_IS_OMAP4430ES1 (1 << 8)
> +#define CHIP_IS_OMAP3630ES1_1 (1 << 9)
> +#define CHIP_IS_OMAP3630ES1_2 (1 << 10)
>
> #define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
>
> @@ -424,11 +430,12 @@ IS_OMAP_TYPE(3517, 0x3517)
> */
> #define CHIP_GE_OMAP3430ES2 (CHIP_IS_OMAP3430ES2 | \
> CHIP_IS_OMAP3430ES3_0 | \
> - CHIP_IS_OMAP3430ES3_1 | \
> - CHIP_IS_OMAP3630ES1)
> + CHIP_GE_OMAP3430ES3_1)
> #define CHIP_GE_OMAP3430ES3_1 (CHIP_IS_OMAP3430ES3_1 | \
> - CHIP_IS_OMAP3630ES1)
> -
> + CHIP_IS_OMAP3630ES1 | \
> + CHIP_GE_OMAP3630ES1_1)
> +#define CHIP_GE_OMAP3630ES1_1 (CHIP_IS_OMAP3630ES1_1 | \
> + CHIP_IS_OMAP3630ES1_2)
>
> int omap_chip_is(struct omap_chip_id oci);
> void omap2_check_revision(void);
>
--
Regards,
Nishanth Menon
next prev parent reply other threads:[~2010-08-04 19:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-04 11:32 [PATCH 0/3] Few more omap patches for the 2.6.36 merge window Tony Lindgren
2010-08-04 11:32 ` Tony Lindgren
2010-08-04 11:32 ` [PATCH 1/3] omap: device: improve errors handling Tony Lindgren
2010-08-04 11:32 ` Tony Lindgren
2010-08-04 11:33 ` [PATCH 2/3] OMAP3630: Add ES1.1 and ES1.2 detection Tony Lindgren
2010-08-04 11:33 ` Tony Lindgren
2010-08-04 19:02 ` Nishanth Menon [this message]
2010-08-04 19:02 ` Nishanth Menon
2010-08-05 9:36 ` Tony Lindgren
2010-08-05 9:36 ` Tony Lindgren
2010-08-04 11:33 ` [PATCH 3/3] omap: 3630: disable TLL SAR on 3630 ES1 Tony Lindgren
2010-08-04 11:33 ` Tony Lindgren
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=4C59B92C.5060300@ti.com \
--to=nm@ti.com \
--cc=gadiyar@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=manjugk@ti.com \
--cc=tony@atomide.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.