skip FPGA config load at reset ("warm start")

This commit is contained in:
Markus Fröschle
2016-04-02 08:04:26 +00:00
parent a97cebe140
commit 11628b7167
4 changed files with 17 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
#if defined(MACHINE_FIREBEE) #if defined(MACHINE_FIREBEE)
#include "firebee.h" #include "firebee.h"
#elif defined(MACHINE_M5484LITE) #elif defined(MACHINE_M5484LITE)
#include "m5484l.h" # include "m5484l.h"
#elif defined(MACHINE_M54455) #elif defined(MACHINE_M54455)
#include "m54455.h" #include "m54455.h"
#else #else

View File

@@ -11,7 +11,7 @@ wait
# use system sdram as flashlib scratch area. # use system sdram as flashlib scratch area.
# TODO: plugin flashing seems to work o.k. now for smaller binaries, while it doesn't for larger ones (EmuTOS) yet. # TODO: plugin flashing seems to work o.k. now for smaller binaries, while it doesn't for larger ones (EmuTOS) yet.
# This seems to be related to large flash buffers and PC-relative adressing of the plugin # This seems to be related to large flash buffers and PC-relative adressing of the plugin
#flash-plugin 0x1000 0xf000 flash29-5475.plugin flash-plugin 0x1000 0xf000 flash29.plugin
# notify flashlib that we have flash at address 0xE0000000, length 0x7FFFFF, plugin is flash29 # notify flashlib that we have flash at address 0xE0000000, length 0x7FFFFF, plugin is flash29
flash 0xe0000000 flash 0xe0000000

View File

@@ -95,13 +95,15 @@ bool init_fpga(void)
int i; int i;
xprintf("FPGA load config...\r\n"); xprintf("FPGA load config...\r\n");
xprintf("_FPGA_JTAG_LOADED = 0x%x\r\n", _FPGA_JTAG_LOADED);
xprintf("_FPGA_JTAG_VALID = 0x%x\r\n", _FPGA_JTAG_VALID);
if (_FPGA_JTAG_LOADED == 1 && _FPGA_JTAG_VALID == VALID_JTAG) if (_FPGA_JTAG_LOADED == 1 && _FPGA_JTAG_VALID == VALID_JTAG)
{ {
xprintf("detected _FPGA_JTAG_LOADED flag. FPGA config skipped.\r\n"); xprintf("detected _FPGA_JTAG_LOADED flag. FPGA config skipped.\r\n");
/* reset the flag so that next boot will load config again from flash */ /* reset the flag so that next boot will load config again from flash */
_FPGA_JTAG_LOADED = 0; // _FPGA_JTAG_LOADED = 0;
_FPGA_JTAG_VALID = 0; // _FPGA_JTAG_VALID = 0;
return true; return true;
} }
@@ -180,6 +182,16 @@ bool init_fpga(void)
xprintf("finished (took %f seconds).\r\n", time / 1000.0); xprintf("finished (took %f seconds).\r\n", time / 1000.0);
config_gpio_for_jtag_config(); config_gpio_for_jtag_config();
/*
* assure skipping fpga load on warm boot
*/
_FPGA_JTAG_LOADED = 1;
_FPGA_JTAG_VALID = VALID_JTAG;
xprintf("SRAM now set to FPGA load skip\r\n");
return true; return true;
} }
xprintf("FAILED!\r\n"); xprintf("FAILED!\r\n");

View File

@@ -41,6 +41,7 @@ _rom_entry:
clr.l d0 clr.l d0
move.l d0,MCF_MMU_MMUCR move.l d0,MCF_MMU_MMUCR
nop
#if !defined(MACHINE_M54455) // MCF54455 does not have RAMBAR0 and RAMBAR1 registers */ #if !defined(MACHINE_M54455) // MCF54455 does not have RAMBAR0 and RAMBAR1 registers */