1 /***************************************************************************
2 * Copyright (C) 2007-2008 by Øyvind Harboe *
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. *
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. *
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 ***************************************************************************/
22 #include <jtag/jtag.h>
23 #include <target/embeddedice.h>
24 #include <jtag/minidriver.h>
25 #include <jtag/interface.h>
27 struct jtag_interface minidummy_interface = {
29 .execute_queue = NULL,
36 .power_dropout = NULL,
37 .srst_asserted = NULL,
40 int interface_jtag_execute_queue(void)
42 /* synchronously do the operation here */
47 int interface_jtag_add_ir_scan(struct jtag_tap *active, const struct scan_field *fields,
50 /* synchronously do the operation here */
55 int interface_jtag_add_plain_ir_scan(int num_bits, const uint8_t *out_bits,
56 uint8_t *in_bits, tap_state_t state)
58 /* synchronously do the operation here */
63 int interface_jtag_add_dr_scan(struct jtag_tap *active, int num_fields,
64 const struct scan_field *fields, tap_state_t state)
66 /* synchronously do the operation here */
71 int interface_jtag_add_plain_dr_scan(int num_bits, const uint8_t *out_bits,
72 uint8_t *in_bits, tap_state_t state)
74 /* synchronously do the operation here */
79 int interface_jtag_add_tlr()
81 /* synchronously do the operation here */
86 int interface_jtag_add_reset(int req_trst, int req_srst)
88 /* synchronously do the operation here */
93 int interface_jtag_add_runtest(int num_cycles, tap_state_t state)
95 /* synchronously do the operation here */
100 int interface_jtag_add_clocks(int num_cycles)
102 /* synchronously do the operation here */
107 int interface_jtag_add_sleep(uint32_t us)
113 int interface_jtag_add_pathmove(int num_states, const tap_state_t *path)
120 tap_state_t cur_state = cmd_queue_cur_state;
123 if (tap_state_transition(cur_state, false) == path[state_count])
125 else if (tap_state_transition(cur_state, true) == path[state_count])
128 LOG_ERROR("BUG: %s -> %s isn't a valid TAP transition",
129 tap_state_name(cur_state), tap_state_name(path[state_count]));
133 /* synchronously do the operation here */
135 cur_state = path[state_count];
141 /* synchronously do the operation here */
146 int interface_add_tms_seq(unsigned num_bits, const uint8_t *seq, enum tap_state state)
148 /* synchronously do the operation here */
153 void embeddedice_write_dcc(struct jtag_tap *tap, int reg_addr, const uint8_t *buffer,
154 int little, int count)
157 for (i = 0; i < count; i++) {
158 embeddedice_write_reg_inner(tap, reg_addr, fast_target_buffer_get_u32(buffer, little));
163 int arm11_run_instr_data_to_core_noack_inner(struct jtag_tap *tap, uint32_t opcode,
164 uint32_t *data, size_t count)
166 int arm11_run_instr_data_to_core_noack_inner_default(struct jtag_tap *tap, \
167 uint32_t opcode, uint32_t *data, size_t count);
168 return arm11_run_instr_data_to_core_noack_inner_default(tap, opcode, data, count);