sa1100fb.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * linux/drivers/video/sa1100fb.h
  3. * -- StrongARM 1100 LCD Controller Frame Buffer Device
  4. *
  5. * Copyright (C) 1999 Eric A. Thomas
  6. * Based on acornfb.c Copyright (C) Russell King.
  7. *
  8. * This file is subject to the terms and conditions of the GNU General Public
  9. * License. See the file COPYING in the main directory of this archive
  10. * for more details.
  11. */
  12. /* Shadows for LCD controller registers */
  13. struct sa1100fb_lcd_reg {
  14. unsigned long lccr0;
  15. unsigned long lccr1;
  16. unsigned long lccr2;
  17. unsigned long lccr3;
  18. };
  19. struct sa1100fb_info {
  20. struct fb_info fb;
  21. struct device *dev;
  22. const struct sa1100fb_rgb *rgb[NR_RGB];
  23. /*
  24. * These are the addresses we mapped
  25. * the framebuffer memory region to.
  26. */
  27. dma_addr_t map_dma;
  28. u_char * map_cpu;
  29. u_int map_size;
  30. u_char * screen_cpu;
  31. dma_addr_t screen_dma;
  32. u16 * palette_cpu;
  33. dma_addr_t palette_dma;
  34. u_int palette_size;
  35. dma_addr_t dbar1;
  36. dma_addr_t dbar2;
  37. u_int reg_lccr0;
  38. u_int reg_lccr1;
  39. u_int reg_lccr2;
  40. u_int reg_lccr3;
  41. volatile u_char state;
  42. volatile u_char task_state;
  43. struct mutex ctrlr_lock;
  44. wait_queue_head_t ctrlr_wait;
  45. struct work_struct task;
  46. #ifdef CONFIG_CPU_FREQ
  47. struct notifier_block freq_transition;
  48. struct notifier_block freq_policy;
  49. #endif
  50. const struct sa1100fb_mach_info *inf;
  51. };
  52. #define TO_INF(ptr,member) container_of(ptr,struct sa1100fb_info,member)
  53. #define SA1100_PALETTE_MODE_VAL(bpp) (((bpp) & 0x018) << 9)
  54. /*
  55. * These are the actions for set_ctrlr_state
  56. */
  57. #define C_DISABLE (0)
  58. #define C_ENABLE (1)
  59. #define C_DISABLE_CLKCHANGE (2)
  60. #define C_ENABLE_CLKCHANGE (3)
  61. #define C_REENABLE (4)
  62. #define C_DISABLE_PM (5)
  63. #define C_ENABLE_PM (6)
  64. #define C_STARTUP (7)
  65. #define SA1100_NAME "SA1100"
  66. /*
  67. * Minimum X and Y resolutions
  68. */
  69. #define MIN_XRES 64
  70. #define MIN_YRES 64