cputype.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef __ASM_MACH_CPUTYPE_H
  2. #define __ASM_MACH_CPUTYPE_H
  3. #include <asm/cputype.h>
  4. /*
  5. * CPU Stepping CPU_ID CHIP_ID
  6. *
  7. * PXA168 S0 0x56158400 0x0000C910
  8. * PXA168 A0 0x56158400 0x00A0A168
  9. * PXA910 Y1 0x56158400 0x00F2C920
  10. * PXA910 A0 0x56158400 0x00F2C910
  11. * PXA910 A1 0x56158400 0x00A0C910
  12. * PXA920 Y0 0x56158400 0x00F2C920
  13. * PXA920 A0 0x56158400 0x00A0C920
  14. * PXA920 A1 0x56158400 0x00A1C920
  15. * MMP2 Z0 0x560f5811 0x00F00410
  16. * MMP2 Z1 0x560f5811 0x00E00410
  17. * MMP2 A0 0x560f5811 0x00A0A610
  18. */
  19. extern unsigned int mmp_chip_id;
  20. #ifdef CONFIG_CPU_PXA168
  21. static inline int cpu_is_pxa168(void)
  22. {
  23. return (((read_cpuid_id() >> 8) & 0xff) == 0x84) &&
  24. ((mmp_chip_id & 0xfff) == 0x168);
  25. }
  26. #else
  27. #define cpu_is_pxa168() (0)
  28. #endif
  29. /* cpu_is_pxa910() is shared on both pxa910 and pxa920 */
  30. #ifdef CONFIG_CPU_PXA910
  31. static inline int cpu_is_pxa910(void)
  32. {
  33. return (((read_cpuid_id() >> 8) & 0xff) == 0x84) &&
  34. (((mmp_chip_id & 0xfff) == 0x910) ||
  35. ((mmp_chip_id & 0xfff) == 0x920));
  36. }
  37. #else
  38. #define cpu_is_pxa910() (0)
  39. #endif
  40. #ifdef CONFIG_CPU_MMP2
  41. static inline int cpu_is_mmp2(void)
  42. {
  43. return (((read_cpuid_id() >> 8) & 0xff) == 0x58);
  44. }
  45. #else
  46. #define cpu_is_mmp2() (0)
  47. #endif
  48. #endif /* __ASM_MACH_CPUTYPE_H */