aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s3c64xx/cpu.c')
-rw-r--r--arch/arm/mach-s3c64xx/cpu.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/arch/arm/mach-s3c64xx/cpu.c b/arch/arm/mach-s3c64xx/cpu.c
index 8dc05763a7eb..c7047838e112 100644
--- a/arch/arm/mach-s3c64xx/cpu.c
+++ b/arch/arm/mach-s3c64xx/cpu.c
@@ -44,16 +44,16 @@ static const char name_s3c6410[] = "S3C6410";
44 44
45static struct cpu_table cpu_ids[] __initdata = { 45static struct cpu_table cpu_ids[] __initdata = {
46 { 46 {
47 .idcode = 0x36400000, 47 .idcode = S3C6400_CPU_ID,
48 .idmask = 0xfffff000, 48 .idmask = S3C64XX_CPU_MASK,
49 .map_io = s3c6400_map_io, 49 .map_io = s3c6400_map_io,
50 .init_clocks = s3c6400_init_clocks, 50 .init_clocks = s3c6400_init_clocks,
51 .init_uarts = s3c6400_init_uarts, 51 .init_uarts = s3c6400_init_uarts,
52 .init = s3c6400_init, 52 .init = s3c6400_init,
53 .name = name_s3c6400, 53 .name = name_s3c6400,
54 }, { 54 }, {
55 .idcode = 0x36410100, 55 .idcode = S3C6410_CPU_ID,
56 .idmask = 0xffffff00, 56 .idmask = S3C64XX_CPU_MASK,
57 .map_io = s3c6410_map_io, 57 .map_io = s3c6410_map_io,
58 .init_clocks = s3c6410_init_clocks, 58 .init_clocks = s3c6410_init_clocks,
59 .init_uarts = s3c6410_init_uarts, 59 .init_uarts = s3c6410_init_uarts,
@@ -141,23 +141,15 @@ void __init s3c6400_common_init_uarts(struct s3c2410_uartcfg *cfg, int no)
141 141
142void __init s3c64xx_init_io(struct map_desc *mach_desc, int size) 142void __init s3c64xx_init_io(struct map_desc *mach_desc, int size)
143{ 143{
144 unsigned long idcode;
145
146 /* initialise the io descriptors we need for initialisation */ 144 /* initialise the io descriptors we need for initialisation */
147 iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc)); 145 iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc));
148 iotable_init(mach_desc, size); 146 iotable_init(mach_desc, size);
149 init_consistent_dma_size(SZ_8M); 147 init_consistent_dma_size(SZ_8M);
150 148
151 idcode = __raw_readl(S3C_VA_SYS + 0x118); 149 /* detect cpu id */
152 if (!idcode) { 150 s3c64xx_init_cpu();
153 /* S3C6400 has the ID register in a different place,
154 * and needs a write before it can be read. */
155
156 __raw_writel(0x0, S3C_VA_SYS + 0xA1C);
157 idcode = __raw_readl(S3C_VA_SYS + 0xA1C);
158 }
159 151
160 s3c_init_cpu(idcode, cpu_ids, ARRAY_SIZE(cpu_ids)); 152 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
161} 153}
162 154
163static __init int s3c64xx_sysdev_init(void) 155static __init int s3c64xx_sysdev_init(void)