Skip to content

Commit

Permalink
jtagspi/pld: add support from intel driver
Browse files Browse the repository at this point in the history
Provide jtagspi with information to use jtagspi for
programming spi-flash devices on intel devices using
a proxy bitstream.

Change-Id: Ib947b8c0dd61e2c6fa8beeb30074606131b1480f
Signed-off-by: Daniel Anselmi <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/7837
Tested-by: jenkins
Reviewed-by: Antonio Borneo <[email protected]>
  • Loading branch information
danselmi authored and borneoa committed Sep 23, 2023
1 parent 2d4fd58 commit b86726b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/pld/intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,12 @@ static int intel_get_ipdbg_hub(int user_num, struct pld_device *pld_device, stru
return ERROR_OK;
}

static int intel_get_jtagspi_userircode(struct pld_device *pld_device, unsigned int *ir)
{
*ir = USER1;
return ERROR_OK;
}

COMMAND_HANDLER(intel_set_bscan_command_handler)
{
unsigned int boundary_scan_length;
Expand Down Expand Up @@ -412,7 +418,6 @@ COMMAND_HANDLER(intel_set_check_pos_command_handler)
return ERROR_OK;
}


PLD_CREATE_COMMAND_HANDLER(intel_pld_create_command)
{
if (CMD_ARGC != 4 && CMD_ARGC != 6)
Expand Down Expand Up @@ -498,4 +503,5 @@ struct pld_driver intel_pld = {
.pld_create_command = &intel_pld_create_command,
.load = &intel_load,
.get_ipdbg_hub = intel_get_ipdbg_hub,
.get_jtagspi_userircode = intel_get_jtagspi_userircode,
};
6 changes: 5 additions & 1 deletion tcl/board/bemicro_cycloneiii.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ source [find fpga/altera-cycloneiii.cfg]

#quartus_cpf --option=bitstream_compression=off -c output_files\cycloneiii_blinker.sof cycloneiii_blinker.rbf

#openocd -f board/bemicro_cycloneiii.cfg -c "init" -c "pld load 0 cycloneiii_blinker.rbf"
#openocd -f board/bemicro_cycloneiii.cfg -c "init" -c "pld load cycloneiii.pld cycloneiii_blinker.rbf"
# "ipdbg -start -tap cycloneiii.tap -hub 0x00e -tool 0 -port 5555"


set JTAGSPI_CHAIN_ID cycloneiii.pld
source [find cpld/jtagspi.cfg]

0 comments on commit b86726b

Please sign in to comment.