Skip to content

Commit

Permalink
ARM: S3C2410: Add S3C2410A sysdev.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Dooks authored and Ben Dooks committed Jul 30, 2009
1 parent 140780a commit f017679
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 2 deletions.
11 changes: 11 additions & 0 deletions arch/arm/mach-s3c2410/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 14 additions & 1 deletion arch/arm/mach-s3c2410/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
12 changes: 12 additions & 0 deletions arch/arm/mach-s3c2410/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
20 changes: 20 additions & 0 deletions arch/arm/mach-s3c2410/s3c2410.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand All @@ -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();
}
1 change: 1 addition & 0 deletions arch/arm/plat-s3c/include/plat/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/plat-s3c24xx/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
{
Expand Down
1 change: 1 addition & 0 deletions arch/arm/plat-s3c24xx/include/plat/s3c2410.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#ifdef CONFIG_CPU_S3C2410

extern int s3c2410_init(void);
extern int s3c2410a_init(void);

extern void s3c2410_map_io(void);

Expand Down

0 comments on commit f017679

Please sign in to comment.