aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s3c24xx
diff options
context:
space:
mode:
authorKukjin Kim <kgene.kim@samsung.com>2011-08-19 13:18:18 -0400
committerKukjin Kim <kgene.kim@samsung.com>2011-08-21 18:14:07 -0400
commitc06af3cc6a27991187fd513765fed943684d41bf (patch)
tree1bdcaab50fd7ba121218c8ee23f19df9caaf149b /arch/arm/plat-s3c24xx
parent93ee7a9340d64f20295aacc3fb6a22b759323280 (diff)
ARM: SAMSUNG: Add support for detecting CPU at runtime
The soc_is_[name]() can be used to distinguish cpu at runtime. This patch was originally from Changhwan Youn <chaos.youn@samsung.com> Acked-by: Changhwan Youn <chaos.youn@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-s3c24xx')
-rw-r--r--arch/arm/plat-s3c24xx/cpu.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c
index c1fc6c6fac72..ead21a4a7f8a 100644
--- a/arch/arm/plat-s3c24xx/cpu.c
+++ b/arch/arm/plat-s3c24xx/cpu.c
@@ -215,19 +215,17 @@ static void s3c24xx_pm_restart(char mode, const char *cmd)
215 215
216void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) 216void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
217{ 217{
218 unsigned long idcode = 0x0;
219
220 /* initialise the io descriptors we need for initialisation */ 218 /* initialise the io descriptors we need for initialisation */
221 iotable_init(mach_desc, size); 219 iotable_init(mach_desc, size);
222 iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc)); 220 iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc));
223 221
224 if (cpu_architecture() >= CPU_ARCH_ARMv5) { 222 if (cpu_architecture() >= CPU_ARCH_ARMv5) {
225 idcode = s3c24xx_read_idcode_v5(); 223 samsung_cpu_id = s3c24xx_read_idcode_v5();
226 } else { 224 } else {
227 idcode = s3c24xx_read_idcode_v4(); 225 samsung_cpu_id = s3c24xx_read_idcode_v4();
228 } 226 }
229 227
230 arm_pm_restart = s3c24xx_pm_restart; 228 arm_pm_restart = s3c24xx_pm_restart;
231 229
232 s3c_init_cpu(idcode, cpu_ids, ARRAY_SIZE(cpu_ids)); 230 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
233} 231}