diff options
author | Amit Daniel Kachhap <amit.kachhap@linaro.org> | 2011-11-11 13:49:57 +0530 |
---|---|---|
committer | Amit Daniel Kachhap <amit.kachhap@linaro.org> | 2011-11-11 14:11:42 +0530 |
commit | e982cd3347519e59a7499644603f8402b02bcba8 (patch) | |
tree | d806f24df5f155c127623836786c6c9fbb7f6d06 | |
parent | 41518122dfdff24f5c4d60277af9b1162f0c7b6c (diff) |
ARM: EXYNOS4: Added function to read chip id
This adds a function to get the revision id. This is a temporary workaround patch
and may get dropped later.
Signed-off-by: Jaecheol Lee <jc.lee@samsung.com>
Signed-off-by: Changhwan Youn <chaos.youn@samsung.com>
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@linaro.org>
-rw-r--r-- | arch/arm/mach-exynos4/cpu.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/platsmp.c | 7 | ||||
-rw-r--r-- | arch/arm/plat-s5p/include/plat/exynos4.h | 1 |
3 files changed, 15 insertions, 2 deletions
diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c index 979fb5d4367..c1cb39df589 100644 --- a/arch/arm/mach-exynos4/cpu.c +++ b/arch/arm/mach-exynos4/cpu.c @@ -260,6 +260,15 @@ static int __init exynos4_l2x0_cache_init(void) early_initcall(exynos4_l2x0_cache_init); #endif +int exynos4_subrev(void) +{ + static int subrev = -1; + if (unlikely(subrev < 0)) + subrev = readl(S5P_VA_CHIPID) & 0xf; + + return subrev; +} + int __init exynos4_init(void) { printk(KERN_INFO "EXYNOS4: Initializing architecture\n"); diff --git a/arch/arm/mach-exynos4/platsmp.c b/arch/arm/mach-exynos4/platsmp.c index df6ef1b2f98..ca01370840d 100644 --- a/arch/arm/mach-exynos4/platsmp.c +++ b/arch/arm/mach-exynos4/platsmp.c @@ -30,9 +30,11 @@ #include <mach/regs-clock.h> #include <mach/regs-pmu.h> +#include <plat/exynos4.h> + extern void exynos4_secondary_startup(void); -#define CPU1_BOOT_REG S5P_VA_SYSRAM +#define CPU1_BOOT_REG (exynos4_subrev() == 0 ? S5P_VA_SYSRAM : S5P_INFORM5) /* * control for which core is the next to come out of the secondary @@ -218,5 +220,6 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus) * until it receives a soft interrupt, and then the * secondary CPU branches to this address. */ - __raw_writel(BSYM(virt_to_phys(exynos4_secondary_startup)), S5P_VA_SYSRAM); + __raw_writel(BSYM(virt_to_phys(exynos4_secondary_startup)), + CPU1_BOOT_REG); } diff --git a/arch/arm/plat-s5p/include/plat/exynos4.h b/arch/arm/plat-s5p/include/plat/exynos4.h index 907caab53dc..d62f7f74a80 100644 --- a/arch/arm/plat-s5p/include/plat/exynos4.h +++ b/arch/arm/plat-s5p/include/plat/exynos4.h @@ -15,6 +15,7 @@ extern void exynos4_common_init_uarts(struct s3c2410_uartcfg *cfg, int no); extern void exynos4_register_clocks(void); extern void exynos4_setup_clocks(void); +extern int exynos4_subrev(void); #ifdef CONFIG_CPU_EXYNOS4210 |