Message ID | 1331707332-11709-1-git-send-email-chander.kashyap@linaro.org |
---|---|
State | Rejected |
Headers | show |
Dear Chander Kashyap, On 14 March 2012 15:42, Chander Kashyap <chander.kashyap@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@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.
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; \ } IS_SAMSUNG_TYPE(exynos4, 0xc210)
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@linaro.org> --- arch/arm/include/asm/arch-exynos/cpu.h | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)