ts78xx-fpga.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #define TS7800_FPGA_MAGIC 0x00b480
  3. #define FPGAID(_magic, _rev) ((_magic << 8) + _rev)
  4. /*
  5. * get yer id's from http://ts78xx.digriz.org.uk/
  6. * do *not* make up your own or 'borrow' any!
  7. */
  8. enum fpga_ids {
  9. /* Technologic Systems */
  10. TS7800_REV_1 = FPGAID(TS7800_FPGA_MAGIC, 0x01),
  11. TS7800_REV_2 = FPGAID(TS7800_FPGA_MAGIC, 0x02),
  12. TS7800_REV_3 = FPGAID(TS7800_FPGA_MAGIC, 0x03),
  13. TS7800_REV_4 = FPGAID(TS7800_FPGA_MAGIC, 0x04),
  14. TS7800_REV_5 = FPGAID(TS7800_FPGA_MAGIC, 0x05),
  15. TS7800_REV_6 = FPGAID(TS7800_FPGA_MAGIC, 0x06),
  16. TS7800_REV_7 = FPGAID(TS7800_FPGA_MAGIC, 0x07),
  17. TS7800_REV_8 = FPGAID(TS7800_FPGA_MAGIC, 0x08),
  18. TS7800_REV_9 = FPGAID(TS7800_FPGA_MAGIC, 0x09),
  19. /* Unaffordable & Expensive */
  20. UAE_DUMMY = FPGAID(0xffffff, 0x01),
  21. };
  22. struct fpga_device {
  23. unsigned present:1;
  24. unsigned init:1;
  25. };
  26. struct fpga_devices {
  27. /* Technologic Systems */
  28. struct fpga_device ts_rtc;
  29. struct fpga_device ts_nand;
  30. struct fpga_device ts_rng;
  31. };
  32. struct ts78xx_fpga_data {
  33. unsigned int id;
  34. int state;
  35. struct fpga_devices supports;
  36. };