From 1fc533f027a5b1c1d412ef70b5348bce1a37aef2 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Thu, 15 Dec 2011 11:41:09 +0100 Subject: [PATCH] --- yaml --- r: 281762 b: refs/heads/master c: d5608bbf81987375ced3802374b145e148140b33 h: refs/heads/master v: v3 --- [refs] | 2 +- .../arm/mach-ux500/include/mach/hardware.h | 10 ++++---- trunk/arch/arm/mach-ux500/include/mach/id.h | 24 +++++++++++++++++++ 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 7993485ef860..23d1762f43d8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 41c34ae49ec3e48b22591a83386dfd2bfdb45ff6 +refs/heads/master: d5608bbf81987375ced3802374b145e148140b33 diff --git a/trunk/arch/arm/mach-ux500/include/mach/hardware.h b/trunk/arch/arm/mach-ux500/include/mach/hardware.h index 470ac52663d6..b6ba26a1367d 100644 --- a/trunk/arch/arm/mach-ux500/include/mach/hardware.h +++ b/trunk/arch/arm/mach-ux500/include/mach/hardware.h @@ -10,20 +10,21 @@ #ifndef __MACH_HARDWARE_H #define __MACH_HARDWARE_H -/* macros to get at IO space when running virtually +/* + * Macros to get at IO space when running virtually * We dont map all the peripherals, let ioremap do * this for us. We map only very basic peripherals here. */ #define U8500_IO_VIRTUAL 0xf0000000 #define U8500_IO_PHYSICAL 0xa0000000 -/* this macro is used in assembly, so no cast */ +/* This macro is used in assembly, so no cast */ #define IO_ADDRESS(x) \ (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + U8500_IO_VIRTUAL) /* typesafe io address */ #define __io_address(n) __io(IO_ADDRESS(n)) -/* used by some plat-nomadik code */ +/* Used by some plat-nomadik code */ #define io_p2v(n) __io_address(n) #include @@ -36,6 +37,5 @@ extern void __iomem *_PRCMU_BASE; #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) -#endif - +#endif /* __ASSEMBLY__ */ #endif /* __MACH_HARDWARE_H */ diff --git a/trunk/arch/arm/mach-ux500/include/mach/id.h b/trunk/arch/arm/mach-ux500/include/mach/id.h index 02b541a37ee5..833d6a6edc9b 100644 --- a/trunk/arch/arm/mach-ux500/include/mach/id.h +++ b/trunk/arch/arm/mach-ux500/include/mach/id.h @@ -46,6 +46,30 @@ static inline bool __attribute_const__ cpu_is_u5500(void) return dbx500_partnumber() == 0x5500; } +/* + * 5500 revisions + */ + +static inline bool __attribute_const__ cpu_is_u5500v1(void) +{ + return cpu_is_u5500() && (dbx500_revision() & 0xf0) == 0xA0; +} + +static inline bool __attribute_const__ cpu_is_u5500v2(void) +{ + return (dbx500_id.revision & 0xf0) == 0xB0; +} + +static inline bool __attribute_const__ cpu_is_u5500v20(void) +{ + return cpu_is_u5500() && ((dbx500_revision() & 0xf0) == 0xB0); +} + +static inline bool __attribute_const__ cpu_is_u5500v21(void) +{ + return cpu_is_u5500() && (dbx500_revision() == 0xB1); +} + /* * 8500 revisions */