ARM: S3C2410: Add S3C2410A sysdev.
authorBen Dooks <ben@simtec.co.uk>
Thu, 30 Jul 2009 22:23:38 +0000 (23:23 +0100)
committerBen Dooks <ben-linux@fluff.org>
Thu, 30 Jul 2009 22:22:55 +0000 (23:22 +0100)
Add a sysdev S3C2410A sysdev to allow the differentiation
of the S3C2410A from the S3C2410. This is needed for the
CPUFREQ code to enable the extra features and update cpu
specific information.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
arch/arm/mach-s3c2410/dma.c
arch/arm/mach-s3c2410/irq.c
arch/arm/mach-s3c2410/pm.c
arch/arm/mach-s3c2410/s3c2410.c
arch/arm/plat-s3c/include/plat/cpu.h
arch/arm/plat-s3c24xx/cpu.c
arch/arm/plat-s3c24xx/include/plat/s3c2410.h

index dbf96e6..63b753f 100644 (file)
@@ -164,6 +164,17 @@ static int __init s3c2410_dma_drvinit(void)
 }
 
 arch_initcall(s3c2410_dma_drvinit);
+
+static struct sysdev_driver s3c2410a_dma_driver = {
+       .add    = s3c2410_dma_add,
+};
+
+static int __init s3c2410a_dma_drvinit(void)
+{
+       return sysdev_driver_register(&s3c2410a_sysclass, &s3c2410a_dma_driver);
+}
+
+arch_initcall(s3c2410a_dma_drvinit);
 #endif
 
 #if defined(CONFIG_CPU_S3C2442)
index 9215039..5e2f353 100644 (file)
@@ -39,9 +39,22 @@ static struct sysdev_driver s3c2410_irq_driver = {
        .resume         = s3c24xx_irq_resume,
 };
 
-static int s3c2410_irq_init(void)
+static int __init s3c2410_irq_init(void)
 {
        return sysdev_driver_register(&s3c2410_sysclass, &s3c2410_irq_driver);
 }
 
 arch_initcall(s3c2410_irq_init);
+
+static struct sysdev_driver s3c2410a_irq_driver = {
+       .add            = s3c2410_irq_add,
+       .suspend        = s3c24xx_irq_suspend,
+       .resume         = s3c24xx_irq_resume,
+};
+
+static int __init s3c2410a_irq_init(void)
+{
+       return sysdev_driver_register(&s3c2410a_sysclass, &s3c2410a_irq_driver);
+}
+
+arch_initcall(s3c2410a_irq_init);
index 143e08a..966119c 100644 (file)
@@ -119,6 +119,18 @@ static int __init s3c2410_pm_drvinit(void)
 }
 
 arch_initcall(s3c2410_pm_drvinit);
+
+static struct sysdev_driver s3c2410a_pm_driver = {
+       .add            = s3c2410_pm_add,
+       .resume         = s3c2410_pm_resume,
+};
+
+static int __init s3c2410a_pm_drvinit(void)
+{
+       return sysdev_driver_register(&s3c2410a_sysclass, &s3c2410a_pm_driver);
+}
+
+arch_initcall(s3c2410a_pm_drvinit);
 #endif
 
 #if defined(CONFIG_CPU_S3C2440)
index feb141b..e5724a2 100644 (file)
@@ -116,6 +116,13 @@ struct sysdev_class s3c2410_sysclass = {
        .name = "s3c2410-core",
 };
 
+/* Note, we would have liked to name this s3c2410-core, but we cannot
+ * register two sysdev_class with the same name.
+ */
+struct sysdev_class s3c2410a_sysclass = {
+       .name = "s3c2410a-core",
+};
+
 static struct sys_device s3c2410_sysdev = {
        .cls            = &s3c2410_sysclass,
 };
@@ -133,9 +140,22 @@ static int __init s3c2410_core_init(void)
 
 core_initcall(s3c2410_core_init);
 
+static int __init s3c2410a_core_init(void)
+{
+       return sysdev_class_register(&s3c2410a_sysclass);
+}
+
+core_initcall(s3c2410a_core_init);
+
 int __init s3c2410_init(void)
 {
        printk("S3C2410: Initialising architecture\n");
 
        return sysdev_register(&s3c2410_sysdev);
 }
+
+int __init s3c2410a_init(void)
+{
+       s3c2410_sysdev.cls = &s3c2410a_sysclass;
+       return s3c2410_init();
+}
index be541cb..fbc3d49 100644 (file)
@@ -65,6 +65,7 @@ extern struct sys_timer s3c24xx_timer;
 /* system device classes */
 
 extern struct sysdev_class s3c2410_sysclass;
+extern struct sysdev_class s3c2410a_sysclass;
 extern struct sysdev_class s3c2412_sysclass;
 extern struct sysdev_class s3c2440_sysclass;
 extern struct sysdev_class s3c2442_sysclass;
index 1932b7e..5447e60 100644 (file)
@@ -81,7 +81,7 @@ static struct cpu_table cpu_ids[] __initdata = {
                .map_io         = s3c2410_map_io,
                .init_clocks    = s3c2410_init_clocks,
                .init_uarts     = s3c2410_init_uarts,
-               .init           = s3c2410_init,
+               .init           = s3c2410a_init,
                .name           = name_s3c2410a
        },
        {
index a9ac9e2..b6deeef 100644 (file)
@@ -14,6 +14,7 @@
 #ifdef CONFIG_CPU_S3C2410
 
 extern  int s3c2410_init(void);
+extern  int s3c2410a_init(void);
 
 extern void s3c2410_map_io(void);