jtag: linuxgpiod: drop extra parenthesis
[openocd.git] / src / target / etm_dummy.c
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 /***************************************************************************
4 * Copyright (C) 2007 by Dominic Rath *
5 * Dominic.Rath@gmx.de *
6 ***************************************************************************/
7
8 #ifdef HAVE_CONFIG_H
9 #include "config.h"
10 #endif
11
12 #include "arm.h"
13 #include "etm_dummy.h"
14
15 COMMAND_HANDLER(handle_etm_dummy_config_command)
16 {
17 struct target *target;
18 struct arm *arm;
19
20 target = get_target(CMD_ARGV[0]);
21
22 if (!target) {
23 LOG_ERROR("target '%s' not defined", CMD_ARGV[0]);
24 return ERROR_FAIL;
25 }
26
27 arm = target_to_arm(target);
28 if (!is_arm(arm)) {
29 command_print(CMD, "target '%s' isn't an ARM", CMD_ARGV[0]);
30 return ERROR_FAIL;
31 }
32
33 if (arm->etm)
34 arm->etm->capture_driver_priv = NULL;
35 else {
36 LOG_ERROR("target has no ETM defined, ETM dummy left unconfigured");
37 return ERROR_FAIL;
38 }
39
40 return ERROR_OK;
41 }
42
43 static const struct command_registration etm_dummy_config_command_handlers[] = {
44 {
45 .name = "config",
46 .handler = handle_etm_dummy_config_command,
47 .mode = COMMAND_CONFIG,
48 .usage = "target",
49 },
50 COMMAND_REGISTRATION_DONE
51 };
52 static const struct command_registration etm_dummy_command_handlers[] = {
53 {
54 .name = "etm_dummy",
55 .mode = COMMAND_ANY,
56 .help = "Dummy ETM capture driver command group",
57 .chain = etm_dummy_config_command_handlers,
58 .usage = "",
59 },
60 COMMAND_REGISTRATION_DONE
61 };
62
63 static int etm_dummy_init(struct etm_context *etm_ctx)
64 {
65 return ERROR_OK;
66 }
67
68 static trace_status_t etm_dummy_status(struct etm_context *etm_ctx)
69 {
70 return TRACE_IDLE;
71 }
72
73 static int etm_dummy_read_trace(struct etm_context *etm_ctx)
74 {
75 return ERROR_OK;
76 }
77
78 static int etm_dummy_start_capture(struct etm_context *etm_ctx)
79 {
80 return ERROR_ETM_PORTMODE_NOT_SUPPORTED;
81 }
82
83 static int etm_dummy_stop_capture(struct etm_context *etm_ctx)
84 {
85 return ERROR_OK;
86 }
87
88 struct etm_capture_driver etm_dummy_capture_driver = {
89 .name = "dummy",
90 .commands = etm_dummy_command_handlers,
91 .init = etm_dummy_init,
92 .status = etm_dummy_status,
93 .start_capture = etm_dummy_start_capture,
94 .stop_capture = etm_dummy_stop_capture,
95 .read_trace = etm_dummy_read_trace,
96 };

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)