Skip to content
Snippets Groups Projects
Commit 5d845f27 authored by Minkyu Kang's avatar Minkyu Kang
Browse files

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: default avatarMinkyu Kang <mk7.kang@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
parent b0ad8621
No related branches found
No related tags found
No related merge requests found
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
/* Default is s5pc100 */ /* Default is s5pc100 */
unsigned int s5p_cpu_id = 0xC100; unsigned int s5p_cpu_id = 0xC100;
/* Default is EVT1 */
unsigned int s5p_cpu_rev = 1;
#ifdef CONFIG_ARCH_CPU_INIT #ifdef CONFIG_ARCH_CPU_INIT
int arch_cpu_init(void) int arch_cpu_init(void)
......
...@@ -51,6 +51,12 @@ ...@@ -51,6 +51,12 @@
#include <asm/io.h> #include <asm/io.h>
/* CPU detection macros */ /* CPU detection macros */
extern unsigned int s5p_cpu_id; 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) static inline void s5p_set_cpu_id(void)
{ {
...@@ -61,8 +67,12 @@ static inline void s5p_set_cpu_id(void) ...@@ -61,8 +67,12 @@ static inline void s5p_set_cpu_id(void)
* 0xC200: S5PC210 EVT0 * 0xC200: S5PC210 EVT0
* 0xC210: S5PC210 EVT1 * 0xC210: S5PC210 EVT1
*/ */
if (s5p_cpu_id == 0xC200) if (s5p_cpu_id == 0xC200) {
s5p_cpu_id |= 0x10; s5p_cpu_id |= 0x10;
s5p_cpu_rev = 0;
} else if (s5p_cpu_id == 0xC210) {
s5p_cpu_rev = 1;
}
} }
#define IS_SAMSUNG_TYPE(type, id) \ #define IS_SAMSUNG_TYPE(type, id) \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment