video-imxfb.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * This structure describes the machine which we are running on.
  3. */
  4. #ifndef __MACH_IMXFB_H__
  5. #define __MACH_IMXFB_H__
  6. #include <linux/fb.h>
  7. #define PCR_TFT (1 << 31)
  8. #define PCR_COLOR (1 << 30)
  9. #define PCR_PBSIZ_1 (0 << 28)
  10. #define PCR_PBSIZ_2 (1 << 28)
  11. #define PCR_PBSIZ_4 (2 << 28)
  12. #define PCR_PBSIZ_8 (3 << 28)
  13. #define PCR_BPIX_1 (0 << 25)
  14. #define PCR_BPIX_2 (1 << 25)
  15. #define PCR_BPIX_4 (2 << 25)
  16. #define PCR_BPIX_8 (3 << 25)
  17. #define PCR_BPIX_12 (4 << 25)
  18. #define PCR_BPIX_16 (5 << 25)
  19. #define PCR_BPIX_18 (6 << 25)
  20. #define PCR_PIXPOL (1 << 24)
  21. #define PCR_FLMPOL (1 << 23)
  22. #define PCR_LPPOL (1 << 22)
  23. #define PCR_CLKPOL (1 << 21)
  24. #define PCR_OEPOL (1 << 20)
  25. #define PCR_SCLKIDLE (1 << 19)
  26. #define PCR_END_SEL (1 << 18)
  27. #define PCR_END_BYTE_SWAP (1 << 17)
  28. #define PCR_REV_VS (1 << 16)
  29. #define PCR_ACD_SEL (1 << 15)
  30. #define PCR_ACD(x) (((x) & 0x7f) << 8)
  31. #define PCR_SCLK_SEL (1 << 7)
  32. #define PCR_SHARP (1 << 6)
  33. #define PCR_PCD(x) ((x) & 0x3f)
  34. #define PWMR_CLS(x) (((x) & 0x1ff) << 16)
  35. #define PWMR_LDMSK (1 << 15)
  36. #define PWMR_SCR1 (1 << 10)
  37. #define PWMR_SCR0 (1 << 9)
  38. #define PWMR_CC_EN (1 << 8)
  39. #define PWMR_PW(x) ((x) & 0xff)
  40. #define LSCR1_PS_RISE_DELAY(x) (((x) & 0x7f) << 26)
  41. #define LSCR1_CLS_RISE_DELAY(x) (((x) & 0x3f) << 16)
  42. #define LSCR1_REV_TOGGLE_DELAY(x) (((x) & 0xf) << 8)
  43. #define LSCR1_GRAY2(x) (((x) & 0xf) << 4)
  44. #define LSCR1_GRAY1(x) (((x) & 0xf))
  45. #define DMACR_BURST (1 << 31)
  46. #define DMACR_HM(x) (((x) & 0xf) << 16)
  47. #define DMACR_TM(x) ((x) & 0xf)
  48. struct imx_fb_videomode {
  49. struct fb_videomode mode;
  50. u32 pcr;
  51. unsigned char bpp;
  52. };
  53. struct imx_fb_platform_data {
  54. struct imx_fb_videomode *mode;
  55. int num_modes;
  56. u_int pwmr;
  57. u_int lscr1;
  58. u_int dmacr;
  59. int (*init)(struct platform_device *);
  60. void (*exit)(struct platform_device *);
  61. };
  62. #endif /* ifndef __MACH_IMXFB_H__ */