bugs.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. static void __init check_bugs(void)
  14. {
  15. extern unsigned long loops_per_jiffy;
  16. char *p = &init_utsname()->machine[2]; /* "sh" */
  17. current_cpu_data.loops_per_jiffy = loops_per_jiffy;
  18. switch (current_cpu_data.family) {
  19. case CPU_FAMILY_SH2:
  20. *p++ = '2';
  21. break;
  22. case CPU_FAMILY_SH2A:
  23. *p++ = '2';
  24. *p++ = 'a';
  25. break;
  26. case CPU_FAMILY_SH3:
  27. *p++ = '3';
  28. break;
  29. case CPU_FAMILY_SH4:
  30. *p++ = '4';
  31. break;
  32. case CPU_FAMILY_SH4A:
  33. *p++ = '4';
  34. *p++ = 'a';
  35. break;
  36. case CPU_FAMILY_SH4AL_DSP:
  37. *p++ = '4';
  38. *p++ = 'a';
  39. *p++ = 'l';
  40. *p++ = '-';
  41. *p++ = 'd';
  42. *p++ = 's';
  43. *p++ = 'p';
  44. break;
  45. case CPU_FAMILY_SH5:
  46. *p++ = '6';
  47. *p++ = '4';
  48. break;
  49. case CPU_FAMILY_UNKNOWN:
  50. /*
  51. * Specifically use CPU_FAMILY_UNKNOWN rather than
  52. * default:, so we're able to have the compiler whine
  53. * about unhandled enumerations.
  54. */
  55. break;
  56. }
  57. printk("CPU: %s\n", get_cpu_subtype(&current_cpu_data));
  58. #ifndef __LITTLE_ENDIAN__
  59. /* 'eb' means 'Endian Big' */
  60. *p++ = 'e';
  61. *p++ = 'b';
  62. #endif
  63. *p = '\0';
  64. }
  65. #endif /* __ASM_SH_BUGS_H */