stlink: add trace support in DAP direct mode
[openocd.git] / src / jtag / drivers / imx_gpio.c
index 196d0e4a1a0af609d03fef82423a45fc5d9303fd..7dcfb6790aea862ce69df92956fccf362a4d2b69 100644 (file)
@@ -84,7 +84,6 @@ static inline bool gpio_level(int g)
 
 static bb_value_t imx_gpio_read(void);
 static int imx_gpio_write(int tck, int tms, int tdi);
-static int imx_gpio_reset(int trst, int srst);
 
 static int imx_gpio_swdio_read(void);
 static void imx_gpio_swdio_drive(bool is_output);
@@ -95,7 +94,6 @@ static int imx_gpio_quit(void);
 static struct bitbang_interface imx_gpio_bitbang = {
        .read = imx_gpio_read,
        .write = imx_gpio_write,
-       .reset = imx_gpio_reset,
        .swdio_read = imx_gpio_swdio_read,
        .swdio_drive = imx_gpio_swdio_drive,
        .blink = NULL
@@ -323,7 +321,7 @@ COMMAND_HANDLER(imx_gpio_handle_speed_coeffs)
                COMMAND_PARSE_NUMBER(int, CMD_ARGV[1], speed_offset);
        }
 
-       command_print(CMD_CTX, "imx_gpio: speed_coeffs = %d, speed_offset = %d",
+       command_print(CMD, "imx_gpio: speed_coeffs = %d, speed_offset = %d",
                                  speed_coeff, speed_offset);
        return ERROR_OK;
 }
@@ -333,7 +331,7 @@ COMMAND_HANDLER(imx_gpio_handle_peripheral_base)
        if (CMD_ARGC == 1)
                COMMAND_PARSE_NUMBER(u32, CMD_ARGV[0], imx_gpio_peri_base);
 
-       command_print(CMD_CTX, "imx_gpio: peripheral_base = 0x%08x",
+       command_print(CMD, "imx_gpio: peripheral_base = 0x%08x",
                                  imx_gpio_peri_base);
        return ERROR_OK;
 }
@@ -429,18 +427,25 @@ static const struct command_registration imx_gpio_command_handlers[] = {
 
 static const char * const imx_gpio_transports[] = { "jtag", "swd", NULL };
 
-struct jtag_interface imx_gpio_interface = {
-       .name = "imx_gpio",
+static struct jtag_interface imx_gpio_interface = {
        .supported = DEBUG_CAP_TMS_SEQ,
        .execute_queue = bitbang_execute_queue,
+};
+
+struct adapter_driver imx_gpio_adapter_driver = {
+       .name = "imx_gpio",
        .transports = imx_gpio_transports,
-       .swd = &bitbang_swd,
-       .speed = imx_gpio_speed,
-       .khz = imx_gpio_khz,
-       .speed_div = imx_gpio_speed_div,
        .commands = imx_gpio_command_handlers,
+
        .init = imx_gpio_init,
        .quit = imx_gpio_quit,
+       .reset = imx_gpio_reset,
+       .speed = imx_gpio_speed,
+       .khz = imx_gpio_khz,
+       .speed_div = imx_gpio_speed_div,
+
+       .jtag_ops = &imx_gpio_interface,
+       .swd_ops = &bitbang_swd,
 };
 
 static bool imx_gpio_jtag_mode_possible(void)

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)