public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] S5PC2XX: Support the cpu revision
@ 2011-05-16 10:59 Minkyu Kang
  2011-05-18  7:38 ` Minkyu Kang
  0 siblings, 1 reply; 2+ messages in thread
From: Minkyu Kang @ 2011-05-16 10:59 UTC (permalink / raw)
  To: u-boot

S5PC210 SoC have two cpu revisions, and have some difference.
So, support the cpu revision for each revision.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 arch/arm/cpu/armv7/s5p-common/cpu_info.c |    2 ++
 arch/arm/include/asm/arch-s5pc2xx/cpu.h  |   12 +++++++++++-
 2 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/arch/arm/cpu/armv7/s5p-common/cpu_info.c b/arch/arm/cpu/armv7/s5p-common/cpu_info.c
index c8a543a..527f32d 100644
--- a/arch/arm/cpu/armv7/s5p-common/cpu_info.c
+++ b/arch/arm/cpu/armv7/s5p-common/cpu_info.c
@@ -26,6 +26,8 @@
 
 /* Default is s5pc100 */
 unsigned int s5p_cpu_id = 0xC100;
+/* Default is EVT1 */
+unsigned int s5p_cpu_rev = 1;
 
 #ifdef CONFIG_ARCH_CPU_INIT
 int arch_cpu_init(void)
diff --git a/arch/arm/include/asm/arch-s5pc2xx/cpu.h b/arch/arm/include/asm/arch-s5pc2xx/cpu.h
index d56ee80..f9015c7 100644
--- a/arch/arm/include/asm/arch-s5pc2xx/cpu.h
+++ b/arch/arm/include/asm/arch-s5pc2xx/cpu.h
@@ -51,6 +51,12 @@
 #include <asm/io.h>
 /* CPU detection macros */
 extern unsigned int s5p_cpu_id;
+extern unsigned int s5p_cpu_rev;
+
+static inline int s5p_get_cpu_rev(void)
+{
+	return s5p_cpu_rev;
+}
 
 static inline void s5p_set_cpu_id(void)
 {
@@ -61,8 +67,12 @@ static inline void s5p_set_cpu_id(void)
 	 * 0xC200: S5PC210 EVT0
 	 * 0xC210: S5PC210 EVT1
 	 */
-	if (s5p_cpu_id == 0xC200)
+	if (s5p_cpu_id == 0xC200) {
 		s5p_cpu_id |= 0x10;
+		s5p_cpu_rev = 0;
+	} else if (s5p_cpu_id == 0xC210) {
+		s5p_cpu_rev = 1;
+	}
 }
 
 #define IS_SAMSUNG_TYPE(type, id)			\
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] S5PC2XX: Support the cpu revision
  2011-05-16 10:59 [U-Boot] S5PC2XX: Support the cpu revision Minkyu Kang
@ 2011-05-18  7:38 ` Minkyu Kang
  0 siblings, 0 replies; 2+ messages in thread
From: Minkyu Kang @ 2011-05-18  7:38 UTC (permalink / raw)
  To: u-boot

On 16 May 2011 19:59, Minkyu Kang <mk7.kang@samsung.com> wrote:
> S5PC210 SoC have two cpu revisions, and have some difference.
> So, support the cpu revision for each revision.
>
> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> ?arch/arm/cpu/armv7/s5p-common/cpu_info.c | ? ?2 ++
> ?arch/arm/include/asm/arch-s5pc2xx/cpu.h ?| ? 12 +++++++++++-
> ?2 files changed, 13 insertions(+), 1 deletions(-)
>

applied to u-boot-samsung

-- 
from. prom.
www.promsoft.net

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-18  7:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-16 10:59 [U-Boot] S5PC2XX: Support the cpu revision Minkyu Kang
2011-05-18  7:38 ` Minkyu Kang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox