summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion5x/ts78xx-fpga.h
blob: 791f754c58eb96a97f79b56ba8af2b0b0c7d5e49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#define FPGAID(_magic, _rev) ((_magic << 8) + _rev)

/*
 * get yer id's from http://ts78xx.digriz.org.uk/
 * do *not* make up your own or 'borrow' any!
 */
enum fpga_ids {
	/* Technologic Systems */
	TS7800_REV_1	= FPGAID(0x00b480, 0x01),
	TS7800_REV_2	= FPGAID(0x00b480, 0x02),
	TS7800_REV_3	= FPGAID(0x00b480, 0x03),
	TS7800_REV_4	= FPGAID(0x00b480, 0x04),
	TS7800_REV_5	= FPGAID(0x00b480, 0x05),
	TS7800_REV_6	= FPGAID(0x00b480, 0x06),
	TS7800_REV_7	= FPGAID(0x00b480, 0x07),
	TS7800_REV_8	= FPGAID(0x00b480, 0x08),
	TS7800_REV_9	= FPGAID(0x00b480, 0x09),

	/* Unaffordable & Expensive */
	UAE_DUMMY	= FPGAID(0xffffff, 0x01),
};

struct fpga_device {
	unsigned		present:1;
	unsigned		init:1;
};

struct fpga_devices {
	/* Technologic Systems */
	struct fpga_device 	ts_rtc;
	struct fpga_device 	ts_nand;
	struct fpga_device 	ts_rng;
};

struct ts78xx_fpga_data {
	unsigned int		id;
	int			state;

	struct fpga_devices	supports;
};