eppi.h 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * Enhanced PPI (EPPI)
  3. */
  4. #ifndef __BFIN_PERIPHERAL_EPPI__
  5. #define __BFIN_PERIPHERAL_EPPI__
  6. /* Bit masks for EPPIx_STATUS */
  7. #define CFIFO_ERR 0x0001 /* Chroma FIFO Error */
  8. #define YFIFO_ERR 0x0002 /* Luma FIFO Error */
  9. #define LTERR_OVR 0x0004 /* Line Track Overflow */
  10. #define LTERR_UNDR 0x0008 /* Line Track Underflow */
  11. #define FTERR_OVR 0x0010 /* Frame Track Overflow */
  12. #define FTERR_UNDR 0x0020 /* Frame Track Underflow */
  13. #define ERR_NCOR 0x0040 /* Preamble Error Not Corrected */
  14. #define DMA1URQ 0x0080 /* DMA1 Urgent Request */
  15. #define DMA0URQ 0x0100 /* DMA0 Urgent Request */
  16. #define ERR_DET 0x4000 /* Preamble Error Detected */
  17. #define FLD 0x8000 /* Field */
  18. /* Bit masks for EPPIx_CONTROL */
  19. #define EPPI_EN 0x00000001 /* Enable */
  20. #define EPPI_DIR 0x00000002 /* Direction */
  21. #define XFR_TYPE 0x0000000c /* Operating Mode */
  22. #define FS_CFG 0x00000030 /* Frame Sync Configuration */
  23. #define FLD_SEL 0x00000040 /* Field Select/Trigger */
  24. #define ITU_TYPE 0x00000080 /* ITU Interlaced or Progressive */
  25. #define BLANKGEN 0x00000100 /* ITU Output Mode with Internal Blanking Generation */
  26. #define ICLKGEN 0x00000200 /* Internal Clock Generation */
  27. #define IFSGEN 0x00000400 /* Internal Frame Sync Generation */
  28. #define POLC 0x00001800 /* Frame Sync and Data Driving/Sampling Edges */
  29. #define POLS 0x00006000 /* Frame Sync Polarity */
  30. #define DLENGTH 0x00038000 /* Data Length */
  31. #define SKIP_EN 0x00040000 /* Skip Enable */
  32. #define SKIP_EO 0x00080000 /* Skip Even or Odd */
  33. #define PACKEN 0x00100000 /* Packing/Unpacking Enable */
  34. #define SWAPEN 0x00200000 /* Swap Enable */
  35. #define SIGN_EXT 0x00400000 /* Sign Extension or Zero-filled / Data Split Format */
  36. #define SPLT_EVEN_ODD 0x00800000 /* Split Even and Odd Data Samples */
  37. #define SUBSPLT_ODD 0x01000000 /* Sub-split Odd Samples */
  38. #define DMACFG 0x02000000 /* One or Two DMA Channels Mode */
  39. #define RGB_FMT_EN 0x04000000 /* RGB Formatting Enable */
  40. #define FIFO_RWM 0x18000000 /* FIFO Regular Watermarks */
  41. #define FIFO_UWM 0x60000000 /* FIFO Urgent Watermarks */
  42. #define DLEN_8 (0 << 15) /* 000 - 8 bits */
  43. #define DLEN_10 (1 << 15) /* 001 - 10 bits */
  44. #define DLEN_12 (2 << 15) /* 010 - 12 bits */
  45. #define DLEN_14 (3 << 15) /* 011 - 14 bits */
  46. #define DLEN_16 (4 << 15) /* 100 - 16 bits */
  47. #define DLEN_18 (5 << 15) /* 101 - 18 bits */
  48. #define DLEN_24 (6 << 15) /* 110 - 24 bits */
  49. /* Bit masks for EPPIx_FS2W_LVB */
  50. #define F1VB_BD 0x000000ff /* Vertical Blanking before Field 1 Active Data */
  51. #define F1VB_AD 0x0000ff00 /* Vertical Blanking after Field 1 Active Data */
  52. #define F2VB_BD 0x00ff0000 /* Vertical Blanking before Field 2 Active Data */
  53. #define F2VB_AD 0xff000000 /* Vertical Blanking after Field 2 Active Data */
  54. /* Bit masks for EPPIx_FS2W_LAVF */
  55. #define F1_ACT 0x0000ffff /* Number of Lines of Active Data in Field 1 */
  56. #define F2_ACT 0xffff0000 /* Number of Lines of Active Data in Field 2 */
  57. /* Bit masks for EPPIx_CLIP */
  58. #define LOW_ODD 0x000000ff /* Lower Limit for Odd Bytes (Chroma) */
  59. #define HIGH_ODD 0x0000ff00 /* Upper Limit for Odd Bytes (Chroma) */
  60. #define LOW_EVEN 0x00ff0000 /* Lower Limit for Even Bytes (Luma) */
  61. #define HIGH_EVEN 0xff000000 /* Upper Limit for Even Bytes (Luma) */
  62. #endif