From: Eduardo Valentin <eduardo.valentin@nokia.com> To: linux-arm-kernel@lists.infradead.org, Linux-OMAP <linux-omap@vger.kernel.org> Cc: ext Tony Lindgren <tony@atomide.com>, ext Kevin Hilman <khilman@deeprootsystems.com>, "\\\"De-Schrijver Peter (Nokia-D/Helsinki)\\\"" <Peter.De-Schrijver@nokia.com>, santosh.shilimkar@ti.com, felipe.balbi@nokia.com, Eduardo Valentin <eduardo.valentin@nokia.com> Subject: [PATCHv3 1/4] ARM: Introduce SoC Info into /proc/cpuinfo Date: Wed, 28 Apr 2010 08:51:40 +0300 [thread overview] Message-ID: <1272433903-24003-2-git-send-email-eduardo.valentin@nokia.com> (raw) In-Reply-To: <1272433903-24003-1-git-send-email-eduardo.valentin@nokia.com> From: Eduardo Valentin <eduardo.valentin@nokia.com> This patch extends the ARM /proc/cpuinfo to include soc info data. It is implemented via the same way which is done for system_rev, system_serial_low and system_serial_high. Then, now we have system_soc_info, which is printed only if there is something useful there. Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com> --- arch/arm/include/asm/system.h | 2 ++ arch/arm/kernel/setup.c | 5 +++++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 4ace45e..53a9645 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -71,6 +71,8 @@ struct task_struct; extern unsigned int system_rev; extern unsigned int system_serial_low; extern unsigned int system_serial_high; +#define SYSTEM_SOC_INFO_SIZE 128 +extern char system_soc_info[SYSTEM_SOC_INFO_SIZE]; extern unsigned int mem_fclk_21285; struct pt_regs; diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index c91c77b..025d795 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -85,6 +85,9 @@ EXPORT_SYMBOL(system_serial_low); unsigned int system_serial_high; EXPORT_SYMBOL(system_serial_high); +char system_soc_info[SYSTEM_SOC_INFO_SIZE]; +EXPORT_SYMBOL(system_soc_info); + unsigned int elf_hwcap; EXPORT_SYMBOL(elf_hwcap); @@ -847,6 +850,8 @@ static int c_show(struct seq_file *m, void *v) seq_printf(m, "Revision\t: %04x\n", system_rev); seq_printf(m, "Serial\t\t: %08x%08x\n", system_serial_high, system_serial_low); + if (strlen(system_soc_info)) + seq_printf(m, "SoC Info\t: %s\n", system_soc_info); return 0; } -- 1.7.0.4.361.g8b5fe.dirty
WARNING: multiple messages have this Message-ID (diff)
From: eduardo.valentin@nokia.com (Eduardo Valentin) To: linux-arm-kernel@lists.infradead.org Subject: [PATCHv3 1/4] ARM: Introduce SoC Info into /proc/cpuinfo Date: Wed, 28 Apr 2010 08:51:40 +0300 [thread overview] Message-ID: <1272433903-24003-2-git-send-email-eduardo.valentin@nokia.com> (raw) In-Reply-To: <1272433903-24003-1-git-send-email-eduardo.valentin@nokia.com> From: Eduardo Valentin <eduardo.valentin@nokia.com> This patch extends the ARM /proc/cpuinfo to include soc info data. It is implemented via the same way which is done for system_rev, system_serial_low and system_serial_high. Then, now we have system_soc_info, which is printed only if there is something useful there. Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com> --- arch/arm/include/asm/system.h | 2 ++ arch/arm/kernel/setup.c | 5 +++++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 4ace45e..53a9645 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -71,6 +71,8 @@ struct task_struct; extern unsigned int system_rev; extern unsigned int system_serial_low; extern unsigned int system_serial_high; +#define SYSTEM_SOC_INFO_SIZE 128 +extern char system_soc_info[SYSTEM_SOC_INFO_SIZE]; extern unsigned int mem_fclk_21285; struct pt_regs; diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index c91c77b..025d795 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -85,6 +85,9 @@ EXPORT_SYMBOL(system_serial_low); unsigned int system_serial_high; EXPORT_SYMBOL(system_serial_high); +char system_soc_info[SYSTEM_SOC_INFO_SIZE]; +EXPORT_SYMBOL(system_soc_info); + unsigned int elf_hwcap; EXPORT_SYMBOL(elf_hwcap); @@ -847,6 +850,8 @@ static int c_show(struct seq_file *m, void *v) seq_printf(m, "Revision\t: %04x\n", system_rev); seq_printf(m, "Serial\t\t: %08x%08x\n", system_serial_high, system_serial_low); + if (strlen(system_soc_info)) + seq_printf(m, "SoC Info\t: %s\n", system_soc_info); return 0; } -- 1.7.0.4.361.g8b5fe.dirty
next prev parent reply other threads:[~2010-04-28 5:51 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-04-28 5:51 [PATCHv3 0/4] Adding soc related info into /proc/cpuinfo Eduardo Valentin 2010-04-28 5:51 ` Eduardo Valentin 2010-04-28 5:51 ` Eduardo Valentin [this message] 2010-04-28 5:51 ` [PATCHv3 1/4] ARM: Introduce SoC Info " Eduardo Valentin 2010-04-28 5:51 ` [PATCHv3 2/4] mach-omap2: Add SoC info data for OMAP2,3,4 " Eduardo Valentin 2010-04-28 5:51 ` [PATCHv3 2/4] mach-omap2: Add SoC info data for OMAP2, 3, 4 " Eduardo Valentin 2010-04-28 5:51 ` [PATCHv3 3/4] mach-omap1: Add SoC info data for OMAP1 " Eduardo Valentin 2010-04-28 5:51 ` Eduardo Valentin 2010-04-28 5:51 ` [PATCHv3 4/4] OMAP3: PM: export chip IDCODE, Production ID and Die ID Eduardo Valentin 2010-04-28 5:51 ` Eduardo Valentin 2010-04-28 16:21 ` Kevin Hilman 2010-04-28 16:21 ` Kevin Hilman 2010-04-30 6:07 ` Eduardo Valentin 2010-04-30 6:07 ` Eduardo Valentin
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=1272433903-24003-2-git-send-email-eduardo.valentin@nokia.com \ --to=eduardo.valentin@nokia.com \ --cc=Peter.De-Schrijver@nokia.com \ --cc=felipe.balbi@nokia.com \ --cc=khilman@deeprootsystems.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-omap@vger.kernel.org \ --cc=santosh.shilimkar@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: linkBe 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.