pxafb.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * linux/include/asm-arm/arch-pxa/pxafb.h
  3. *
  4. * Support for the xscale frame buffer.
  5. *
  6. * Author: Jean-Frederic Clere
  7. * Created: Sep 22, 2003
  8. * Copyright: jfclere@sinix.net
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. */
  14. #include <linux/fb.h>
  15. /*
  16. * This structure describes the machine which we are running on.
  17. * It is set in linux/arch/arm/mach-pxa/machine_name.c and used in the probe routine
  18. * of linux/drivers/video/pxafb.c
  19. */
  20. struct pxafb_mode_info {
  21. u_long pixclock;
  22. u_short xres;
  23. u_short yres;
  24. u_char bpp;
  25. u_char hsync_len;
  26. u_char left_margin;
  27. u_char right_margin;
  28. u_char vsync_len;
  29. u_char upper_margin;
  30. u_char lower_margin;
  31. u_char sync;
  32. u_int cmap_greyscale:1,
  33. unused:31;
  34. };
  35. struct pxafb_mach_info {
  36. struct pxafb_mode_info *modes;
  37. unsigned int num_modes;
  38. u_int fixed_modes:1,
  39. cmap_inverse:1,
  40. cmap_static:1,
  41. unused:29;
  42. /* The following should be defined in LCCR0
  43. * LCCR0_Act or LCCR0_Pas Active or Passive
  44. * LCCR0_Sngl or LCCR0_Dual Single/Dual panel
  45. * LCCR0_Mono or LCCR0_Color Mono/Color
  46. * LCCR0_4PixMono or LCCR0_8PixMono (in mono single mode)
  47. * LCCR0_DMADel(Tcpu) (optional) DMA request delay
  48. *
  49. * The following should not be defined in LCCR0:
  50. * LCCR0_OUM, LCCR0_BM, LCCR0_QDM, LCCR0_DIS, LCCR0_EFM
  51. * LCCR0_IUM, LCCR0_SFM, LCCR0_LDM, LCCR0_ENB
  52. */
  53. u_int lccr0;
  54. /* The following should be defined in LCCR3
  55. * LCCR3_OutEnH or LCCR3_OutEnL Output enable polarity
  56. * LCCR3_PixRsEdg or LCCR3_PixFlEdg Pixel clock edge type
  57. * LCCR3_Acb(X) AB Bias pin frequency
  58. * LCCR3_DPC (optional) Double Pixel Clock mode (untested)
  59. *
  60. * The following should not be defined in LCCR3
  61. * LCCR3_HSP, LCCR3_VSP, LCCR0_Pcd(x), LCCR3_Bpp
  62. */
  63. u_int lccr3;
  64. /* The following should be defined in LCCR4
  65. * LCCR4_PAL_FOR_0 or LCCR4_PAL_FOR_1 or LCCR4_PAL_FOR_2
  66. *
  67. * All other bits in LCCR4 should be left alone.
  68. */
  69. u_int lccr4;
  70. void (*pxafb_backlight_power)(int);
  71. void (*pxafb_lcd_power)(int, struct fb_var_screeninfo *);
  72. };
  73. void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info);
  74. void set_pxa_fb_parent(struct device *parent_dev);
  75. unsigned long pxafb_get_hsync_time(struct device *dev);