diff options
Diffstat (limited to 'arch/arm/plat-s3c64xx/cpu.c')
-rw-r--r-- | arch/arm/plat-s3c64xx/cpu.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c64xx/cpu.c b/arch/arm/plat-s3c64xx/cpu.c index 91f49a3a665d..b1fdd83940a6 100644 --- a/arch/arm/plat-s3c64xx/cpu.c +++ b/arch/arm/plat-s3c64xx/cpu.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/ioport.h> | 18 | #include <linux/ioport.h> |
19 | #include <linux/sysdev.h> | ||
19 | #include <linux/serial_core.h> | 20 | #include <linux/serial_core.h> |
20 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
21 | #include <linux/io.h> | 22 | #include <linux/io.h> |
@@ -101,9 +102,24 @@ static struct map_desc s3c_iodesc[] __initdata = { | |||
101 | .pfn = __phys_to_pfn(S3C64XX_PA_MODEM), | 102 | .pfn = __phys_to_pfn(S3C64XX_PA_MODEM), |
102 | .length = SZ_4K, | 103 | .length = SZ_4K, |
103 | .type = MT_DEVICE, | 104 | .type = MT_DEVICE, |
105 | }, { | ||
106 | .virtual = (unsigned long)S3C_VA_WATCHDOG, | ||
107 | .pfn = __phys_to_pfn(S3C64XX_PA_WATCHDOG), | ||
108 | .length = SZ_4K, | ||
109 | .type = MT_DEVICE, | ||
104 | }, | 110 | }, |
105 | }; | 111 | }; |
106 | 112 | ||
113 | |||
114 | struct sysdev_class s3c64xx_sysclass = { | ||
115 | .name = "s3c64xx-core", | ||
116 | }; | ||
117 | |||
118 | static struct sys_device s3c64xx_sysdev = { | ||
119 | .cls = &s3c64xx_sysclass, | ||
120 | }; | ||
121 | |||
122 | |||
107 | /* read cpu identification code */ | 123 | /* read cpu identification code */ |
108 | 124 | ||
109 | void __init s3c64xx_init_io(struct map_desc *mach_desc, int size) | 125 | void __init s3c64xx_init_io(struct map_desc *mach_desc, int size) |
@@ -115,5 +131,21 @@ void __init s3c64xx_init_io(struct map_desc *mach_desc, int size) | |||
115 | iotable_init(mach_desc, size); | 131 | iotable_init(mach_desc, size); |
116 | 132 | ||
117 | idcode = __raw_readl(S3C_VA_SYS + 0x118); | 133 | idcode = __raw_readl(S3C_VA_SYS + 0x118); |
134 | if (!idcode) { | ||
135 | /* S3C6400 has the ID register in a different place, | ||
136 | * and needs a write before it can be read. */ | ||
137 | |||
138 | __raw_writel(0x0, S3C_VA_SYS + 0xA1C); | ||
139 | idcode = __raw_readl(S3C_VA_SYS + 0xA1C); | ||
140 | } | ||
141 | |||
118 | s3c_init_cpu(idcode, cpu_ids, ARRAY_SIZE(cpu_ids)); | 142 | s3c_init_cpu(idcode, cpu_ids, ARRAY_SIZE(cpu_ids)); |
119 | } | 143 | } |
144 | |||
145 | static __init int s3c64xx_sysdev_init(void) | ||
146 | { | ||
147 | sysdev_class_register(&s3c64xx_sysclass); | ||
148 | return sysdev_register(&s3c64xx_sysdev); | ||
149 | } | ||
150 | |||
151 | core_initcall(s3c64xx_sysdev_init); | ||