ts78xx-fpga.h 1.0 KB

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