Skip to content

Commit

Permalink
ARM: S3C24XX: Identify S3C2416 if S3C2412/S3C2413 built in
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Dooks committed May 10, 2010
1 parent d241314 commit d11a7d7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions arch/arm/plat-s3c24xx/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d11a7d7

Please sign in to comment.