39008f959f
the FPGA on the TS-7800 provides access to a number of devices and so we have to be careful when reprogramming it. As we are effectively turning a bus off/on we have to inform the kernel that it should stop using anything provided by the FPGA (currently only the RTC however the NAND, LCD, etc is to come) before it's reprogrammed. Once reprogramed, we can tell the kernel to (re)enable things by checking the FPGA ID against a lookup table for what a particular FPGA bitstream can provide. Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
28 lines
485 B
C
28 lines
485 B
C
#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_B = FPGAID(0x00b480, 0x03),
|
|
};
|
|
|
|
struct fpga_device {
|
|
unsigned present:1;
|
|
unsigned init:1;
|
|
};
|
|
|
|
struct fpga_devices {
|
|
/* Technologic Systems */
|
|
struct fpga_device ts_rtc;
|
|
};
|
|
|
|
struct ts78xx_fpga_data {
|
|
unsigned int id;
|
|
int state;
|
|
|
|
struct fpga_devices supports;
|
|
};
|