aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAhmed BOUDJELIDA <aboudjelida@nanoxplore.com>2023-08-16 17:01:10 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2023-08-26 11:45:31 +0000
commitaa0056d27355d7719a120cdc4292215acae40819 (patch)
tree055e69e974c2013523dfea58029a9a08f3f7169e /src
parent3b38226370b21ef1d644cbe303a85c36a58ef365 (diff)
downloadriscv-openocd-aa0056d27355d7719a120cdc4292215acae40819.zip
riscv-openocd-aa0056d27355d7719a120cdc4292215acae40819.tar.gz
riscv-openocd-aa0056d27355d7719a120cdc4292215acae40819.tar.bz2
jtag/drivers: add new VIDs for angie driver - add a check for a returned value
add a line that checks the returned value of set signals function add two VIDs of other original boards (have onboard angie architecture) so angie driver can connect to them and change their VID after renumeration. Change-Id: Ide4f1f6f38168a410191bf3ff75bcd59dcf7ef50 Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7795 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/jtag/drivers/angie.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/jtag/drivers/angie.c b/src/jtag/drivers/angie.c
index 35811fb..9cc0865 100644
--- a/src/jtag/drivers/angie.c
+++ b/src/jtag/drivers/angie.c
@@ -30,8 +30,10 @@
/** USB Product ID of ANGIE device in unconfigured state (no firmware loaded
* yet) or with its firmware. */
-#define ANGIE_PID 0x424e
-#define ANGIE_PID_2 0x4a55
+#define ANGIE_PID 0x424e
+#define ANGIE_PID_2 0x4255
+#define ANGIE_PID_3 0x4355
+#define ANGIE_PID_4 0x4a55
/** Address of EZ-USB ANGIE CPU Control & Status register. This register can be
* written by issuing a Control EP0 vendor request. */
@@ -252,8 +254,8 @@ static struct angie *angie_handle;
static int angie_usb_open(struct angie *device)
{
struct libusb_device_handle *usb_device_handle;
- const uint16_t vids[] = {ANGIE_VID, ANGIE_VID, 0};
- const uint16_t pids[] = {ANGIE_PID, ANGIE_PID_2, 0};
+ const uint16_t vids[] = {ANGIE_VID, ANGIE_VID, ANGIE_VID, ANGIE_VID, 0};
+ const uint16_t pids[] = {ANGIE_PID, ANGIE_PID_2, ANGIE_PID_3, ANGIE_PID_4, 0};
int ret = jtag_libusb_open(vids, pids, &usb_device_handle, NULL);
@@ -1719,6 +1721,8 @@ static int angie_reset(int trst, int srst)
high |= SIGNAL_SRST;
int ret = angie_append_set_signals_cmd(device, low, high);
+ if (ret == ERROR_OK)
+ angie_clear_queue(device);
ret = angie_execute_queued_commands(device, LIBUSB_TIMEOUT_MS);
if (ret == ERROR_OK)