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 dbf96e60d99263dacc501094705aa1fe12caaa90..63b753f56c643ccbe303ff97bfc33952e088185e 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 92150399563bdddabab2cd7ec3ca2da4fc2514b7..5e2f35332056e26e9a5f682a1bfd6ed9be68616a 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 143e08a599d4097e0e47ea243ed7d34f3e2cf085..966119c8efee1316dcc383ca0461eebada857991 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 feb141b1f915bf131622b6388ce69901e9636797..e5724a22c35896eb9657fc9e75aad3aec3fa35ca 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 be541cbba0708d0e152233013a6ab2fa27428424..fbc3d498e02ec24ca4fa64dc28fd05fecde15cce 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 1932b7e0da15cd878f1579bc24be869c90c6c9a5..5447e60f3936550c5bf13a08d40b6a6d0ebafb06 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 a9ac9e29759e0d0900594cf1c06b93ec4ad11d1e..b6deeef8f6637d62c5e50387164a4db0ae1578d0 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);
 
This page took 0.049575 seconds and 5 git commands to generate.