From: rogerq@ti•com (Roger Quadros)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 01/13] ARM: OMAP5: id: Add cpu id for ES versions
Date: Thu, 10 May 2012 14:18:30 +0300 [thread overview]
Message-ID: <4FABA406.1080608@ti.com> (raw)
In-Reply-To: <1336029982-31898-2-git-send-email-r.sricharan@ti.com>
Hi,
\
On 05/03/2012 10:26 AM, R Sricharan wrote:
> Adding the OMAP5 ES1.0, 2.0 and OMAP5432 cpu revision
> detection support.
>
> Signed-off-by: R Sricharan <r.sricharan@ti•com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti•com>
> ---
> arch/arm/mach-omap2/control.h | 4 +++
> arch/arm/mach-omap2/id.c | 47 +++++++++++++++++++++++++++++++++
> arch/arm/plat-omap/include/plat/cpu.h | 23 ++++++++++++++-
> 3 files changed, 72 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h
> index a406fd0..9daac6f 100644
> --- a/arch/arm/mach-omap2/control.h
> +++ b/arch/arm/mach-omap2/control.h
> @@ -246,6 +246,10 @@
> /* TI81XX CONTROL_DEVCONF register offsets */
> #define TI81XX_CONTROL_DEVICE_ID (TI81XX_CONTROL_DEVCONF + 0x000)
>
> +/* OMAP54XX CONTROL STATUS register */
> +#define OMAP5XXX_CONTROL_STATUS 0x134
> +#define OMAP5_DEVICETYPE_MASK (0x7 << 6)
> +
> /*
> * REVISIT: This list of registers is not comprehensive - there are more
> * that should be added.
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index 0e79b7b..d2ec323 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -50,6 +50,11 @@ int omap_type(void)
> val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS);
> } else if (cpu_is_omap44xx()) {
> val = omap_ctrl_readl(OMAP4_CTRL_MODULE_CORE_STATUS);
> + } else if (cpu_is_omap54xx()) {
> + val = omap_ctrl_readl(OMAP5XXX_CONTROL_STATUS);
> + val &= OMAP5_DEVICETYPE_MASK;
> + val >>= 6;
> + goto out;
> } else {
> pr_err("Cannot detect omap type!\n");
> goto out;
> @@ -500,6 +505,48 @@ void __init omap4xxx_check_revision(void)
> ((omap_rev() >> 12) & 0xf), ((omap_rev() >> 8) & 0xf));
> }
>
> +void __init omap5xxx_check_revision(void)
> +{
> + u32 idcode;
> + u16 hawkeye;
> + u8 rev;
> +
> + idcode = read_tap_reg(OMAP_TAP_IDCODE);
> + hawkeye = (idcode >> 12) & 0xffff;
> + rev = (idcode >> 28) & 0xff;
> + switch (hawkeye) {
> + case 0xb942:
> + switch (rev) {
> + case 0:
> + omap_revision = OMAP5430_REV_ES1_0;
> + break;
> + case 1:
> + omap_revision = OMAP5430_REV_ES2_0;
> + break;
> + default:
> + omap_revision = OMAP5430_REV_ES1_0;
Default should always be the latest version supported. i.e. in this case
it should be OMAP5430_REV_ES2_0
> + }
> + break;
> +
> + case 0xb998:
> + switch (rev) {
> + case 0:
> + omap_revision = OMAP5432_REV_ES1_0;
> + break;
> + default:
> + omap_revision = OMAP5432_REV_ES1_0;
> + }
> + break;
> +
> + default:
> + /* Unknown default to latest silicon rev as default*/
> + omap_revision = OMAP5430_REV_ES2_0;
> + }
> +
> + pr_info("OMAP%04x ES%d.0\n",
> + omap_rev() >> 16, ((omap_rev() >> 12) & 0xf));
> +}
> +
regards,
-roger
next prev parent reply other threads:[~2012-05-10 11:18 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-03 7:26 [PATCH 00/13] ARM: OMAP5: Add minimal OMAP5 SOC support R Sricharan
2012-05-03 7:26 ` [PATCH 01/13] ARM: OMAP5: id: Add cpu id for ES versions R Sricharan
2012-05-10 11:18 ` Roger Quadros [this message]
2012-05-10 11:22 ` R, Sricharan
2012-05-10 13:06 ` Jean-Christophe PLAGNIOL-VILLARD
2012-05-10 13:15 ` R, Sricharan
2012-05-03 7:26 ` [PATCH 02/13] ARM: OMAP5: Add minimal support for OMAP5430 SOC R Sricharan
2012-05-04 22:39 ` Tony Lindgren
2012-05-04 22:47 ` Tony Lindgren
2012-05-06 7:36 ` R, Sricharan
2012-05-07 17:33 ` Tony Lindgren
2012-05-09 9:06 ` R, Sricharan
2012-05-09 16:00 ` Tony Lindgren
2012-05-10 9:49 ` R, Sricharan
2012-05-07 19:07 ` Paul Walmsley
2012-05-07 19:18 ` Tony Lindgren
2012-05-07 19:35 ` Tony Lindgren
2012-05-08 5:32 ` Paul Walmsley
2012-05-08 5:49 ` Hiremath, Vaibhav
2012-05-08 15:48 ` Tony Lindgren
2012-05-08 17:00 ` Hiremath, Vaibhav
2012-05-08 19:07 ` Tony Lindgren
2012-05-08 5:31 ` Paul Walmsley
2012-05-08 15:47 ` Tony Lindgren
2012-05-10 11:58 ` Roger Quadros
2012-05-03 7:26 ` [PATCH 03/13] TEMP: ARM: OMAP5: Add cpu_is_omap54xx() checks R Sricharan
2012-05-03 7:26 ` [PATCH 04/13] ARM: OMAP5: timer: Add clocksource, clockevent support R Sricharan
2012-05-03 7:26 ` [PATCH 05/13] TEMP: ARM: OMAP5: Update the base address of the 32k-counter R Sricharan
2012-05-03 7:26 ` [PATCH 06/13] ARM: OMAP5: gpmc: Update gpmc_init() R Sricharan
2012-05-03 7:26 ` [PATCH 07/13] ARM: OMAP5: l3: Add l3 error handler support for omap5 R Sricharan
2012-05-04 22:51 ` Tony Lindgren
2012-05-06 7:38 ` R, Sricharan
2012-05-07 17:34 ` Tony Lindgren
2012-05-08 6:04 ` R, Sricharan
2012-05-03 7:26 ` [PATCH 08/13] ARM: OMAP5: Add the WakeupGen IP updates R Sricharan
2012-05-04 22:55 ` Tony Lindgren
2012-05-07 9:06 ` Santosh Shilimkar
2012-05-10 11:36 ` Roger Quadros
2012-05-10 11:42 ` Shilimkar, Santosh
2012-05-10 11:48 ` Roger Quadros
2012-05-10 11:52 ` Santosh Shilimkar
2012-05-03 7:26 ` [PATCH 09/13] ARM: OMAP5: Add SMP support R Sricharan
2012-05-08 12:47 ` Will Deacon
2012-05-08 13:00 ` Santosh Shilimkar
2012-05-03 7:26 ` [PATCH 10/13] ARM: OMAP5: board-generic: Add device tree support R Sricharan
2012-05-07 13:27 ` Cousson, Benoit
2012-05-07 14:08 ` R, Sricharan
2012-05-07 17:35 ` Tony Lindgren
2012-05-03 7:26 ` [PATCH 11/13] arm/dts: OMAP5: Add omap5 dts files R Sricharan
2012-05-03 7:26 ` [PATCH 12/13] ARM: OMAP5: Add the build support R Sricharan
2012-05-04 22:58 ` Tony Lindgren
2012-05-07 3:35 ` R, Sricharan
2012-05-07 17:37 ` Tony Lindgren
2012-05-08 9:19 ` Cousson, Benoit
2012-05-08 15:57 ` Tony Lindgren
2012-05-03 7:26 ` [PATCH 13/13] ARM: Kconfig update to support additional GPIOs in OMAP5 R Sricharan
2012-05-07 9:49 ` [PATCH 00/13] ARM: OMAP5: Add minimal OMAP5 SOC support Santosh Shilimkar
2012-05-07 22:26 ` Tony Lindgren
2012-05-08 7:24 ` Santosh Shilimkar
2012-05-08 15:58 ` Tony Lindgren
2012-05-10 17:43 ` Sricharan R
2012-05-11 20:11 ` Tony Lindgren
2012-05-14 4:50 ` R, Sricharan
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=4FABA406.1080608@ti.com \
--to=rogerq@ti$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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