From patchwork Tue Jan 29 15:54:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ruslan Bilovol X-Patchwork-Id: 2062661 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id CB2393FCD5 for ; Tue, 29 Jan 2013 15:57:11 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U0DWa-0005N8-1Q; Tue, 29 Jan 2013 15:55:04 +0000 Received: from devils.ext.ti.com ([198.47.26.153]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U0DWI-0005Kc-4F for linux-arm-kernel@lists.infradead.org; Tue, 29 Jan 2013 15:54:47 +0000 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id r0TFse6S013767; Tue, 29 Jan 2013 09:54:40 -0600 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r0TFseNq028613; Tue, 29 Jan 2013 09:54:40 -0600 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Tue, 29 Jan 2013 09:54:40 -0600 Received: from localhost (uglx0155540.ucm2.emeaucm.ext.ti.com [10.167.145.130]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r0TFsdcp011216; Tue, 29 Jan 2013 09:54:40 -0600 From: Ruslan Bilovol To: , , , , Subject: [RFC PATCH 2/2] ARM: OMAP4: setup CPU model name during ID initialisation Date: Tue, 29 Jan 2013 17:54:25 +0200 Message-ID: <1359474865-15408-3-git-send-email-ruslan.bilovol@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1359474865-15408-1-git-send-email-ruslan.bilovol@ti.com> References: <1359474865-15408-1-git-send-email-ruslan.bilovol@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130129_105446_315152_2643831F X-CRM114-Status: GOOD ( 10.23 ) X-Spam-Score: -7.6 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [198.47.26.153 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Set up the CPU model name during OMAP ID initialisation so it will be displayed in /proc/cpuinfo: / # cat proc/cpuinfo processor : 0 model name : ARMv7 Processor rev 10 (v7l) BogoMIPS : 1590.23 Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls CPU implementer : 0x41 CPU name : OMAP4470 ES1.0 HS CPU architecture: 7 CPU variant : 0x2 CPU part : 0xc09 CPU revision : 10 [...] Signed-off-by: Ruslan Bilovol --- arch/arm/mach-omap2/id.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 45cc7ed4..d1416e9 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -20,6 +20,7 @@ #include #include +#include #include "common.h" @@ -33,8 +34,17 @@ static unsigned int omap_revision; static const char *cpu_rev; +static char omap_cpu_model_name[80]; u32 omap_features; +static const char const *omap_types[] = { + [OMAP2_DEVICE_TYPE_TEST] = "TST", + [OMAP2_DEVICE_TYPE_EMU] = "EMU", + [OMAP2_DEVICE_TYPE_SEC] = "HS", + [OMAP2_DEVICE_TYPE_GP] = "GP", + [OMAP2_DEVICE_TYPE_BAD] = "BAD", +}; + unsigned int omap_rev(void) { return omap_revision; @@ -502,8 +512,12 @@ void __init omap4xxx_check_revision(void) omap_revision = OMAP4430_REV_ES2_3; } - pr_info("OMAP%04x ES%d.%d\n", omap_rev() >> 16, - ((omap_rev() >> 12) & 0xf), ((omap_rev() >> 8) & 0xf)); + sprintf(omap_cpu_model_name, "OMAP%04x ES%d.%d %s", omap_rev() >> 16, + ((omap_rev() >> 12) & 0xf), ((omap_rev() >> 8) & 0xf), + omap_types[omap_type()]); + set_cpu_model_name(omap_cpu_model_name); + + pr_info("%s\n", omap_cpu_model_name); } void __init omap5xxx_check_revision(void)