From f9a8316a851d7086405e9993c4ecf0cb39cc4d82 Mon Sep 17 00:00:00 2001 From: Dima Zavin Date: Wed, 4 Apr 2012 09:27:37 -0700 Subject: [PATCH] --- yaml --- r: 298717 b: refs/heads/master c: 6aa51068f58022ca616fad40b6773a1de50599f0 h: refs/heads/master i: 298715: 56d4a36a6452f97b229a8c27111e42609d44c34e v: v3 --- [refs] | 2 +- .../arm/mach-exynos/include/mach/uncompress.h | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index cc8693a847b7..7d26ade3c1b4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fd9abe1b5beafe776c51507dac32486f627c6ad8 +refs/heads/master: 6aa51068f58022ca616fad40b6773a1de50599f0 diff --git a/trunk/arch/arm/mach-exynos/include/mach/uncompress.h b/trunk/arch/arm/mach-exynos/include/mach/uncompress.h index 493f4f365ddf..2979995d5a6a 100644 --- a/trunk/arch/arm/mach-exynos/include/mach/uncompress.h +++ b/trunk/arch/arm/mach-exynos/include/mach/uncompress.h @@ -20,9 +20,24 @@ volatile u8 *uart_base; #include +static unsigned int __raw_readl(unsigned int ptr) +{ + return *((volatile unsigned int *)ptr); +} + static void arch_detect_cpu(void) { - if (machine_is_smdk5250()) + u32 chip_id = __raw_readl(EXYNOS_PA_CHIPID); + + /* + * product_id is bits 31:12 + * bits 23:20 describe the exynosX family + * + */ + chip_id >>= 20; + chip_id &= 0xf; + + if (chip_id == 0x5) uart_base = (volatile u8 *)EXYNOS5_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT); else uart_base = (volatile u8 *)EXYNOS4_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);