2 * arch/arm/mach-ixp4xx/include/mach/cpu.h
4 * IXP4XX cpu type detection
6 * Copyright (C) 2007 MontaVista Software, Inc.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
14 #ifndef __ASM_ARCH_CPU_H__
15 #define __ASM_ARCH_CPU_H__
17 #include <asm/cputype.h>
19 /* Processor id value in CP15 Register 0 */
20 #define IXP425_PROCESSOR_ID_VALUE 0x690541c0
21 #define IXP435_PROCESSOR_ID_VALUE 0x69054040
22 #define IXP465_PROCESSOR_ID_VALUE 0x69054200
23 #define IXP4XX_PROCESSOR_ID_MASK 0xfffffff0
25 #define cpu_is_ixp42x() ((read_cpuid_id() & IXP4XX_PROCESSOR_ID_MASK) == \
26 IXP425_PROCESSOR_ID_VALUE)
27 #define cpu_is_ixp43x() ((read_cpuid_id() & IXP4XX_PROCESSOR_ID_MASK) == \
28 IXP435_PROCESSOR_ID_VALUE)
29 #define cpu_is_ixp46x() ((read_cpuid_id() & IXP4XX_PROCESSOR_ID_MASK) == \
30 IXP465_PROCESSOR_ID_VALUE)
32 static inline u32 ixp4xx_read_feature_bits(void)
34 unsigned int val = ~*IXP4XX_EXP_CFG2;
35 val &= ~IXP4XX_FEATURE_RESERVED;
37 val &= ~IXP4XX_FEATURE_IXP46X_ONLY;
42 static inline void ixp4xx_write_feature_bits(u32 value)
44 *IXP4XX_EXP_CFG2 = ~value;
47 #endif /* _ASM_ARCH_CPU_H */