All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Eduardo Valentin <eduardo.valentin@nokia.com>
Cc: ext Kevin Hilman <khilman@deeprootsystems.com>,
	"De-Schrijver Peter (Nokia-D/Helsinki)"
	<Peter.De-Schrijver@nokia.com>,
	Linux-OMAP <linux-omap@vger.kernel.org>
Subject: Re: [PATCH 4/4] OMAP3: PM: export chip IDCODE, Production ID and Die ID
Date: Mon, 26 Apr 2010 11:28:12 -0700	[thread overview]
Message-ID: <20100426182811.GI7225@atomide.com> (raw)
In-Reply-To: <1272270293-18568-5-git-send-email-eduardo.valentin@nokia.com>

* Eduardo Valentin <eduardo.valentin@nokia.com> [100426 01:20]:
> From: Eduardo Valentin <eduardo.valentin@nokia.com>
> 
> This patch exports the OMAP3 IDCODE, Production ID and Die ID to userspace
> via /proc/cpuinfo using the system_soc_info.
> 
> This can be used to track down silicon specific issues. The info is
> exported via /proc/cpuinfo because then it can be possible to include this
> in corematic dumps.
> 
> This is based on Peter De Schrijver patch, which export same info via sysfs.
> 
> Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
> ---
>  arch/arm/mach-omap2/id.c |   20 ++++++++++++++++++++
>  1 files changed, 20 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index 75e36a5..887787d 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -76,6 +76,10 @@ EXPORT_SYMBOL(omap_type);
>  /*----------------------------------------------------------------------------*/
>  
>  #define OMAP_TAP_IDCODE		0x0204
> +#define OMAP_TAP_PROD_ID_0      0x0208
> +#define OMAP_TAP_PROD_ID_1      0x020c
> +#define OMAP_TAP_PROD_ID_2      0x0210
> +#define OMAP_TAP_PROD_ID_3      0x0214
>  #define OMAP_TAP_DIE_ID_0	0x0218
>  #define OMAP_TAP_DIE_ID_1	0x021C
>  #define OMAP_TAP_DIE_ID_2	0x0220
> @@ -306,6 +310,7 @@ void __init omap4_check_revision(void)
>  
>  void __init omap3_cpuinfo(void)
>  {
> +	int sz;
>  	u8 rev = GET_OMAP_REVISION();
>  	char cpu_name[16], cpu_rev[16];
>  
> @@ -375,6 +380,21 @@ void __init omap3_cpuinfo(void)
>  	OMAP3_SHOW_FEATURE(192mhz_clk);
>  
>  	printk(")\n");
> +
> +	/* Append OMAP3 IDCODE, Production ID and Die ID to system_soc_info */
> +	sz = strlen(system_soc_info);
> +	snprintf(system_soc_info + sz, SYSTEM_SOC_INFO_SIZE - sz,
> +			"\n\tIDCODE\t: %08x\n\tPr. ID\t: %08x %08x %08x %08x\n"
> +			"\tDie ID\t: %08x %08x %08x %08x\n",
> +			read_tap_reg(OMAP_TAP_IDCODE),
> +			read_tap_reg(OMAP_TAP_PROD_ID_0),
> +			read_tap_reg(OMAP_TAP_PROD_ID_1),
> +			read_tap_reg(OMAP_TAP_PROD_ID_2),
> +			read_tap_reg(OMAP_TAP_PROD_ID_3),
> +			read_tap_reg(OMAP_TAP_DIE_ID_0),
> +			read_tap_reg(OMAP_TAP_DIE_ID_1),
> +			read_tap_reg(OMAP_TAP_DIE_ID_2),
> +			read_tap_reg(OMAP_TAP_DIE_ID_3));
>  }
>  
>  /*

We should not expose the Die ID info unless specifically compiled in
with some Kconfig option. Please search for "pentium serial number privacy"
or similar.

Also, this whole series should be discussed on linux-arm-kernel.

Tony

  parent reply	other threads:[~2010-04-26 18:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-26  8:24 [PATCH 0/4] Adding soc related info into /proc/cpuinfo Eduardo Valentin
2010-04-26  8:24 ` [PATCH 1/4] ARM: Introduce SoC Info " Eduardo Valentin
2010-04-26  8:24 ` [PATCH 2/4] mach-omap2: Add SoC info data for OMAP2,3,4 " Eduardo Valentin
2010-04-26  8:24 ` [PATCH 3/4] mach-omap1: Add SoC info data for OMAP into /proc/cpuinfo1 Eduardo Valentin
2010-04-26  8:24 ` [PATCH 4/4] OMAP3: PM: export chip IDCODE, Production ID and Die ID Eduardo Valentin
2010-04-26  8:33   ` Shilimkar, Santosh
2010-04-26  8:35     ` Shilimkar, Santosh
2010-04-26 18:28   ` Tony Lindgren [this message]
2010-04-27 10:13     ` Eduardo Valentin
2010-04-27 14:51       ` 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=20100426182811.GI7225@atomide.com \
    --to=tony@atomide.com \
    --cc=Peter.De-Schrijver@nokia.com \
    --cc=eduardo.valentin@nokia.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.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 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.