diff options
author | Alexander Clouter <alex@digriz.org.uk> | 2011-03-05 11:49:36 +0000 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2011-03-05 14:31:53 -0500 |
commit | b3882330843650b751817712db57b9a7061e7879 (patch) | |
tree | f214ee378dabf403c59ebeec0650da1118b386f5 /arch/arm/mach-orion5x/ts78xx-fpga.h | |
parent | f9b1184e12e5ff8129b04837dffddb5a3c390473 (diff) | |
download | talos-obmc-linux-b3882330843650b751817712db57b9a7061e7879.tar.gz talos-obmc-linux-b3882330843650b751817712db57b9a7061e7879.zip |
ARM: orion5x: use safer FPGA ID 'default' for TS-78xx
Originally the FPGA ID checking switch statement left disabled all the
TS implemented FPGA devices if the ID was unknown to it. Michael Spang
created a fix in f9b1184e that changed the default to enable the devices
in the event TS silently release more revisions into the wild, this
unfortunately breaks custom FPGA bitstreams.
This patch amends the switch statement so that the TS devices are only
enabled if on the revision number is unknown (whilst the magic matches).
Changelog:
v2: neater implementation and some cosmetic changes
v1: initial release <20110305112937.GA22117@chipmunk>
Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Diffstat (limited to 'arch/arm/mach-orion5x/ts78xx-fpga.h')
-rw-r--r-- | arch/arm/mach-orion5x/ts78xx-fpga.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/arm/mach-orion5x/ts78xx-fpga.h b/arch/arm/mach-orion5x/ts78xx-fpga.h index 791f754c58eb..151e89e1e676 100644 --- a/arch/arm/mach-orion5x/ts78xx-fpga.h +++ b/arch/arm/mach-orion5x/ts78xx-fpga.h @@ -1,3 +1,4 @@ +#define TS7800_FPGA_MAGIC 0x00b480 #define FPGAID(_magic, _rev) ((_magic << 8) + _rev) /* @@ -6,15 +7,15 @@ */ 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), + TS7800_REV_1 = FPGAID(TS7800_FPGA_MAGIC, 0x01), + TS7800_REV_2 = FPGAID(TS7800_FPGA_MAGIC, 0x02), + TS7800_REV_3 = FPGAID(TS7800_FPGA_MAGIC, 0x03), + TS7800_REV_4 = FPGAID(TS7800_FPGA_MAGIC, 0x04), + TS7800_REV_5 = FPGAID(TS7800_FPGA_MAGIC, 0x05), + TS7800_REV_6 = FPGAID(TS7800_FPGA_MAGIC, 0x06), + TS7800_REV_7 = FPGAID(TS7800_FPGA_MAGIC, 0x07), + TS7800_REV_8 = FPGAID(TS7800_FPGA_MAGIC, 0x08), + TS7800_REV_9 = FPGAID(TS7800_FPGA_MAGIC, 0x09), /* Unaffordable & Expensive */ UAE_DUMMY = FPGAID(0xffffff, 0x01), |