diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-12-11 19:24:31 -0500 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2009-05-07 06:04:56 -0400 |
commit | 1deb507dc7612e6c81b7953e827d1c859c1d8c0b (patch) | |
tree | 7ef632398ff6b1391a21b2892e82d0cce52e5f23 /arch/arm/plat-s3c64xx | |
parent | 0abfe9aab1867abd96b44a425ad27ce021891e4f (diff) |
[ARM] S3C64XX: Add generic s3c64xx sys device.
Add an s3c64xx_sysclass and device for items that currently
want to bind to any s3c64xx processor. The first user of this
will be parts of the s3c64xx suspend support which need to
save device state over suspend/resume.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s3c64xx')
-rw-r--r-- | arch/arm/plat-s3c64xx/cpu.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c64xx/cpu.c b/arch/arm/plat-s3c64xx/cpu.c index 91f49a3a665d..f9fdaab32ab4 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> |
@@ -104,6 +105,16 @@ static struct map_desc s3c_iodesc[] __initdata = { | |||
104 | }, | 105 | }, |
105 | }; | 106 | }; |
106 | 107 | ||
108 | |||
109 | struct sysdev_class s3c64xx_sysclass = { | ||
110 | .name = "s3c64xx-core", | ||
111 | }; | ||
112 | |||
113 | static struct sys_device s3c64xx_sysdev = { | ||
114 | .cls = &s3c64xx_sysclass, | ||
115 | }; | ||
116 | |||
117 | |||
107 | /* read cpu identification code */ | 118 | /* read cpu identification code */ |
108 | 119 | ||
109 | void __init s3c64xx_init_io(struct map_desc *mach_desc, int size) | 120 | void __init s3c64xx_init_io(struct map_desc *mach_desc, int size) |
@@ -117,3 +128,11 @@ void __init s3c64xx_init_io(struct map_desc *mach_desc, int size) | |||
117 | idcode = __raw_readl(S3C_VA_SYS + 0x118); | 128 | idcode = __raw_readl(S3C_VA_SYS + 0x118); |
118 | s3c_init_cpu(idcode, cpu_ids, ARRAY_SIZE(cpu_ids)); | 129 | s3c_init_cpu(idcode, cpu_ids, ARRAY_SIZE(cpu_ids)); |
119 | } | 130 | } |
131 | |||
132 | static __init int s3c64xx_sysdev_init(void) | ||
133 | { | ||
134 | sysdev_class_register(&s3c64xx_sysclass); | ||
135 | return sysdev_register(&s3c64xx_sysdev); | ||
136 | } | ||
137 | |||
138 | core_initcall(s3c64xx_sysdev_init); | ||