blob: 2f4fe3ca5c1a9548779db82e8d41a45172190849 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Alexander Clouterb3882332011-03-05 11:49:36 +00002#define TS7800_FPGA_MAGIC 0x00b480
Alexander Clouter39008f92009-02-06 22:16:55 +00003#define FPGAID(_magic, _rev) ((_magic << 8) + _rev)
4
5/*
6 * get yer id's from http://ts78xx.digriz.org.uk/
7 * do *not* make up your own or 'borrow' any!
8 */
9enum fpga_ids {
10 /* Technologic Systems */
Alexander Clouterb3882332011-03-05 11:49:36 +000011 TS7800_REV_1 = FPGAID(TS7800_FPGA_MAGIC, 0x01),
12 TS7800_REV_2 = FPGAID(TS7800_FPGA_MAGIC, 0x02),
13 TS7800_REV_3 = FPGAID(TS7800_FPGA_MAGIC, 0x03),
14 TS7800_REV_4 = FPGAID(TS7800_FPGA_MAGIC, 0x04),
15 TS7800_REV_5 = FPGAID(TS7800_FPGA_MAGIC, 0x05),
16 TS7800_REV_6 = FPGAID(TS7800_FPGA_MAGIC, 0x06),
17 TS7800_REV_7 = FPGAID(TS7800_FPGA_MAGIC, 0x07),
18 TS7800_REV_8 = FPGAID(TS7800_FPGA_MAGIC, 0x08),
19 TS7800_REV_9 = FPGAID(TS7800_FPGA_MAGIC, 0x09),
Alexander Clouter0c1355e2009-03-21 11:09:25 +000020
21 /* Unaffordable & Expensive */
22 UAE_DUMMY = FPGAID(0xffffff, 0x01),
Alexander Clouter39008f92009-02-06 22:16:55 +000023};
24
25struct fpga_device {
26 unsigned present:1;
27 unsigned init:1;
28};
29
30struct fpga_devices {
31 /* Technologic Systems */
Alexander Clouter9f234992012-05-12 15:16:58 +010032 struct fpga_device ts_rtc;
33 struct fpga_device ts_nand;
34 struct fpga_device ts_rng;
Alexander Clouter39008f92009-02-06 22:16:55 +000035};
36
37struct ts78xx_fpga_data {
38 unsigned int id;
39 int state;
40
41 struct fpga_devices supports;
42};