xref: /openbmc/linux/arch/sh/include/asm/processor.h (revision fa43972fab24a3c050e880a7831f9378c6cebc0b)
1f15cbe6fSPaul Mundt #ifndef __ASM_SH_PROCESSOR_H
2f15cbe6fSPaul Mundt #define __ASM_SH_PROCESSOR_H
3f15cbe6fSPaul Mundt 
4f15cbe6fSPaul Mundt #include <asm/cpu-features.h>
5f15cbe6fSPaul Mundt #include <asm/segment.h>
6f15cbe6fSPaul Mundt 
7f15cbe6fSPaul Mundt #ifndef __ASSEMBLY__
8f15cbe6fSPaul Mundt /*
9f15cbe6fSPaul Mundt  *  CPU type and hardware bug flags. Kept separately for each CPU.
10f15cbe6fSPaul Mundt  *
11f15cbe6fSPaul Mundt  *  Each one of these also needs a CONFIG_CPU_SUBTYPE_xxx entry
12f15cbe6fSPaul Mundt  *  in arch/sh/mm/Kconfig, as well as an entry in arch/sh/kernel/setup.c
13f15cbe6fSPaul Mundt  *  for parsing the subtype in get_cpu_subtype().
14f15cbe6fSPaul Mundt  */
15f15cbe6fSPaul Mundt enum cpu_type {
16f15cbe6fSPaul Mundt 	/* SH-2 types */
17f15cbe6fSPaul Mundt 	CPU_SH7619,
18f15cbe6fSPaul Mundt 
19f15cbe6fSPaul Mundt 	/* SH-2A types */
20f15cbe6fSPaul Mundt 	CPU_SH7203, CPU_SH7206, CPU_SH7263, CPU_MXG,
21f15cbe6fSPaul Mundt 
22f15cbe6fSPaul Mundt 	/* SH-3 types */
23f15cbe6fSPaul Mundt 	CPU_SH7705, CPU_SH7706, CPU_SH7707,
24f15cbe6fSPaul Mundt 	CPU_SH7708, CPU_SH7708S, CPU_SH7708R,
25f15cbe6fSPaul Mundt 	CPU_SH7709, CPU_SH7709A, CPU_SH7710, CPU_SH7712,
26f15cbe6fSPaul Mundt 	CPU_SH7720, CPU_SH7721, CPU_SH7729,
27f15cbe6fSPaul Mundt 
28f15cbe6fSPaul Mundt 	/* SH-4 types */
29f15cbe6fSPaul Mundt 	CPU_SH7750, CPU_SH7750S, CPU_SH7750R, CPU_SH7751, CPU_SH7751R,
30f15cbe6fSPaul Mundt 	CPU_SH7760, CPU_SH4_202, CPU_SH4_501,
31f15cbe6fSPaul Mundt 
32f15cbe6fSPaul Mundt 	/* SH-4A types */
33f15cbe6fSPaul Mundt 	CPU_SH7763, CPU_SH7770, CPU_SH7780, CPU_SH7781, CPU_SH7785,
34f15cbe6fSPaul Mundt 	CPU_SH7723, CPU_SHX3,
35f15cbe6fSPaul Mundt 
36f15cbe6fSPaul Mundt 	/* SH4AL-DSP types */
37f15cbe6fSPaul Mundt 	CPU_SH7343, CPU_SH7722, CPU_SH7366,
38f15cbe6fSPaul Mundt 
39f15cbe6fSPaul Mundt 	/* SH-5 types */
40f15cbe6fSPaul Mundt         CPU_SH5_101, CPU_SH5_103,
41f15cbe6fSPaul Mundt 
42f15cbe6fSPaul Mundt 	/* Unknown subtype */
43f15cbe6fSPaul Mundt 	CPU_SH_NONE
44f15cbe6fSPaul Mundt };
45f15cbe6fSPaul Mundt 
46f15cbe6fSPaul Mundt /* Forward decl */
47f15cbe6fSPaul Mundt struct sh_cpuinfo;
48*fa43972fSPaul Mundt struct seq_operations;
49*fa43972fSPaul Mundt 
50*fa43972fSPaul Mundt extern struct pt_regs fake_swapper_regs;
51f15cbe6fSPaul Mundt 
52f15cbe6fSPaul Mundt /* arch/sh/kernel/setup.c */
53f15cbe6fSPaul Mundt const char *get_cpu_subtype(struct sh_cpuinfo *c);
54*fa43972fSPaul Mundt extern const struct seq_operations cpuinfo_op;
55f15cbe6fSPaul Mundt 
56f15cbe6fSPaul Mundt #ifdef CONFIG_VSYSCALL
57f15cbe6fSPaul Mundt int vsyscall_init(void);
58f15cbe6fSPaul Mundt #else
59f15cbe6fSPaul Mundt #define vsyscall_init() do { } while (0)
60f15cbe6fSPaul Mundt #endif
61f15cbe6fSPaul Mundt 
62f15cbe6fSPaul Mundt #endif /* __ASSEMBLY__ */
63f15cbe6fSPaul Mundt 
64f15cbe6fSPaul Mundt #ifdef CONFIG_SUPERH32
65f15cbe6fSPaul Mundt # include "processor_32.h"
66f15cbe6fSPaul Mundt #else
67f15cbe6fSPaul Mundt # include "processor_64.h"
68f15cbe6fSPaul Mundt #endif
69f15cbe6fSPaul Mundt 
70f15cbe6fSPaul Mundt #endif /* __ASM_SH_PROCESSOR_H */
71