[U-Boot] [PATCH] EXYNOS: Detect cpuid based on Exynos product codes
Minkyu Kang
promsoft at gmail.com
Wed Mar 28 04:54:41 CEST 2012
Dear Chander Kashyap,
On 14 March 2012 15:42, Chander Kashyap <chander.kashyap at linaro.org> wrote:
> Exynos based SoC's have two different naming conventions.
> One is S5PC_XXXX and other is EXXX_XXXX. This patch adds
> generic code to handle EXXX_XXXX connvention.
>
> Signed-off-by: Chander Kashyap <chander.kashyap at linaro.org>
> ---
> arch/arm/include/asm/arch-exynos/cpu.h | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h
> index 89f2c2e..da89ccf 100644
> --- a/arch/arm/include/asm/arch-exynos/cpu.h
> +++ b/arch/arm/include/asm/arch-exynos/cpu.h
> @@ -105,10 +105,13 @@ static inline void s5p_set_cpu_id(void)
> }
> }
>
> +#define EXYNOS_ID ((readl(EXYNOS4_PRO_ID) & (0xF << 24)) >> 24)
> #define IS_SAMSUNG_TYPE(type, id) \
> static inline int cpu_is_##type(void) \
> { \
> - return s5p_cpu_id == id ? 1 : 0; \
> + return ((s5p_cpu_id == id) \
> + || (EXYNOS_ID == (#type[sizeof(#type) - 2] - '0'))) \
> + ? 1 : 0; \
> }
>
Sorry, I can't understand this patch.
What is it for?
Thanks.
Minkyu Kang.
--
from. prom.
www.promsoft.net
More information about the U-Boot
mailing list