From b2a22943e1d76b549c5ff5e84b95658abbd89a69 Mon Sep 17 00:00:00 2001 From: Daniel Anselmi Date: Sat, 17 Dec 2022 13:11:30 +0100 Subject: jtagspi/pld: add support from efinix driver Provide jtagspi with information to use jtagspi for programming spi-flash devices on efinix trion and titanium devices using a proxy bitstream. Change-Id: I4a851fcaafe832c35bd7b825d95a3d08e4d57a7b Signed-off-by: Daniel Anselmi Reviewed-on: https://review.openocd.org/c/openocd/+/7826 Reviewed-by: Antonio Borneo Tested-by: jenkins --- src/pld/efinix.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/pld/efinix.c') diff --git a/src/pld/efinix.c b/src/pld/efinix.c index 8350cb1..b6e5f9e 100644 --- a/src/pld/efinix.c +++ b/src/pld/efinix.c @@ -249,6 +249,12 @@ static int efinix_get_ipdbg_hub(int user_num, struct pld_device *pld_device, str return ERROR_OK; } +static int efinix_get_jtagspi_userircode(struct pld_device *pld_device, unsigned int *ir) +{ + *ir = USER1; + return ERROR_OK; +} + PLD_CREATE_COMMAND_HANDLER(efinix_pld_create_command) { if (CMD_ARGC != 4 && CMD_ARGC != 6) @@ -296,4 +302,5 @@ struct pld_driver efinix_pld = { .pld_create_command = &efinix_pld_create_command, .load = &efinix_load, .get_ipdbg_hub = efinix_get_ipdbg_hub, + .get_jtagspi_userircode = efinix_get_jtagspi_userircode, }; -- cgit v1.1