From 468ce3cc2527fa657d5b740aa5c39c7fcf1c8cfc Mon Sep 17 00:00:00 2001 From: Virupax Sadashivpetimath Date: Mon, 26 Sep 2011 19:33:17 +0530 Subject: mach-ux500: Add db8520 cpu type Add cpu_is_db8520() function. ST Ericsson ID: 353334 ST Ericsson FOSS-OUT ID: Trivial ST Ericsson Linux next: NA Change-Id: I17f2e9c58de48ad04729f9283be2b0d9dfe04e25 Signed-off-by: Virupax Sadashivpetimath Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31936 Reviewed-by: Rabin VINCENT --- arch/arm/mach-ux500/include/mach/id.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-ux500/include/mach/id.h b/arch/arm/mach-ux500/include/mach/id.h index dfebed948cf..6f669eebc04 100644 --- a/arch/arm/mach-ux500/include/mach/id.h +++ b/arch/arm/mach-ux500/include/mach/id.h @@ -39,7 +39,17 @@ static inline unsigned int __attribute_const__ dbx500_revision(void) static inline bool __attribute_const__ cpu_is_u8500(void) { #ifdef CONFIG_UX500_SOC_DB8500 - return dbx500_partnumber() == 0x8500; + /* partnumber 8520 also comes under 8500 */ + return ((dbx500_partnumber() >> 8) & 0xff) == 0x85; +#else + return false; +#endif +} + +static inline bool __attribute_const__ cpu_is_u8520(void) +{ +#ifdef CONFIG_UX500_SOC_DB8500 + return dbx500_partnumber() == 0x8520; #else return false; #endif -- cgit v1.2.3