Alexander Clouter | b388233 | 2011-03-05 11:49:36 +0000 | [diff] [blame] | 1 | #define TS7800_FPGA_MAGIC 0x00b480 |
Alexander Clouter | 39008f9 | 2009-02-06 22:16:55 +0000 | [diff] [blame] | 2 | #define FPGAID(_magic, _rev) ((_magic << 8) + _rev) |
| 3 | |
| 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 */ |
Alexander Clouter | b388233 | 2011-03-05 11:49:36 +0000 | [diff] [blame] | 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), |
Alexander Clouter | 0c1355e | 2009-03-21 11:09:25 +0000 | [diff] [blame] | 19 | |
| 20 | /* Unaffordable & Expensive */ |
| 21 | UAE_DUMMY = FPGAID(0xffffff, 0x01), |
Alexander Clouter | 39008f9 | 2009-02-06 22:16:55 +0000 | [diff] [blame] | 22 | }; |
| 23 | |
| 24 | struct fpga_device { |
| 25 | unsigned present:1; |
| 26 | unsigned init:1; |
| 27 | }; |
| 28 | |
| 29 | struct fpga_devices { |
| 30 | /* Technologic Systems */ |
| 31 | struct fpga_device ts_rtc; |
Alexander Clouter | 75bb6b9 | 2009-02-23 22:40:01 +0000 | [diff] [blame] | 32 | struct fpga_device ts_nand; |
Alexander Clouter | a914d43 | 2009-05-03 12:57:48 -0700 | [diff] [blame] | 33 | struct fpga_device ts_rng; |
Alexander Clouter | 39008f9 | 2009-02-06 22:16:55 +0000 | [diff] [blame] | 34 | }; |
| 35 | |
| 36 | struct ts78xx_fpga_data { |
| 37 | unsigned int id; |
| 38 | int state; |
| 39 | |
| 40 | struct fpga_devices supports; |
| 41 | }; |