+/* This inner loop can be implemented by the minidriver, oftentimes in hardware... The
+ * minidriver can call the default implementation as a fallback or implement it
+ * from scratch.
+ */
+int arm11_run_instr_data_to_core_noack_inner_default(struct jtag_tap *tap,
+ uint32_t opcode,
+ uint32_t *data,
+ size_t count)
+{
+ struct scan_field chain5_fields[3];
+
+ chain5_fields[0].num_bits = 32;
+ chain5_fields[0].out_value = NULL; /*&Data*/
+ chain5_fields[0].in_value = NULL;
+
+ chain5_fields[1].num_bits = 1;
+ chain5_fields[1].out_value = NULL;
+ chain5_fields[1].in_value = NULL; /*&Ready*/
+
+ chain5_fields[2].num_bits = 1;
+ chain5_fields[2].out_value = NULL;
+ chain5_fields[2].in_value = NULL;
+
+ uint8_t *Readies;
+ unsigned readiesNum = count;
+ unsigned bytes = sizeof(*Readies)*readiesNum;
+
+ Readies = malloc(bytes);
+ if (Readies == NULL) {
+ LOG_ERROR("Out of memory allocating %u bytes", bytes);
+ return ERROR_FAIL;
+ }
+
+ uint8_t *ReadyPos = Readies;
+ while (count--) {
+ chain5_fields[0].out_value = (uint8_t *)(data++);
+ chain5_fields[1].in_value = ReadyPos++;
+
+ if (count > 0) {
+ jtag_add_dr_scan(tap, ARRAY_SIZE(chain5_fields), chain5_fields,
+ TAP_DRPAUSE);
+ jtag_add_pathmove(ARRAY_SIZE(arm11_MOVE_DRPAUSE_IDLE_DRPAUSE_with_delay),
+ arm11_MOVE_DRPAUSE_IDLE_DRPAUSE_with_delay);
+ } else
+ jtag_add_dr_scan(tap, ARRAY_SIZE(chain5_fields), chain5_fields, TAP_IDLE);
+ }
+
+ int retval = jtag_execute_queue();
+ if (retval == ERROR_OK) {
+ unsigned error_count = 0;
+
+ for (size_t i = 0; i < readiesNum; i++) {
+ if (Readies[i] != 1)
+ error_count++;
+ }