bugs.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #ifndef __ASM_SH_BUGS_H
  2. #define __ASM_SH_BUGS_H
  3. /*
  4. * This is included by init/main.c to check for architecture-dependent bugs.
  5. *
  6. * Needs:
  7. * void check_bugs(void);
  8. */
  9. /*
  10. * I don't know of any Super-H bugs yet.
  11. */
  12. #include <asm/processor.h>
  13. extern void select_idle_routine(void);
  14. static void __init check_bugs(void)
  15. {
  16. extern unsigned long loops_per_jiffy;
  17. char *p = &init_utsname()->machine[2]; /* "sh" */
  18. select_idle_routine();
  19. current_cpu_data.loops_per_jiffy = loops_per_jiffy;
  20. switch (current_cpu_data.family) {
  21. case CPU_FAMILY_SH2:
  22. *p++ = '2';
  23. break;
  24. case CPU_FAMILY_SH2A:
  25. *p++ = '2';
  26. *p++ = 'a';
  27. break;
  28. case CPU_FAMILY_SH3:
  29. *p++ = '3';
  30. break;
  31. case CPU_FAMILY_SH4:
  32. *p++ = '4';
  33. break;
  34. case CPU_FAMILY_SH4A:
  35. *p++ = '4';
  36. *p++ = 'a';
  37. break;
  38. case CPU_FAMILY_SH4AL_DSP:
  39. *p++ = '4';
  40. *p++ = 'a';
  41. *p++ = 'l';
  42. *p++ = '-';
  43. *p++ = 'd';
  44. *p++ = 's';
  45. *p++ = 'p';
  46. break;
  47. case CPU_FAMILY_SH5:
  48. *p++ = '6';
  49. *p++ = '4';
  50. break;
  51. case CPU_FAMILY_UNKNOWN:
  52. /*
  53. * Specifically use CPU_FAMILY_UNKNOWN rather than
  54. * default:, so we're able to have the compiler whine
  55. * about unhandled enumerations.
  56. */
  57. break;
  58. }
  59. printk("CPU: %s\n", get_cpu_subtype(&current_cpu_data));
  60. #ifndef __LITTLE_ENDIAN__
  61. /* 'eb' means 'Endian Big' */
  62. *p++ = 'e';
  63. *p++ = 'b';
  64. #endif
  65. *p = '\0';
  66. }
  67. #endif /* __ASM_SH_BUGS_H */