lcdvideo.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * MPC823 LCD and Video Controller
  3. * Copyright (c) 1999 Dan Malek (dmalek@jlc.net)
  4. */
  5. #ifndef __LCDVIDEO_H__
  6. #define __LCDVIDEO_H__
  7. /* LCD Controller Configuration Register.
  8. */
  9. #define LCCR_BNUM ((uint)0xfffe0000)
  10. #define LCCR_EIEN ((uint)0x00010000)
  11. #define LCCR_IEN ((uint)0x00008000)
  12. #define LCCR_IRQL ((uint)0x00007000)
  13. #define LCCR_CLKP ((uint)0x00000800)
  14. #define LCCR_OEP ((uint)0x00000400)
  15. #define LCCR_HSP ((uint)0x00000200)
  16. #define LCCR_VSP ((uint)0x00000100)
  17. #define LCCR_DP ((uint)0x00000080)
  18. #define LCCR_BPIX ((uint)0x00000060)
  19. #define LCCR_LBW ((uint)0x00000010)
  20. #define LCCR_SPLT ((uint)0x00000008)
  21. #define LCCR_CLOR ((uint)0x00000004)
  22. #define LCCR_TFT ((uint)0x00000002)
  23. #define LCCR_PON ((uint)0x00000001)
  24. /* Define the bit shifts to load values into the register.
  25. */
  26. #define LCDBIT(BIT, VAL) ((VAL) << (31 - BIT))
  27. #define LCCR_BNUM_BIT ((uint)14)
  28. #define LCCR_EIEN_BIT ((uint)15)
  29. #define LCCR_IEN_BIT ((uint)16)
  30. #define LCCR_IROL_BIT ((uint)19)
  31. #define LCCR_CLKP_BIT ((uint)20)
  32. #define LCCR_OEP_BIT ((uint)21)
  33. #define LCCR_HSP_BIT ((uint)22)
  34. #define LCCR_VSP_BIT ((uint)23)
  35. #define LCCR_DP_BIT ((uint)24)
  36. #define LCCR_BPIX_BIT ((uint)26)
  37. #define LCCR_LBW_BIT ((uint)27)
  38. #define LCCR_SPLT_BIT ((uint)28)
  39. #define LCCR_CLOR_BIT ((uint)29)
  40. #define LCCR_TFT_BIT ((uint)30)
  41. #define LCCR_PON_BIT ((uint)31)
  42. /* LCD Horizontal control register.
  43. */
  44. #define LCHCR_BO ((uint)0x01000000)
  45. #define LCHCR_AT ((uint)0x00e00000)
  46. #define LCHCR_HPC ((uint)0x001ffc00)
  47. #define LCHCR_WBL ((uint)0x000003ff)
  48. #define LCHCR_AT_BIT ((uint)10)
  49. #define LCHCR_HPC_BIT ((uint)21)
  50. #define LCHCR_WBL_BIT ((uint)31)
  51. /* LCD Vertical control register.
  52. */
  53. #define LCVCR_VPW ((uint)0xf0000000)
  54. #define LCVCR_LCD_AC ((uint)0x01e00000)
  55. #define LCVCR_VPC ((uint)0x001ff800)
  56. #define LCVCR_WBF ((uint)0x000003ff)
  57. #define LCVCR_VPW_BIT ((uint)3)
  58. #define LCVCR_LCD_AC_BIT ((uint)10)
  59. #define LCVCR_VPC_BIT ((uint)20)
  60. #endif /* __LCDVIDEO_H__ */