vfp.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * arch/arm/include/asm/vfp.h
  3. *
  4. * VFP register definitions.
  5. * First, the standard VFP set.
  6. */
  7. #define FPSID cr0
  8. #define FPSCR cr1
  9. #define MVFR1 cr6
  10. #define MVFR0 cr7
  11. #define FPEXC cr8
  12. #define FPINST cr9
  13. #define FPINST2 cr10
  14. /* FPSID bits */
  15. #define FPSID_IMPLEMENTER_BIT (24)
  16. #define FPSID_IMPLEMENTER_MASK (0xff << FPSID_IMPLEMENTER_BIT)
  17. #define FPSID_SOFTWARE (1<<23)
  18. #define FPSID_FORMAT_BIT (21)
  19. #define FPSID_FORMAT_MASK (0x3 << FPSID_FORMAT_BIT)
  20. #define FPSID_NODOUBLE (1<<20)
  21. #define FPSID_ARCH_BIT (16)
  22. #define FPSID_ARCH_MASK (0x7F << FPSID_ARCH_BIT)
  23. #define FPSID_PART_BIT (8)
  24. #define FPSID_PART_MASK (0xFF << FPSID_PART_BIT)
  25. #define FPSID_VARIANT_BIT (4)
  26. #define FPSID_VARIANT_MASK (0xF << FPSID_VARIANT_BIT)
  27. #define FPSID_REV_BIT (0)
  28. #define FPSID_REV_MASK (0xF << FPSID_REV_BIT)
  29. /* FPEXC bits */
  30. #define FPEXC_EX (1 << 31)
  31. #define FPEXC_EN (1 << 30)
  32. #define FPEXC_DEX (1 << 29)
  33. #define FPEXC_FP2V (1 << 28)
  34. #define FPEXC_VV (1 << 27)
  35. #define FPEXC_TFV (1 << 26)
  36. #define FPEXC_LENGTH_BIT (8)
  37. #define FPEXC_LENGTH_MASK (7 << FPEXC_LENGTH_BIT)
  38. #define FPEXC_IDF (1 << 7)
  39. #define FPEXC_IXF (1 << 4)
  40. #define FPEXC_UFF (1 << 3)
  41. #define FPEXC_OFF (1 << 2)
  42. #define FPEXC_DZF (1 << 1)
  43. #define FPEXC_IOF (1 << 0)
  44. #define FPEXC_TRAP_MASK (FPEXC_IDF|FPEXC_IXF|FPEXC_UFF|FPEXC_OFF|FPEXC_DZF|FPEXC_IOF)
  45. /* FPSCR bits */
  46. #define FPSCR_DEFAULT_NAN (1<<25)
  47. #define FPSCR_FLUSHTOZERO (1<<24)
  48. #define FPSCR_ROUND_NEAREST (0<<22)
  49. #define FPSCR_ROUND_PLUSINF (1<<22)
  50. #define FPSCR_ROUND_MINUSINF (2<<22)
  51. #define FPSCR_ROUND_TOZERO (3<<22)
  52. #define FPSCR_RMODE_BIT (22)
  53. #define FPSCR_RMODE_MASK (3 << FPSCR_RMODE_BIT)
  54. #define FPSCR_STRIDE_BIT (20)
  55. #define FPSCR_STRIDE_MASK (3 << FPSCR_STRIDE_BIT)
  56. #define FPSCR_LENGTH_BIT (16)
  57. #define FPSCR_LENGTH_MASK (7 << FPSCR_LENGTH_BIT)
  58. #define FPSCR_IOE (1<<8)
  59. #define FPSCR_DZE (1<<9)
  60. #define FPSCR_OFE (1<<10)
  61. #define FPSCR_UFE (1<<11)
  62. #define FPSCR_IXE (1<<12)
  63. #define FPSCR_IDE (1<<15)
  64. #define FPSCR_IOC (1<<0)
  65. #define FPSCR_DZC (1<<1)
  66. #define FPSCR_OFC (1<<2)
  67. #define FPSCR_UFC (1<<3)
  68. #define FPSCR_IXC (1<<4)
  69. #define FPSCR_IDC (1<<7)
  70. /* MVFR0 bits */
  71. #define MVFR0_A_SIMD_BIT (0)
  72. #define MVFR0_A_SIMD_MASK (0xf << MVFR0_A_SIMD_BIT)
  73. /* Bit patterns for decoding the packaged operation descriptors */
  74. #define VFPOPDESC_LENGTH_BIT (9)
  75. #define VFPOPDESC_LENGTH_MASK (0x07 << VFPOPDESC_LENGTH_BIT)
  76. #define VFPOPDESC_UNUSED_BIT (24)
  77. #define VFPOPDESC_UNUSED_MASK (0xFF << VFPOPDESC_UNUSED_BIT)
  78. #define VFPOPDESC_OPDESC_MASK (~(VFPOPDESC_LENGTH_MASK | VFPOPDESC_UNUSED_MASK))
  79. #ifndef __ASSEMBLY__
  80. int vfp_pm_suspend(void);
  81. void vfp_pm_resume(void);
  82. #endif