diff options
author | Alexander Clouter <alex@digriz.org.uk> | 2009-02-06 17:16:55 -0500 |
---|---|---|
committer | Alexander Clouter <alex@digriz.org.uk> | 2009-02-06 17:16:55 -0500 |
commit | 39008f959f4f3b60eecc5cec0ca077146c1f366b (patch) | |
tree | 35d9aaf4c722f0b9c9f8f2e7ef33a60a4ab28fff /arch/arm/mach-orion5x/ts78xx-fpga.h | |
parent | f54128609c4e7792fb52b03c3db0da78627ce607 (diff) |
[ARM] orion5x: TS-78xx support for 'hotplug' of FPGA devices
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>
Diffstat (limited to 'arch/arm/mach-orion5x/ts78xx-fpga.h')
-rw-r--r-- | arch/arm/mach-orion5x/ts78xx-fpga.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-orion5x/ts78xx-fpga.h b/arch/arm/mach-orion5x/ts78xx-fpga.h new file mode 100644 index 000000000000..0b8e30faff14 --- /dev/null +++ b/arch/arm/mach-orion5x/ts78xx-fpga.h | |||
@@ -0,0 +1,27 @@ | |||
1 | #define FPGAID(_magic, _rev) ((_magic << 8) + _rev) | ||
2 | |||
3 | /* | ||
4 | * get yer id's from http://ts78xx.digriz.org.uk/ | ||
5 | * do *not* make up your own or 'borrow' any! | ||
6 | */ | ||
7 | enum fpga_ids { | ||
8 | /* Technologic Systems */ | ||
9 | TS7800_REV_B = FPGAID(0x00b480, 0x03), | ||
10 | }; | ||
11 | |||
12 | struct fpga_device { | ||
13 | unsigned present:1; | ||
14 | unsigned init:1; | ||
15 | }; | ||
16 | |||
17 | struct fpga_devices { | ||
18 | /* Technologic Systems */ | ||
19 | struct fpga_device ts_rtc; | ||
20 | }; | ||
21 | |||
22 | struct ts78xx_fpga_data { | ||
23 | unsigned int id; | ||
24 | int state; | ||
25 | |||
26 | struct fpga_devices supports; | ||
27 | }; | ||