jtag: set default "jtag_only" to uninitialized transports
[openocd.git] / src / jtag / minidummy / minidummy.c
1 /***************************************************************************
2 * Copyright (C) 2007-2008 by Øyvind Harboe *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
16 ***************************************************************************/
17
18 #ifdef HAVE_CONFIG_H
19 #include "config.h"
20 #endif
21
22 #include <jtag/jtag.h>
23 #include <target/embeddedice.h>
24 #include <jtag/minidriver.h>
25 #include <jtag/interface.h>
26
27 struct jtag_interface minidummy_interface = {
28 .name = "minidummy",
29 .execute_queue = NULL,
30 .speed = NULL,
31 .transports = jtag_only,
32 .commands = NULL,
33 .init = NULL,
34 .quit = NULL,
35 .khz = NULL,
36 .speed_div = NULL,
37 .power_dropout = NULL,
38 .srst_asserted = NULL,
39 };
40
41 int interface_jtag_execute_queue(void)
42 {
43 /* synchronously do the operation here */
44
45 return ERROR_OK;
46 }
47
48 int interface_jtag_add_ir_scan(struct jtag_tap *active, const struct scan_field *fields,
49 tap_state_t state)
50 {
51 /* synchronously do the operation here */
52
53 return ERROR_OK;
54 }
55
56 int interface_jtag_add_plain_ir_scan(int num_bits, const uint8_t *out_bits,
57 uint8_t *in_bits, tap_state_t state)
58 {
59 /* synchronously do the operation here */
60
61 return ERROR_OK;
62 }
63
64 int interface_jtag_add_dr_scan(struct jtag_tap *active, int num_fields,
65 const struct scan_field *fields, tap_state_t state)
66 {
67 /* synchronously do the operation here */
68
69 return ERROR_OK;
70 }
71
72 int interface_jtag_add_plain_dr_scan(int num_bits, const uint8_t *out_bits,
73 uint8_t *in_bits, tap_state_t state)
74 {
75 /* synchronously do the operation here */
76
77 return ERROR_OK;
78 }
79
80 int interface_jtag_add_tlr()
81 {
82 /* synchronously do the operation here */
83
84 return ERROR_OK;
85 }
86
87 int interface_jtag_add_reset(int req_trst, int req_srst)
88 {
89 /* synchronously do the operation here */
90
91 return ERROR_OK;
92 }
93
94 int interface_jtag_add_runtest(int num_cycles, tap_state_t state)
95 {
96 /* synchronously do the operation here */
97
98 return ERROR_OK;
99 }
100
101 int interface_jtag_add_clocks(int num_cycles)
102 {
103 /* synchronously do the operation here */
104
105 return ERROR_OK;
106 }
107
108 int interface_jtag_add_sleep(uint32_t us)
109 {
110 jtag_sleep(us);
111 return ERROR_OK;
112 }
113
114 int interface_jtag_add_pathmove(int num_states, const tap_state_t *path)
115 {
116 int state_count;
117 int tms = 0;
118
119 state_count = 0;
120
121 tap_state_t cur_state = cmd_queue_cur_state;
122
123 while (num_states) {
124 if (tap_state_transition(cur_state, false) == path[state_count])
125 tms = 0;
126 else if (tap_state_transition(cur_state, true) == path[state_count])
127 tms = 1;
128 else {
129 LOG_ERROR("BUG: %s -> %s isn't a valid TAP transition",
130 tap_state_name(cur_state), tap_state_name(path[state_count]));
131 exit(-1);
132 }
133
134 /* synchronously do the operation here */
135
136 cur_state = path[state_count];
137 state_count++;
138 num_states--;
139 }
140
141
142 /* synchronously do the operation here */
143
144 return ERROR_OK;
145 }
146
147 int interface_add_tms_seq(unsigned num_bits, const uint8_t *seq, enum tap_state state)
148 {
149 /* synchronously do the operation here */
150
151 return ERROR_OK;
152 }
153
154 void embeddedice_write_dcc(struct jtag_tap *tap, int reg_addr, const uint8_t *buffer,
155 int little, int count)
156 {
157 int i;
158 for (i = 0; i < count; i++) {
159 embeddedice_write_reg_inner(tap, reg_addr, fast_target_buffer_get_u32(buffer, little));
160 buffer += 4;
161 }
162 }
163
164 int arm11_run_instr_data_to_core_noack_inner(struct jtag_tap *tap, uint32_t opcode,
165 uint32_t *data, size_t count)
166 {
167 int arm11_run_instr_data_to_core_noack_inner_default(struct jtag_tap *tap, \
168 uint32_t opcode, uint32_t *data, size_t count);
169 return arm11_run_instr_data_to_core_noack_inner_default(tap, opcode, data, count);
170 }

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)