From patchwork Fri Aug 19 13:09:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kachhap X-Patchwork-Id: 1079502 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7JDAQ0R029074 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 19 Aug 2011 13:10:48 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QuOq4-0001t1-J7; Fri, 19 Aug 2011 13:10:20 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QuOq4-0006pQ-35; Fri, 19 Aug 2011 13:10:20 +0000 Received: from mail-iy0-f171.google.com ([209.85.210.171]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QuOq1-0006oo-2t for linux-arm-kernel@lists.infradead.org; Fri, 19 Aug 2011 13:10:17 +0000 Received: by iyf13 with SMTP id 13so5705514iyf.16 for ; Fri, 19 Aug 2011 06:10:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=Sm+MlQT2SlL43FHL6w1+w0muPHo/+c7gyTpusPyl4RM=; b=iBmwSy9o/He648n786hefthjGhbbBKscppnl0LIKT4W6YrDGgOIMieogpWifMf668Z 3PuiExhBCw4C4ZLRQQcZXxTX0ReAkJ8j8Nxi4ki0t5bl0fH4+Yjv2Z6fS6sfaURQZFWb pjhKYMK45u80Tm4/AeFFuh84oZA9ICdHjRbfQ= Received: by 10.142.188.7 with SMTP id l7mr1020444wff.385.1313759414145; Fri, 19 Aug 2011 06:10:14 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id l7sm2330298pbh.10.2011.08.19.06.10.11 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Aug 2011 06:10:13 -0700 (PDT) From: Amit Daniel Kachhap To: linux-samsung-soc@vger.kernel.org Subject: [RFC PATCH 2/4] ARM: EXYNOS4: Fix to work with origen boards. Date: Fri, 19 Aug 2011 18:39:58 +0530 Message-Id: <1313759400-31347-2-git-send-email-amit.kachhap@linaro.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1313759340-31319-1-git-send-email-amit.kachhap@linaro.org> References: <1313759340-31319-1-git-send-email-amit.kachhap@linaro.org> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110819_091017_312390_1A3C0CE3 X-CRM114-Status: GOOD ( 13.80 ) X-Spam-Score: 1.8 (+) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (1.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.210.171 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (amitdanielk[at]gmail.com) 2.5 SUSPICIOUS_RECIPS Similar addresses in recipient list 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service Cc: linaro-dev@lists.linaro.org, amit.kachhap@linaro.org, linux-arm-kernel@lists.infradead.org, patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 19 Aug 2011 13:10:48 +0000 (UTC) This adds a function to get the revision id. Signed-off-by: Jaecheol Lee Signed-off-by: Changhwan Youn --- arch/arm/mach-exynos4/cpu.c | 10 ++++++++++ arch/arm/plat-s5p/include/plat/exynos4.h | 1 + 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c index 2d8a40c..8b106b8 100644 --- a/arch/arm/mach-exynos4/cpu.c +++ b/arch/arm/mach-exynos4/cpu.c @@ -234,6 +234,16 @@ static int __init exynos4_l2x0_cache_init(void) early_initcall(exynos4_l2x0_cache_init); #endif +int exynos4_subrev(void) +{ + static int subrev = -1; + + if (unlikely(subrev < 0)) + subrev = readl(S5P_VA_CHIPID) & 0xf; + + return subrev; +} + int __init exynos4_init(void) { printk(KERN_INFO "EXYNOS4: Initializing architecture\n"); diff --git a/arch/arm/plat-s5p/include/plat/exynos4.h b/arch/arm/plat-s5p/include/plat/exynos4.h index 907caab..d62f7f7 100644 --- a/arch/arm/plat-s5p/include/plat/exynos4.h +++ b/arch/arm/plat-s5p/include/plat/exynos4.h @@ -15,6 +15,7 @@ extern void exynos4_common_init_uarts(struct s3c2410_uartcfg *cfg, int no); extern void exynos4_register_clocks(void); extern void exynos4_setup_clocks(void); +extern int exynos4_subrev(void); #ifdef CONFIG_CPU_EXYNOS4210