jtag/drivers: add new VIDs for angie driver - add a check for a returned value 95/7795/6
authorAhmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Wed, 16 Aug 2023 15:01:10 +0000 (17:01 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 26 Aug 2023 11:45:31 +0000 (11:45 +0000)
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>
contrib/60-openocd.rules
src/jtag/drivers/angie.c

index fd88564bdcc0988a2db58670eea4f669c48644f3..b0e229d07fa062c6a18a0b636e78803c211173e8 100644 (file)
@@ -226,6 +226,8 @@ ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1002", MODE="660", GROUP="plugdev",
 
 # ANGIE USB-JTAG Adapter
 ATTRS{idVendor}=="584e", ATTRS{idProduct}=="424e", MODE="660", GROUP="plugdev", TAG+="uaccess"
+ATTRS{idVendor}=="584e", ATTRS{idProduct}=="4255", MODE="660", GROUP="plugdev", TAG+="uaccess"
+ATTRS{idVendor}=="584e", ATTRS{idProduct}=="4355", MODE="660", GROUP="plugdev", TAG+="uaccess"
 ATTRS{idVendor}=="584e", ATTRS{idProduct}=="4a55", MODE="660", GROUP="plugdev", TAG+="uaccess"
 
 # Marvell Sheevaplug
index 35811fb80c2fa0950a0465c65bb1573c94a88ed0..9cc086599c31b29a1abec24f164a595120970898 100644 (file)
 
 /** 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)

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)