From 1deb507dc7612e6c81b7953e827d1c859c1d8c0b Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Fri, 12 Dec 2008 00:24:31 +0000 Subject: [ARM] S3C64XX: Add generic s3c64xx sys device. 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 --- arch/arm/plat-s3c64xx/cpu.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'arch/arm/plat-s3c64xx/cpu.c') diff --git a/arch/arm/plat-s3c64xx/cpu.c b/arch/arm/plat-s3c64xx/cpu.c index 91f49a3a665..f9fdaab32ab 100644 --- a/arch/arm/plat-s3c64xx/cpu.c +++ b/arch/arm/plat-s3c64xx/cpu.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -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) @@ -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); -- cgit v1.2.3-18-g5258 From e074f9803227236252c8e7be16d836d709abff57 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 24 Mar 2009 17:31:42 +0000 Subject: [ARM] S3C64XX: Add S3C6400 CPU detection. Add detection support for the S3C6400 SoC which has it's id register in a different place to the S3C6410. Signed-off-by: Ben Dooks --- arch/arm/plat-s3c64xx/cpu.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/arm/plat-s3c64xx/cpu.c') diff --git a/arch/arm/plat-s3c64xx/cpu.c b/arch/arm/plat-s3c64xx/cpu.c index f9fdaab32ab..19f68b5f0d3 100644 --- a/arch/arm/plat-s3c64xx/cpu.c +++ b/arch/arm/plat-s3c64xx/cpu.c @@ -126,6 +126,14 @@ void __init s3c64xx_init_io(struct map_desc *mach_desc, int size) iotable_init(mach_desc, size); idcode = __raw_readl(S3C_VA_SYS + 0x118); + if (!idcode) { + /* S3C6400 has the ID register in a different place, + * and needs a write before it can be read. */ + + __raw_writel(0x0, S3C_VA_SYS + 0xA1C); + idcode = __raw_readl(S3C_VA_SYS + 0xA1C); + } + s3c_init_cpu(idcode, cpu_ids, ARRAY_SIZE(cpu_ids)); } -- cgit v1.2.3-18-g5258 From 543899f610799426babb5313682fd9c249e34677 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Sun, 17 May 2009 23:40:30 +0100 Subject: [ARM] S3C64XX: Use common watchdog reset for system reset. Use the newly moved to perform the arch_reset() call which has been unimplemented for a while. Signed-off-by: Ben Dooks --- arch/arm/plat-s3c64xx/cpu.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/arm/plat-s3c64xx/cpu.c') diff --git a/arch/arm/plat-s3c64xx/cpu.c b/arch/arm/plat-s3c64xx/cpu.c index 19f68b5f0d3..b1fdd83940a 100644 --- a/arch/arm/plat-s3c64xx/cpu.c +++ b/arch/arm/plat-s3c64xx/cpu.c @@ -102,6 +102,11 @@ static struct map_desc s3c_iodesc[] __initdata = { .pfn = __phys_to_pfn(S3C64XX_PA_MODEM), .length = SZ_4K, .type = MT_DEVICE, + }, { + .virtual = (unsigned long)S3C_VA_WATCHDOG, + .pfn = __phys_to_pfn(S3C64XX_PA_WATCHDOG), + .length = SZ_4K, + .type = MT_DEVICE, }, }; -- cgit v1.2.3-18-g5258