pld: harmonize refresh commands
add refresh command for lattice devices rename gowin reprogram to refresh rename virtex2 program to refresh Change-Id: I9da83a614b96da3e947ac4608b0a291b1d126914 Signed-off-by: Daniel Anselmi <danselmi@gmx.ch> Reviewed-on: https://review.openocd.org/c/openocd/+/7839 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
198a914cf9
commit
eb22a37b42
@@ -276,3 +276,27 @@ int lattice_ecp5_get_facing_read_bits(struct lattice_pld_device *pld_device_info
|
||||
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
int lattice_ecp5_refresh(struct lattice_pld_device *lattice_device)
|
||||
{
|
||||
struct jtag_tap *tap = lattice_device->tap;
|
||||
if (!tap)
|
||||
return ERROR_FAIL;
|
||||
|
||||
int retval = lattice_preload(lattice_device);
|
||||
if (retval != ERROR_OK)
|
||||
return retval;
|
||||
|
||||
retval = lattice_set_instr(tap, LSC_REFRESH, TAP_IDLE);
|
||||
if (retval != ERROR_OK)
|
||||
return retval;
|
||||
jtag_add_runtest(2, TAP_IDLE);
|
||||
jtag_add_sleep(200000);
|
||||
retval = lattice_set_instr(tap, BYPASS, TAP_IDLE);
|
||||
if (retval != ERROR_OK)
|
||||
return retval;
|
||||
jtag_add_runtest(100, TAP_IDLE);
|
||||
jtag_add_sleep(1000);
|
||||
|
||||
return jtag_execute_queue();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user