diff options
author | Ben Dooks <ben-linux@fluff.org> | 2006-06-22 17:18:13 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-06-22 17:18:13 -0400 |
commit | a341305e94982c66a2e94125a24b860605da9066 (patch) | |
tree | 762cf31353b711f9ec12482d9823fa71a6ae18b8 | |
parent | 005b5e4d0c7795d2ec298c34c96cbe2c1e1902b0 (diff) |
[ARM] 3613/1: S3C2410: Add sysdev and sysclass
Patch from Ben Dooks
The S3C2440 and S3C2442 both have their own sysdev
and sysclass for differentiating them from the
currently default S3C2410.
Add a sysdev for the S3C2410 as part of the work
to make the code be non-dependant on the S3C2410.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/mach-s3c2410/cpu.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/s3c2410.c | 24 |
2 files changed, 24 insertions, 1 deletions
diff --git a/arch/arm/mach-s3c2410/cpu.h b/arch/arm/mach-s3c2410/cpu.h index 40862899b2f1..21c62dc29bb2 100644 --- a/arch/arm/mach-s3c2410/cpu.h +++ b/arch/arm/mach-s3c2410/cpu.h | |||
@@ -73,5 +73,6 @@ extern struct sys_timer s3c24xx_timer; | |||
73 | 73 | ||
74 | /* system device classes */ | 74 | /* system device classes */ |
75 | 75 | ||
76 | extern struct sysdev_class s3c2410_sysclass; | ||
76 | extern struct sysdev_class s3c2440_sysclass; | 77 | extern struct sysdev_class s3c2440_sysclass; |
77 | extern struct sysdev_class s3c2442_sysclass; | 78 | extern struct sysdev_class s3c2442_sysclass; |
diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c index 0852e87a79c4..cb252ddf3c77 100644 --- a/arch/arm/mach-s3c2410/s3c2410.c +++ b/arch/arm/mach-s3c2410/s3c2410.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/list.h> | 27 | #include <linux/list.h> |
28 | #include <linux/timer.h> | 28 | #include <linux/timer.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/sysdev.h> | ||
30 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
31 | 32 | ||
32 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
@@ -110,9 +111,30 @@ void __init s3c2410_init_clocks(int xtal) | |||
110 | s3c24xx_setup_clocks(xtal, fclk, hclk, pclk); | 111 | s3c24xx_setup_clocks(xtal, fclk, hclk, pclk); |
111 | } | 112 | } |
112 | 113 | ||
114 | struct sysdev_class s3c2410_sysclass = { | ||
115 | set_kset_name("s3c2410-core"), | ||
116 | }; | ||
117 | |||
118 | static struct sys_device s3c2410_sysdev = { | ||
119 | .cls = &s3c2410_sysclass, | ||
120 | }; | ||
121 | |||
122 | /* need to register class before we actually register the device, and | ||
123 | * we also need to ensure that it has been initialised before any of the | ||
124 | * drivers even try to use it (even if not on an s3c2440 based system) | ||
125 | * as a driver which may support both 2410 and 2440 may try and use it. | ||
126 | */ | ||
127 | |||
128 | static int __init s3c2410_core_init(void) | ||
129 | { | ||
130 | return sysdev_class_register(&s3c2410_sysclass); | ||
131 | } | ||
132 | |||
133 | core_initcall(s3c2410_core_init); | ||
134 | |||
113 | int __init s3c2410_init(void) | 135 | int __init s3c2410_init(void) |
114 | { | 136 | { |
115 | printk("S3C2410: Initialising architecture\n"); | 137 | printk("S3C2410: Initialising architecture\n"); |
116 | 138 | ||
117 | return 0; | 139 | return sysdev_register(&s3c2410_sysdev); |
118 | } | 140 | } |