sed13806.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. * (C) Copyright 2002
  3. * Stäubli Faverges - <www.staubli.com>
  4. * Pierre AUBERT p.aubert@staubli.com
  5. *
  6. * See file CREDITS for list of people who contributed to this
  7. * project.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of
  12. * the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  22. * MA 02111-1307 USA
  23. */
  24. /* Video support for Epson SED13806 chipset */
  25. #ifndef _SED13806_H_
  26. #define _SED13806_H_
  27. /* General definitions */
  28. #define FRAME_BUFFER_OFFSET 0x200000 /* Frame buffer offset */
  29. #define TOTAL_SPACE_SIZE 0x400000
  30. #define DEFAULT_VIDEO_MEMORY_SIZE 0x140000 /* Video Memory Size */
  31. #define HWCURSORSIZE 1024 /* Size of memory reserved
  32. for HW cursor*/
  33. /* Offset of chipset registers */
  34. #define BLT_CTRL0 (0x0100)
  35. #define BLT_CTRL1 (0x0101)
  36. #define BLT_ROP (0x0102)
  37. #define BLT_OP (0x0103)
  38. #define BLT_SRC_ADDR0 (0x0104)
  39. #define BLT_SRC_ADDR1 (0x0105)
  40. #define BLT_SRC_ADDR2 (0x0106)
  41. #define BLT_DST_ADDR0 (0x0108)
  42. #define BLT_DST_ADDR1 (0x0109)
  43. #define BLT_DST_ADDR2 (0x010A)
  44. #define BLT_MEM_OFF0 (0x010C)
  45. #define BLT_MEM_OFF1 (0x010D)
  46. #define BLT_WIDTH0 (0x0110)
  47. #define BLT_WIDTH1 (0x0111)
  48. #define BLT_HEIGHT0 (0x0112)
  49. #define BLT_HEIGHT1 (0x0113)
  50. #define BLT_BGCOLOR0 (0x0114)
  51. #define BLT_BGCOLOR1 (0x0115)
  52. #define BLT_FGCOLOR0 (0x0118)
  53. #define BLT_FGCOLOR1 (0x0119)
  54. #define BLT_REG (0x100000)
  55. /* Lookup table registers */
  56. #define REG_LUT_ADDR 0x1e2
  57. #define REG_LUT_DATA 0x1e4
  58. /* Cursor/Ink registers */
  59. #define LCD_CURSOR_CNTL (0x0070)
  60. #define LCD_CURSOR_START (0x0071)
  61. #define LCD_CURSOR_XL (0x0072)
  62. #define LCD_CURSOR_XM (0x0073)
  63. #define LCD_CURSOR_YL (0x0074)
  64. #define LCD_CURSOR_YM (0x0075)
  65. #define LCD_CURSOR_COL0_B (0x0076)
  66. #define LCD_CURSOR_COL0_G (0x0077)
  67. #define LCD_CURSOR_COL0_R (0x0078)
  68. #define LCD_CURSOR_COL1_B (0x007A)
  69. #define LCD_CURSOR_COL1_G (0x007B)
  70. #define LCD_CURSOR_COL1_R (0x007C)
  71. #define LCD_CURSOR_FIFO (0x007E)
  72. typedef struct
  73. {
  74. unsigned short Index;
  75. unsigned char Value;
  76. } S1D_REGS;
  77. /* Board specific functions */
  78. unsigned int board_video_init (void);
  79. void board_validate_screen (unsigned int base);
  80. const S1D_REGS *board_get_regs (void);
  81. int board_get_width (void);
  82. int board_get_height (void);
  83. #endif /* _SED13806_H_ */