support for JTAGWAIT.PRG (configure FPGA from JTAG port) implemented

This commit is contained in:
Markus Fröschle
2014-08-09 13:07:28 +00:00
parent 6dbe795815
commit d842254b36
7 changed files with 138 additions and 76 deletions

View File

@@ -50,6 +50,8 @@ extern uint8_t _FPGA_CONFIG_SIZE[];
* been loaded through JTAG. init_fpga() will honour this and not overwrite config.
*/
extern bool _FPGA_JTAG_LOADED;
extern long _FPGA_JTAG_VALID;
#define VALID_JTAG 0xaffeaffe
void config_gpio_for_fpga_config(void)
{
@@ -91,10 +93,10 @@ bool init_fpga(void)
volatile int32_t time, start, end;
int i;
dbg("FPGA load config (_FPGA_JTAG_LOADED = %x)...", _FPGA_JTAG_LOADED);
if (_FPGA_JTAG_LOADED == 1)
dbg("FPGA load config\r\n(_FPGA_JTAG_LOADED = %x, _FPGA_JTAG_VALID = %x)...\r\n", _FPGA_JTAG_LOADED, _FPGA_JTAG_VALID);
if (_FPGA_JTAG_LOADED == true)
{
dbg("detected _FPGA_JTAG_LOADED flag. Not overwriting FPGA config.\r\n");
dbg("detected _FPGA_JTAG_LOADED flag. Not overwriting FPGA config.\r\n");
/* reset the flag so that next boot will load config again from flash */
_FPGA_JTAG_LOADED = 0;