Patchwork [U-Boot,v3] ARCH: EXYNOS: add support to match product id

login
register
mail settings
Submitter Chander Kashyap
Date Oct. 15, 2012, 1:06 p.m.
Message ID <1350306392-5273-1-git-send-email-chander.kashyap@linaro.org>
Download mbox | patch
Permalink /patch/191559/
State Accepted
Delegated to: Minkyu Kang
Headers show

Comments

Chander Kashyap - Oct. 15, 2012, 1:06 p.m.
From: Minkyu Kang <mk7.kang@samsung.com>

Based upon single SoC there can be multiple variants.
This patch add support to match the complete product ID.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
---
Changes from v1:
	- Author name changed
Changes from v2:
	- Fixed typo
 arch/arm/include/asm/arch-exynos/cpu.h |    9 +++++++++
 1 file changed, 9 insertions(+)
Minkyu Kang - Oct. 26, 2012, 8:18 a.m.
On 15 October 2012 22:06, Chander Kashyap <chander.kashyap@linaro.org> wrote:
> From: Minkyu Kang <mk7.kang@samsung.com>
>
> Based upon single SoC there can be multiple variants.
> This patch add support to match the complete product ID.
>
> Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
> ---
> Changes from v1:
>         - Author name changed
> Changes from v2:
>         - Fixed typo
>  arch/arm/include/asm/arch-exynos/cpu.h |    9 +++++++++
>  1 file changed, 9 insertions(+)
>

applied to u-boot-samsung.

Patch

diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h
index 2cd4ae1..2bde10c 100644
--- a/arch/arm/include/asm/arch-exynos/cpu.h
+++ b/arch/arm/include/asm/arch-exynos/cpu.h
@@ -139,6 +139,15 @@  static inline int cpu_is_##type(void)			\
 IS_SAMSUNG_TYPE(exynos4, 0x4)
 IS_SAMSUNG_TYPE(exynos5, 0x5)
 
+#define IS_EXYNOS_TYPE(type, id)			\
+static inline int proid_is_##type(void)			\
+{							\
+	return s5p_cpu_id == id;			\
+}
+
+IS_EXYNOS_TYPE(exynos4210, 0x4210)
+IS_EXYNOS_TYPE(exynos5250, 0x5250)
+
 #define SAMSUNG_BASE(device, base)				\
 static inline unsigned int samsung_get_base_##device(void)	\
 {								\