return ERROR_OK;
}
-static int xscale_quit(void)
-{
- jtag_add_runtest(100, TAP_RESET);
- return ERROR_OK;
-}
-
static int xscale_init_arch_info(target_t *target,
xscale_common_t *xscale, jtag_tap_t *tap, const char *variant)
{
return ERROR_FAIL;
}
- handler_address = strtoul(args[1], NULL, 0);
+ COMMAND_PARSE_NUMBER(u32, args[1], handler_address);
if (((handler_address >= 0x800) && (handler_address <= 0x1fef800)) ||
((handler_address >= 0xfe000800) && (handler_address <= 0xfffff800)))
return ERROR_FAIL;
}
- cache_clean_address = strtoul(args[1], NULL, 0);
+ COMMAND_PARSE_NUMBER(u32, args[1], cache_clean_address);
if (cache_clean_address & 0xffff)
{
}
else
{
- xscale->vector_catch = strtoul(args[0], NULL, 0);
+ COMMAND_PARSE_NUMBER(u32, args[0], xscale->vector_catch);
buf_set_u32(xscale->reg_cache->reg_list[XSCALE_DCSR].value, 16, 8, xscale->vector_catch);
xscale_write_dcsr(target, -1, -1);
}
else
{
int idx;
+ COMMAND_PARSE_NUMBER(int, args[1], idx);
uint32_t vec;
- idx = strtoul(args[1], NULL, 0);
- vec = strtoul(args[2], NULL, 0);
+ COMMAND_PARSE_NUMBER(u32, args[2], vec);
if (idx < 1 || idx >= 8)
err = 1;
if ((argc >= 2) && (strcmp("fill", args[1]) == 0))
{
+ uint32_t fill = 1;
if (argc >= 3)
- xscale->trace.buffer_fill = strtoul(args[2], NULL, 0);
- else
- xscale->trace.buffer_fill = 1;
+ COMMAND_PARSE_NUMBER(u32, args[2], fill);
+ xscale->trace.buffer_fill = fill;
}
else if ((argc >= 2) && (strcmp("wrap", args[1]) == 0))
{
if (argc >= 2)
{
xscale->trace.image->base_address_set = 1;
- xscale->trace.image->base_address = strtoul(args[1], NULL, 0);
+ COMMAND_PARSE_NUMBER(u32, args[1], xscale->trace.image->base_address);
}
else
{
reg_t *reg = NULL;
if (argc > 0)
{
- reg_no = strtoul(args[0], NULL, 0);
+ COMMAND_PARSE_NUMBER(u32, args[0], reg_no);
/*translate from xscale cp15 register no to openocd register*/
switch (reg_no)
{
}
else if (argc == 2)
{
-
- uint32_t value = strtoul(args[1], NULL, 0);
+ uint32_t value;
+ COMMAND_PARSE_NUMBER(u32, args[1], value);
/* send CP write request (command 0x41) */
xscale_send_u32(target, 0x41);
.register_commands = xscale_register_commands,
.target_create = xscale_target_create,
.init_target = xscale_init_target,
- .quit = xscale_quit,
.virt2phys = xscale_virt2phys,
.mmu = xscale_mmu