From patchwork Wed Apr 28 05:51:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 95618 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3S5pbGo005121 for ; Wed, 28 Apr 2010 05:51:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753630Ab0D1Fvh (ORCPT ); Wed, 28 Apr 2010 01:51:37 -0400 Received: from smtp.nokia.com ([192.100.105.134]:40907 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753589Ab0D1Fvg (ORCPT ); Wed, 28 Apr 2010 01:51:36 -0400 Received: from esebh106.NOE.Nokia.com (esebh106.ntc.nokia.com [172.21.138.213]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o3S5pOjG014683; Wed, 28 Apr 2010 00:51:30 -0500 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by esebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 28 Apr 2010 08:51:22 +0300 Received: from mgw-sa01.ext.nokia.com ([147.243.1.47]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Wed, 28 Apr 2010 08:51:22 +0300 Received: from manganga.research.nokia.com (esdhcp04199.research.nokia.com [172.21.41.99]) by mgw-sa01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o3S5pKkY001721; Wed, 28 Apr 2010 08:51:21 +0300 From: Eduardo Valentin To: linux-arm-kernel@lists.infradead.org, Linux-OMAP Cc: ext Tony Lindgren , ext Kevin Hilman , "\\\"De-Schrijver Peter (Nokia-D/Helsinki)\\\"" , santosh.shilimkar@ti.com, felipe.balbi@nokia.com, Eduardo Valentin Subject: [PATCHv3 2/4] mach-omap2: Add SoC info data for OMAP2, 3, 4 into /proc/cpuinfo Date: Wed, 28 Apr 2010 08:51:41 +0300 Message-Id: <1272433903-24003-3-git-send-email-eduardo.valentin@nokia.com> X-Mailer: git-send-email 1.7.0.4.361.g8b5fe.dirty In-Reply-To: <1272433903-24003-1-git-send-email-eduardo.valentin@nokia.com> References: <1272433903-24003-1-git-send-email-eduardo.valentin@nokia.com> X-OriginalArrivalTime: 28 Apr 2010 05:51:22.0492 (UTC) FILETIME=[D4E7BBC0:01CAE696] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 28 Apr 2010 05:51:41 +0000 (UTC) diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 37b8a1a..4702ffe 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -104,7 +104,7 @@ static u16 tap_prod_id; void __init omap24xx_check_revision(void) { - int i, j; + int i, j, sz; u32 idcode, prod_id; u16 hawkeye; u8 dev_type, rev; @@ -152,10 +152,12 @@ void __init omap24xx_check_revision(void) j = i; } - pr_info("OMAP%04x", omap_rev() >> 16); + sz = snprintf(system_soc_info, SYSTEM_SOC_INFO_SIZE, "OMAP%04x", + omap_rev() >> 16); if ((omap_rev() >> 8) & 0x0f) - pr_info("ES%x", (omap_rev() >> 12) & 0xf); - pr_info("\n"); + snprintf(system_soc_info + sz, SYSTEM_SOC_INFO_SIZE - sz, + "ES%x", (omap_rev() >> 12) & 0xf); + pr_info("%s\n", system_soc_info); } #define OMAP3_CHECK_FEATURE(status,feat) \ @@ -286,7 +288,9 @@ void __init omap4_check_revision(void) if ((hawkeye == 0xb852) && (rev == 0x0)) { omap_revision = OMAP4430_REV_ES1_0; omap_chip.oc |= CHIP_IS_OMAP4430ES1; - pr_info("OMAP%04x %s\n", omap_rev() >> 16, rev_name); + snprintf(system_soc_info, SYSTEM_SOC_INFO_SIZE, "OMAP%04x %s\n", + omap_rev() >> 16, rev_name); + pr_info("%s\n", system_soc_info); return; } @@ -356,7 +360,9 @@ void __init omap3_cpuinfo(void) } /* Print verbose information */ - pr_info("%s ES%s (", cpu_name, cpu_rev); + snprintf(system_soc_info, SYSTEM_SOC_INFO_SIZE, "%s ES%s", cpu_name, + cpu_rev); + pr_info("%s (", system_soc_info); OMAP3_SHOW_FEATURE(l2cache); OMAP3_SHOW_FEATURE(iva);