gdsys_fpga.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /*
  2. * (C) Copyright 2010
  3. * Dirk Eibach, Guntermann & Drunck GmbH, eibach@gdsys.de
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #ifndef __GDSYS_FPGA_H
  8. #define __GDSYS_FPGA_H
  9. int init_func_fpga(void);
  10. enum {
  11. FPGA_STATE_DONE_FAILED = 1 << 0,
  12. FPGA_STATE_REFLECTION_FAILED = 1 << 1,
  13. FPGA_STATE_PLATFORM = 1 << 2,
  14. };
  15. int get_fpga_state(unsigned dev);
  16. void print_fpga_state(unsigned dev);
  17. struct ihs_gpio {
  18. u16 read;
  19. u16 clear;
  20. u16 set;
  21. };
  22. struct ihs_i2c {
  23. u16 write_mailbox;
  24. u16 write_mailbox_ext;
  25. u16 read_mailbox;
  26. u16 read_mailbox_ext;
  27. };
  28. struct ihs_osd {
  29. u16 version;
  30. u16 features;
  31. u16 control;
  32. u16 xy_size;
  33. u16 xy_scale;
  34. u16 x_pos;
  35. u16 y_pos;
  36. };
  37. #ifdef CONFIG_NEO
  38. struct ihs_fpga {
  39. u16 reflection_low; /* 0x0000 */
  40. u16 versions; /* 0x0002 */
  41. u16 fpga_features; /* 0x0004 */
  42. u16 fpga_version; /* 0x0006 */
  43. u16 reserved_0[8187]; /* 0x0008 */
  44. u16 reflection_high; /* 0x3ffe */
  45. };
  46. #endif
  47. #ifdef CONFIG_IO
  48. struct ihs_fpga {
  49. u16 reflection_low; /* 0x0000 */
  50. u16 versions; /* 0x0002 */
  51. u16 fpga_features; /* 0x0004 */
  52. u16 fpga_version; /* 0x0006 */
  53. u16 reserved_0[5]; /* 0x0008 */
  54. u16 quad_serdes_reset; /* 0x0012 */
  55. u16 reserved_1[8181]; /* 0x0014 */
  56. u16 reflection_high; /* 0x3ffe */
  57. };
  58. #endif
  59. #ifdef CONFIG_IO64
  60. struct ihs_fpga {
  61. u16 reflection_low; /* 0x0000 */
  62. u16 versions; /* 0x0002 */
  63. u16 fpga_features; /* 0x0004 */
  64. u16 fpga_version; /* 0x0006 */
  65. u16 reserved_0[5]; /* 0x0008 */
  66. u16 quad_serdes_reset; /* 0x0012 */
  67. u16 reserved_1[502]; /* 0x0014 */
  68. u16 ch0_status_int; /* 0x0400 */
  69. u16 ch0_config_int; /* 0x0402 */
  70. u16 reserved_2[126]; /* 0x0404 */
  71. u16 ch0_hicb_status_int;/* 0x0500 */
  72. u16 ch0_hicb_config_int;/* 0x0502 */
  73. u16 reserved_3[7549]; /* 0x0504 */
  74. u16 reflection_high; /* 0x3ffe */
  75. };
  76. #endif
  77. #ifdef CONFIG_IOCON
  78. struct ihs_fpga {
  79. u16 reflection_low; /* 0x0000 */
  80. u16 versions; /* 0x0002 */
  81. u16 fpga_version; /* 0x0004 */
  82. u16 fpga_features; /* 0x0006 */
  83. u16 reserved_0[6]; /* 0x0008 */
  84. struct ihs_gpio gpio; /* 0x0014 */
  85. u16 mpc3w_control; /* 0x001a */
  86. u16 reserved_1[19]; /* 0x001c */
  87. u16 videocontrol; /* 0x0042 */
  88. u16 reserved_2[93]; /* 0x0044 */
  89. u16 reflection_high; /* 0x00fe */
  90. struct ihs_osd osd; /* 0x0100 */
  91. u16 reserved_3[889]; /* 0x010e */
  92. u16 videomem; /* 0x0800 */
  93. };
  94. #endif
  95. #ifdef CONFIG_DLVISION_10G
  96. struct ihs_fpga {
  97. u16 reflection_low; /* 0x0000 */
  98. u16 versions; /* 0x0002 */
  99. u16 fpga_version; /* 0x0004 */
  100. u16 fpga_features; /* 0x0006 */
  101. u16 reserved_0[10]; /* 0x0008 */
  102. u16 extended_interrupt; /* 0x001c */
  103. u16 reserved_1[9]; /* 0x001e */
  104. struct ihs_i2c i2c; /* 0x0030 */
  105. u16 reserved_2[16]; /* 0x0038 */
  106. u16 mpc3w_control; /* 0x0058 */
  107. u16 reserved_3[34]; /* 0x005a */
  108. u16 videocontrol; /* 0x009e */
  109. u16 reserved_4[176]; /* 0x00a0 */
  110. struct ihs_osd osd; /* 0x0200 */
  111. u16 reserved_5[761]; /* 0x020e */
  112. u16 videomem; /* 0x0800 */
  113. };
  114. #endif
  115. #endif