* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
+ * along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifdef HAVE_CONFIG_H
if (flag)
break;
- long long then = 0;
+ int64_t then = 0;
if (i == 1000)
then = timeval_ms();
JTAG_DEBUG("DTR Ready %d nRetry %d", Ready, nRetry);
- long long then = 0;
+ int64_t then = 0;
if (i == 1000)
then = timeval_ms();
JTAG_DEBUG("DTR Data %08x Ready %d nRetry %d",
(unsigned) Data, Ready, nRetry);
- long long then = 0;
+ int64_t then = 0;
if (i == 1000)
then = timeval_ms();
TAP_DRSHIFT
};
-/* 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,
+static int arm11_run_instr_data_to_core_noack_inner(struct jtag_tap *tap,
uint32_t opcode,
uint32_t *data,
size_t count)
unsigned readiesNum = count;
unsigned bytes = sizeof(*Readies)*readiesNum;
- Readies = (uint8_t *) malloc(bytes);
+ 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 = (void *)(data++);
+ chain5_fields[0].out_value = (uint8_t *)(data++);
chain5_fields[1].in_value = ReadyPos++;
if (count > 0) {
return retval;
}
-int arm11_run_instr_data_to_core_noack_inner(struct jtag_tap *tap,
- uint32_t opcode,
- uint32_t *data,
- size_t count);
-
-#ifndef HAVE_JTAG_MINIDRIVER_H
-int arm11_run_instr_data_to_core_noack_inner(struct jtag_tap *tap,
- uint32_t opcode,
- uint32_t *data,
- size_t count)
-{
- return arm11_run_instr_data_to_core_noack_inner_default(tap, opcode, data, count);
-}
-#endif
-
/** Execute one instruction via ITR repeatedly while
* passing data to the core via DTR on each execution.
*
JTAG_DEBUG("DTR Data %08x Ready %d nRetry %d",
(unsigned) Data, Ready, nRetry);
- long long then = 0;
+ int64_t then = 0;
if (i == 1000)
then = timeval_ms();
if (Ready)
break;
- long long then = 0;
+ int64_t then = 0;
if (i_n == 1000)
then = timeval_ms();
/* alloc enough to enable all breakpoints and watchpoints at once */
arm11->bpwp_actions = calloc(2 * (dpm->nbp + dpm->nwp),
- sizeof *arm11->bpwp_actions);
+ sizeof(*arm11->bpwp_actions));
if (!arm11->bpwp_actions)
return ERROR_FAIL;
return arm11_bpwp_flush(arm11);
}
+
+void arm11_dpm_deinit(struct arm11_common *arm11)
+{
+ struct arm_dpm *dpm = &arm11->dpm;
+
+ free(arm11->bpwp_actions);
+ arm_free_reg_cache(dpm->arm);
+ free(dpm->dbp);
+ free(dpm->dwp);
+}