18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#define TS7800_FPGA_MAGIC 0x00b480 38c2ecf20Sopenharmony_ci#define FPGAID(_magic, _rev) ((_magic << 8) + _rev) 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci/* 68c2ecf20Sopenharmony_ci * get yer id's from http://ts78xx.digriz.org.uk/ 78c2ecf20Sopenharmony_ci * do *not* make up your own or 'borrow' any! 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_cienum fpga_ids { 108c2ecf20Sopenharmony_ci /* Technologic Systems */ 118c2ecf20Sopenharmony_ci TS7800_REV_1 = FPGAID(TS7800_FPGA_MAGIC, 0x01), 128c2ecf20Sopenharmony_ci TS7800_REV_2 = FPGAID(TS7800_FPGA_MAGIC, 0x02), 138c2ecf20Sopenharmony_ci TS7800_REV_3 = FPGAID(TS7800_FPGA_MAGIC, 0x03), 148c2ecf20Sopenharmony_ci TS7800_REV_4 = FPGAID(TS7800_FPGA_MAGIC, 0x04), 158c2ecf20Sopenharmony_ci TS7800_REV_5 = FPGAID(TS7800_FPGA_MAGIC, 0x05), 168c2ecf20Sopenharmony_ci TS7800_REV_6 = FPGAID(TS7800_FPGA_MAGIC, 0x06), 178c2ecf20Sopenharmony_ci TS7800_REV_7 = FPGAID(TS7800_FPGA_MAGIC, 0x07), 188c2ecf20Sopenharmony_ci TS7800_REV_8 = FPGAID(TS7800_FPGA_MAGIC, 0x08), 198c2ecf20Sopenharmony_ci TS7800_REV_9 = FPGAID(TS7800_FPGA_MAGIC, 0x09), 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci /* Unaffordable & Expensive */ 228c2ecf20Sopenharmony_ci UAE_DUMMY = FPGAID(0xffffff, 0x01), 238c2ecf20Sopenharmony_ci}; 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_cistruct fpga_device { 268c2ecf20Sopenharmony_ci unsigned present:1; 278c2ecf20Sopenharmony_ci unsigned init:1; 288c2ecf20Sopenharmony_ci}; 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_cistruct fpga_devices { 318c2ecf20Sopenharmony_ci /* Technologic Systems */ 328c2ecf20Sopenharmony_ci struct fpga_device ts_rtc; 338c2ecf20Sopenharmony_ci struct fpga_device ts_nand; 348c2ecf20Sopenharmony_ci struct fpga_device ts_rng; 358c2ecf20Sopenharmony_ci}; 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_cistruct ts78xx_fpga_data { 388c2ecf20Sopenharmony_ci unsigned int id; 398c2ecf20Sopenharmony_ci int state; 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci struct fpga_devices supports; 428c2ecf20Sopenharmony_ci}; 43