linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: amit.kachhap@linaro.org (Amit Daniel Kachhap)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 2/4] ARM: EXYNOS4: Fix to work with origen boards.
Date: Fri, 19 Aug 2011 18:39:58 +0530	[thread overview]
Message-ID: <1313759400-31347-2-git-send-email-amit.kachhap@linaro.org> (raw)
In-Reply-To: <1313759340-31319-1-git-send-email-amit.kachhap@linaro.org>

This adds a function to get the revision id.

Signed-off-by: Jaecheol Lee <jc.lee@samsung.com>
Signed-off-by: Changhwan Youn <chaos.youn@samsung.com>
---
 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
 
-- 
1.7.1

  parent reply	other threads:[~2011-08-19 13:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-19 13:09 [RFC PATCH 0/4] ARM: EXYNOS4: Use cpuidle common save/restore framework code Amit Daniel Kachhap
2011-08-19 13:09 ` [RFC PATCH 1/4] ARM: kernel: Small fixes in save/restore common code Amit Daniel Kachhap
2011-08-19 14:33   ` Amit Kucheria
2011-08-26 15:56     ` Lorenzo Pieralisi
2011-08-19 13:09 ` Amit Daniel Kachhap [this message]
2011-08-19 13:59   ` [RFC PATCH 2/4] ARM: EXYNOS4: Fix to work with origen boards Kyungmin Park
2011-08-22 17:01     ` Amit Kachhap
2011-08-19 13:09 ` [RFC PATCH 3/4] ARM: EXYNOS4: Add support AFTR mode cpuidle state on EXYNOS4210 Amit Daniel Kachhap
2011-08-21 17:18   ` Russell King - ARM Linux
2011-08-22 16:55     ` Amit Kachhap
2011-08-19 13:10 ` [RFC PATCH 4/4] ARM: EXYNOS4: Modify cpuidle code to adapt to save/restore common code Amit Daniel Kachhap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1313759400-31347-2-git-send-email-amit.kachhap@linaro.org \
    --to=amit.kachhap@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).