amba_clcd.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * Register definitions for the AMBA CLCD logic cell.
  3. *
  4. * derived from David A Rusling, although rearranged as a C structure
  5. * linux/include/asm-arm/hardware/amba_clcd.h -- Integrator LCD panel.
  6. *
  7. * Copyright (C) 2001 ARM Limited
  8. *
  9. * This file is subject to the terms and conditions of the GNU General Public
  10. * License. See the file COPYING in the main directory of this archive
  11. * for more details.
  12. */
  13. /*
  14. * CLCD Controller Internal Register addresses
  15. */
  16. struct clcd_registers {
  17. u32 tim0; /* 0x00 */
  18. u32 tim1;
  19. u32 tim2;
  20. u32 tim3;
  21. u32 ubas; /* 0x10 */
  22. u32 lbas;
  23. #if !defined(CONFIG_ARCH_VERSATILE) && !defined(CONFIG_ARCH_REALVIEW)
  24. u32 ienb;
  25. u32 cntl;
  26. #else /* Someone rearranged these two registers on the Versatile */
  27. u32 cntl;
  28. u32 ienb;
  29. #endif
  30. u32 stat; /* 0x20 */
  31. u32 intr;
  32. u32 ucur;
  33. u32 lcur;
  34. u32 unused[0x74]; /* 0x030..0x1ff */
  35. u32 palette[0x80]; /* 0x200..0x3ff */
  36. };
  37. /* Bit definition for TIM2 */
  38. #define TIM2_CLKSEL (1 << 5)
  39. #define TIM2_IVS (1 << 11)
  40. #define TIM2_IHS (1 << 12)
  41. #define TIM2_IPC (1 << 13)
  42. #define TIM2_IOE (1 << 14)
  43. #define TIM2_BCD (1 << 26)
  44. /* Bit definitions for control register */
  45. #define CNTL_LCDEN (1 << 0)
  46. #define CNTL_LCDBPP1 (0 << 1)
  47. #define CNTL_LCDBPP2 (1 << 1)
  48. #define CNTL_LCDBPP4 (2 << 1)
  49. #define CNTL_LCDBPP8 (3 << 1)
  50. #define CNTL_LCDBPP16 (4 << 1)
  51. #define CNTL_LCDBPP16_565 (6 << 1)
  52. #define CNTL_LCDBPP24 (5 << 1)
  53. #define CNTL_LCDBW (1 << 4)
  54. #define CNTL_LCDTFT (1 << 5)
  55. #define CNTL_LCDMONO8 (1 << 6)
  56. #define CNTL_LCDDUAL (1 << 7)
  57. #define CNTL_BGR (1 << 8)
  58. #define CNTL_BEBO (1 << 9)
  59. #define CNTL_BEPO (1 << 10)
  60. #define CNTL_LCDPWR (1 << 11)
  61. #define CNTL_LCDVCOMP(x) ((x) << 12)
  62. #define CNTL_LDMAFIFOTIME (1 << 15)
  63. #define CNTL_WATERMARK (1 << 16)
  64. /* u-boot specific: information passed by the board file */
  65. struct clcd_config {
  66. struct clcd_registers *address;
  67. u32 tim0;
  68. u32 tim1;
  69. u32 tim2;
  70. u32 tim3;
  71. u32 cntl;
  72. unsigned long pixclock;
  73. };