From: Minkyu Kang Date: Mon, 16 May 2011 10:45:54 +0000 (+0900) Subject: S5PC2XX: Support the cpu revision X-Git-Tag: v2011.06-rc2~7^2^2~19 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5d845f2758d86f9287e2ac3d48fdcbe80ad1d21b;p=oweals%2Fu-boot.git S5PC2XX: Support the cpu revision S5PC210 SoC have two cpu revisions, and have some difference. So, support the cpu revision for each revision. Signed-off-by: Minkyu Kang Signed-off-by: Kyungmin Park --- diff --git a/arch/arm/cpu/armv7/s5p-common/cpu_info.c b/arch/arm/cpu/armv7/s5p-common/cpu_info.c index c8a543a452..527f32deef 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 d56ee802fc..f9015c76f1 100644 --- a/arch/arm/include/asm/arch-s5pc2xx/cpu.h +++ b/arch/arm/include/asm/arch-s5pc2xx/cpu.h @@ -51,6 +51,12 @@ #include /* 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) \