From patchwork Wed Jan 30 15:01:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ruslan Bilovol X-Patchwork-Id: 2068331 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id BF1EFDF264 for ; Wed, 30 Jan 2013 15:02:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755370Ab3A3PB7 (ORCPT ); Wed, 30 Jan 2013 10:01:59 -0500 Received: from mail-wg0-f52.google.com ([74.125.82.52]:60196 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751669Ab3A3PBn (ORCPT ); Wed, 30 Jan 2013 10:01:43 -0500 Received: by mail-wg0-f52.google.com with SMTP id 12so1224744wgh.31 for ; Wed, 30 Jan 2013 07:01:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:subject:date:message-id:x-mailer :in-reply-to:references; bh=LZeJYIvmxvzk8wP2/+4FLabBV3J87n45gZ+TGNXOvoE=; b=EkIJBmJBSd2jKfkIX8s3lSC+nOdQwhYJwYMi6C2W7YPs5IuajcCHNnerjl7yYNi0lX QjW9e8l3jxtesDsLtU65INuYVmZaGoxzMT4lqNcQ9NnYlR4cYL7qeYzf9KqsBaq4Fo9x gFdUuF02qk0wtVqI5M1ublNmz0MQ6RfiXQ0r6m+SaMYk30JewLXczVXcKmBXe1Pp32xg vYpnv85vGAb6GmRX4b7434am6P3wdDNgyffa7OUdB/yVHrpeWykfKAdRYUko0+lEXP27 BWHfWdETQNmU7yMz3k6c4cIGM4PsPLOSQ8666/GUewkNYTrfVLldhRJmtPRZ70nkGHOw g3fA== X-Received: by 10.180.102.170 with SMTP id fp10mr9467680wib.13.1359558101873; Wed, 30 Jan 2013 07:01:41 -0800 (PST) Received: from localhost ([195.238.93.36]) by mx.google.com with ESMTPS id hu8sm9652962wib.6.2013.01.30.07.01.39 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 30 Jan 2013 07:01:41 -0800 (PST) From: Ruslan Bilovol To: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, tony@atomide.com, linux@arm.linux.org.uk, eduardo.valentin@ti.com Subject: [RFC PATCH v3 2/2] ARM: OMAP4: setup SoC model name during ID initialisation Date: Wed, 30 Jan 2013 17:01:31 +0200 Message-Id: <1359558091-29251-3-git-send-email-ruslan.bilovol@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1359558091-29251-1-git-send-email-ruslan.bilovol@ti.com> References: <1359558091-29251-1-git-send-email-ruslan.bilovol@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Set up the SoC model name during OMAP ID initialisation so it will be displayed in /proc/cpuinfo: / # cat proc/cpuinfo [...] CPU variant : 0x2 CPU part : 0xc09 CPU revision : 10 SoC name : OMAP4470 Hardware : OMAP4 Blaze Tablet Revision : 20edb4 [...] Signed-off-by: Ruslan Bilovol --- arch/arm/mach-omap2/id.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 45cc7ed4..dca7ac7 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,6 +34,7 @@ static unsigned int omap_revision; static const char *cpu_rev; +static char omap_soc_model_name[80]; u32 omap_features; unsigned int omap_rev(void) @@ -502,6 +504,9 @@ void __init omap4xxx_check_revision(void) omap_revision = OMAP4430_REV_ES2_3; } + sprintf(omap_soc_model_name, "OMAP%04x", omap_rev() >> 16); + set_soc_model_name(omap_soc_model_name); + pr_info("OMAP%04x ES%d.%d\n", omap_rev() >> 16, ((omap_rev() >> 12) & 0xf), ((omap_rev() >> 8) & 0xf)); }