aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx/include/mach/cpu.h
diff options
context:
space:
mode:
authorKrzysztof Hałasa <khc@pm.waw.pl>2009-03-17 08:51:52 -0400
committerKrzysztof Hałasa <khc@pm.waw.pl>2009-03-17 10:01:45 -0400
commitde3ce856d67b770f7d546e3f3e6a3972deb319a8 (patch)
tree14767aa43d54a80b3a6b90e6188e2b5bd04d651d /arch/arm/mach-ixp4xx/include/mach/cpu.h
parent5ca328d24d25fa2c8d2aa33cb85116695be11070 (diff)
IXP4xx: cpu_is_ixp4*() now recognizes all IXP4xx processors.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Diffstat (limited to 'arch/arm/mach-ixp4xx/include/mach/cpu.h')
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/cpu.h35
1 files changed, 20 insertions, 15 deletions
diff --git a/arch/arm/mach-ixp4xx/include/mach/cpu.h b/arch/arm/mach-ixp4xx/include/mach/cpu.h
index 51bd69c46d94..def7773be67c 100644
--- a/arch/arm/mach-ixp4xx/include/mach/cpu.h
+++ b/arch/arm/mach-ixp4xx/include/mach/cpu.h
@@ -17,26 +17,31 @@
17#include <asm/cputype.h> 17#include <asm/cputype.h>
18 18
19/* Processor id value in CP15 Register 0 */ 19/* Processor id value in CP15 Register 0 */
20#define IXP425_PROCESSOR_ID_VALUE 0x690541c0 20#define IXP42X_PROCESSOR_ID_VALUE 0x690541c0 /* including unused 0x690541Ex */
21#define IXP435_PROCESSOR_ID_VALUE 0x69054040 21#define IXP42X_PROCESSOR_ID_MASK 0xffffffc0
22#define IXP465_PROCESSOR_ID_VALUE 0x69054200 22
23#define IXP4XX_PROCESSOR_ID_MASK 0xfffffff0 23#define IXP43X_PROCESSOR_ID_VALUE 0x69054040
24 24#define IXP43X_PROCESSOR_ID_MASK 0xfffffff0
25#define cpu_is_ixp42x() ((read_cpuid_id() & IXP4XX_PROCESSOR_ID_MASK) == \ 25
26 IXP425_PROCESSOR_ID_VALUE) 26#define IXP46X_PROCESSOR_ID_VALUE 0x69054200 /* including IXP455 */
27#define cpu_is_ixp43x() ((read_cpuid_id() & IXP4XX_PROCESSOR_ID_MASK) == \ 27#define IXP46X_PROCESSOR_ID_MASK 0xfffffff0
28 IXP435_PROCESSOR_ID_VALUE) 28
29#define cpu_is_ixp46x() ((read_cpuid_id() & IXP4XX_PROCESSOR_ID_MASK) == \ 29#define cpu_is_ixp42x() ((read_cpuid_id() & IXP42X_PROCESSOR_ID_MASK) == \
30 IXP465_PROCESSOR_ID_VALUE) 30 IXP42X_PROCESSOR_ID_VALUE)
31#define cpu_is_ixp43x() ((read_cpuid_id() & IXP43X_PROCESSOR_ID_MASK) == \
32 IXP43X_PROCESSOR_ID_VALUE)
33#define cpu_is_ixp46x() ((read_cpuid_id() & IXP46X_PROCESSOR_ID_MASK) == \
34 IXP46X_PROCESSOR_ID_VALUE)
31 35
32static inline u32 ixp4xx_read_feature_bits(void) 36static inline u32 ixp4xx_read_feature_bits(void)
33{ 37{
34 unsigned int val = ~*IXP4XX_EXP_CFG2; 38 unsigned int val = ~*IXP4XX_EXP_CFG2;
35 val &= ~IXP4XX_FEATURE_RESERVED;
36 if (!cpu_is_ixp46x())
37 val &= ~IXP4XX_FEATURE_IXP46X_ONLY;
38 39
39 return val; 40 if (cpu_is_ixp42x())
41 return val & IXP42X_FEATURE_MASK;
42 if (cpu_is_ixp43x())
43 return val & IXP43X_FEATURE_MASK;
44 return val & IXP46X_FEATURE_MASK;
40} 45}
41 46
42static inline void ixp4xx_write_feature_bits(u32 value) 47static inline void ixp4xx_write_feature_bits(u32 value)