From patchwork Wed Apr 28 05:51:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 95619 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 o3S5pbGq005121 for ; Wed, 28 Apr 2010 05:51:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753712Ab0D1Fvj (ORCPT ); Wed, 28 Apr 2010 01:51:39 -0400 Received: from smtp.nokia.com ([192.100.122.233]:20106 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753623Ab0D1Fvh (ORCPT ); Wed, 28 Apr 2010 01:51:37 -0400 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o3S5oxDb006915; Wed, 28 Apr 2010 08:51:27 +0300 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by vaebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 28 Apr 2010 08:51:26 +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 o3S5pKkZ001721; Wed, 28 Apr 2010 08:51:22 +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 3/4] mach-omap1: Add SoC info data for OMAP1 into /proc/cpuinfo Date: Wed, 28 Apr 2010 08:51:42 +0300 Message-Id: <1272433903-24003-4-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.0960 (UTC) FILETIME=[D52F2500: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:56 +0000 (UTC) diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c index a0e3560..9a84347 100644 --- a/arch/arm/mach-omap1/id.c +++ b/arch/arm/mach-omap1/id.c @@ -120,7 +120,7 @@ static u8 __init omap_get_die_rev(void) void __init omap_check_revision(void) { - int i; + int i, sz; u16 jtag_id; u8 die_rev; u32 omap_id; @@ -194,11 +194,14 @@ void __init omap_check_revision(void) printk(KERN_INFO "Unknown OMAP cpu type: 0x%02x\n", cpu_type); } - printk(KERN_INFO "OMAP%04x", omap_revision >> 16); + sz = snprintf(system_soc_info, SYSTEM_SOC_INFO_SIZE, "OMAP%04x", + omap_revision >> 16); if ((omap_revision >> 8) & 0xff) - printk(KERN_INFO "%x", (omap_revision >> 8) & 0xff); - printk(KERN_INFO " revision %i handled as %02xxx id: %08x%08x\n", - die_rev, omap_revision & 0xff, system_serial_low, - system_serial_high); + snprintf(system_soc_info + sz, SYSTEM_SOC_INFO_SIZE - sz, + "%x", (omap_revision >> 8) & 0xff); + pr_info("%s revision %i handled as %02xxx id: %08x%08x\n", + system_soc_info, die_rev, omap_revision & 0xff, + system_serial_low, system_serial_high); + }