summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s3c24xx
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2010-04-28 18:00:07 +0900
committerBen Dooks <ben-linux@fluff.org>2010-05-10 11:44:41 +0900
commitd11a7d7100123d178821f82ecc11ba2d9d6e97c8 (patch)
tree50e57fe2dc41cbd53b8985db45b77d269916816b /arch/arm/plat-s3c24xx
parentd24131470f3def698683144cf1e81ee0f4f9c0b8 (diff)
downloadop-kernel-dev-d11a7d7100123d178821f82ecc11ba2d9d6e97c8.zip
op-kernel-dev-d11a7d7100123d178821f82ecc11ba2d9d6e97c8.tar.gz
ARM: S3C24XX: Identify S3C2416 if S3C2412/S3C2413 built in
Extend the ARMv5 ID code to deal with S3C2416 being built with S3C2412/S3C2413 enabled, as these have their ID registers in a different place. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s3c24xx')
-rw-r--r--arch/arm/plat-s3c24xx/cpu.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c
index 494f4f3..32db856 100644
--- a/arch/arm/plat-s3c24xx/cpu.c
+++ b/arch/arm/plat-s3c24xx/cpu.c
@@ -181,10 +181,18 @@ static struct map_desc s3c_iodesc[] __initdata = {
static unsigned long s3c24xx_read_idcode_v5(void)
{
+#if defined(CONFIG_CPU_S3C2416)
+ /* s3c2416 is v5, with S3C24XX_GSTATUS1 instead of S3C2412_GSTATUS1 */
+
+ u32 gs = __raw_readl(S3C24XX_GSTATUS1);
+
+ /* test for s3c2416 or similar device */
+ if ((gs >> 16) == 0x3245)
+ return gs;
+#endif
+
#if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413)
return __raw_readl(S3C2412_GSTATUS1);
-#elif defined(CONFIG_CPU_S3C2416)
- return __raw_readl(S3C24XX_GSTATUS1);
#else
return 1UL; /* don't look like an 2400 */
#endif
OpenPOWER on IntegriCloud