blob: 795047da5e17e28cc0f433209a4d5afc48284ca2 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef __ASM_SH_BUGS_H
2#define __ASM_SH_BUGS_H
3
4/*
5 * This is included by init/main.c to check for architecture-dependent bugs.
6 *
7 * Needs:
8 * void check_bugs(void);
9 */
10
11/*
12 * I don't know of any Super-H bugs yet.
13 */
14
15#include <asm/processor.h>
16
17static void __init check_bugs(void)
18{
19 extern char *get_cpu_subtype(void);
20 extern unsigned long loops_per_jiffy;
Serge E. Hallyn96b644b2006-10-02 02:18:13 -070021 char *p= &init_utsname()->machine[2]; /* "sh" */
Linus Torvalds1da177e2005-04-16 15:20:36 -070022
23 cpu_data->loops_per_jiffy = loops_per_jiffy;
24
25 switch (cpu_data->type) {
Yoshinori Satob2296322006-11-05 16:18:08 +090026 case CPU_SH7604 ... CPU_SH7619:
Linus Torvalds1da177e2005-04-16 15:20:36 -070027 *p++ = '2';
28 break;
Yoshinori Satob2296322006-11-05 16:18:08 +090029 case CPU_SH7206:
30 *p++ = '2';
31 *p++ = 'a';
32 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -070033 case CPU_SH7705 ... CPU_SH7300:
34 *p++ = '3';
35 break;
36 case CPU_SH7750 ... CPU_SH4_501:
37 *p++ = '4';
38 break;
Paul Mundtb552c7e2006-11-20 14:14:29 +090039 case CPU_SH7770 ... CPU_SH7785:
Paul Mundt5b19c902006-09-27 14:31:40 +090040 *p++ = '4';
41 *p++ = 'a';
42 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -070043 default:
44 *p++ = '?';
45 *p++ = '!';
46 break;
47 }
48
49 printk("CPU: %s\n", get_cpu_subtype());
50
51#ifndef __LITTLE_ENDIAN__
52 /* 'eb' means 'Endian Big' */
53 *p++ = 'e';
54 *p++ = 'b';
55#endif
56 *p = '\0';
57}
58#endif /* __ASM_SH_BUGS_H */