Skip to contentSkip to conversation

S5PC2XX: Support the cpu revision

U-Boot Minkyu Kang 2 participants 2 messages May 16, 2011 – May 18, 2011 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

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

---
 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(-)
arch/arm/cpu/armv7/s5p-common/cpu_info.c +2 -0
index c8a543a..527f32d 100644
@@ -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)
arch/arm/include/asm/arch-s5pc2xx/cpu.h +11 -1
index d56ee80..f9015c7 100644
@@ -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)			\
Signature · 1 line
1.7.4.1
#1 lore raw
Quoted 10 lines · Minkyu Kang

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

---
?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

Signature · 2 lines
from. prom.
www.promsoft.net