Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #define TS7800_FPGA_MAGIC 0x00b480
0003 #define FPGAID(_magic, _rev) ((_magic << 8) + _rev)
0004 
0005 /*
0006  * get yer id's from http://ts78xx.digriz.org.uk/
0007  * do *not* make up your own or 'borrow' any!
0008  */
0009 enum fpga_ids {
0010     /* Technologic Systems */
0011     TS7800_REV_1    = FPGAID(TS7800_FPGA_MAGIC, 0x01),
0012     TS7800_REV_2    = FPGAID(TS7800_FPGA_MAGIC, 0x02),
0013     TS7800_REV_3    = FPGAID(TS7800_FPGA_MAGIC, 0x03),
0014     TS7800_REV_4    = FPGAID(TS7800_FPGA_MAGIC, 0x04),
0015     TS7800_REV_5    = FPGAID(TS7800_FPGA_MAGIC, 0x05),
0016     TS7800_REV_6    = FPGAID(TS7800_FPGA_MAGIC, 0x06),
0017     TS7800_REV_7    = FPGAID(TS7800_FPGA_MAGIC, 0x07),
0018     TS7800_REV_8    = FPGAID(TS7800_FPGA_MAGIC, 0x08),
0019     TS7800_REV_9    = FPGAID(TS7800_FPGA_MAGIC, 0x09),
0020 
0021     /* Unaffordable & Expensive */
0022     UAE_DUMMY   = FPGAID(0xffffff, 0x01),
0023 };
0024 
0025 struct fpga_device {
0026     unsigned        present:1;
0027     unsigned        init:1;
0028 };
0029 
0030 struct fpga_devices {
0031     /* Technologic Systems */
0032     struct fpga_device  ts_rtc;
0033     struct fpga_device  ts_nand;
0034     struct fpga_device  ts_rng;
0035 };
0036 
0037 struct ts78xx_fpga_data {
0038     unsigned int        id;
0039     int         state;
0040 
0041     struct fpga_devices supports;
0042 };