Skip to content

Commit

Permalink
[ARM] S3C64XX: Add generic s3c64xx sys device.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Dooks committed May 7, 2009
1 parent 0abfe9a commit 1deb507
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm/plat-s3c/include/plat/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,5 @@ extern struct sysdev_class s3c2440_sysclass;
extern struct sysdev_class s3c2442_sysclass;
extern struct sysdev_class s3c2443_sysclass;
extern struct sysdev_class s3c6410_sysclass;
extern struct sysdev_class s3c64xx_sysclass;

19 changes: 19 additions & 0 deletions arch/arm/plat-s3c64xx/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/sysdev.h>
#include <linux/serial_core.h>
#include <linux/platform_device.h>
#include <linux/io.h>
Expand Down Expand Up @@ -104,6 +105,16 @@ static struct map_desc s3c_iodesc[] __initdata = {
},
};


struct sysdev_class s3c64xx_sysclass = {
.name = "s3c64xx-core",
};

static struct sys_device s3c64xx_sysdev = {
.cls = &s3c64xx_sysclass,
};


/* read cpu identification code */

void __init s3c64xx_init_io(struct map_desc *mach_desc, int size)
Expand All @@ -117,3 +128,11 @@ void __init s3c64xx_init_io(struct map_desc *mach_desc, int size)
idcode = __raw_readl(S3C_VA_SYS + 0x118);
s3c_init_cpu(idcode, cpu_ids, ARRAY_SIZE(cpu_ids));
}

static __init int s3c64xx_sysdev_init(void)
{
sysdev_class_register(&s3c64xx_sysclass);
return sysdev_register(&s3c64xx_sysdev);
}

core_initcall(s3c64xx_sysdev_init);

0 comments on commit 1deb507

Please sign in to comment.