2 * DaVinci CPU type detection
4 * Author: Kevin Hilman, Deep Root Systems, LLC
6 * Defines the cpu_is_*() macros for runtime detection of DaVinci
7 * device type. In addtion, if support for a given device is not
8 * compiled in to the kernel, the macros return 0 so that
9 * resulting code can be optimized out.
11 * 2009 (c) Deep Root Systems, LLC. This file is licensed under
12 * the terms of the GNU General Public License version 2. This program
13 * is licensed "as is" without any warranty of any kind, whether express
16 #ifndef _ASM_ARCH_CPU_H
17 #define _ASM_ARCH_CPU_H
19 #include <mach/common.h>
22 u8 variant; /* JTAG ID bits 31:28 */
23 u16 part_no; /* JTAG ID bits 27:12 */
24 u16 manufacturer; /* JTAG ID bits 11:1 */
29 /* Can use lower 16 bits of cpu id for a variant when required */
30 #define DAVINCI_CPU_ID_DM6446 0x64460000
31 #define DAVINCI_CPU_ID_DM6467 0x64670000
32 #define DAVINCI_CPU_ID_DM355 0x03550000
34 #define IS_DAVINCI_CPU(type, id) \
35 static inline int is_davinci_ ##type(void) \
37 return (davinci_soc_info.cpu_id == (id)); \
40 IS_DAVINCI_CPU(dm644x, DAVINCI_CPU_ID_DM6446)
41 IS_DAVINCI_CPU(dm646x, DAVINCI_CPU_ID_DM6467)
42 IS_DAVINCI_CPU(dm355, DAVINCI_CPU_ID_DM355)
44 #ifdef CONFIG_ARCH_DAVINCI_DM644x
45 #define cpu_is_davinci_dm644x() is_davinci_dm644x()
47 #define cpu_is_davinci_dm644x() 0
50 #ifdef CONFIG_ARCH_DAVINCI_DM646x
51 #define cpu_is_davinci_dm646x() is_davinci_dm646x()
53 #define cpu_is_davinci_dm646x() 0
56 #ifdef CONFIG_ARCH_DAVINCI_DM355
57 #define cpu_is_davinci_dm355() is_davinci_dm355()
59 #define cpu_is_davinci_dm355() 0