int arm966e_init_arch_info(struct target *target, struct arm966e_common *arm966e, struct jtag_tap *tap)
{
- struct arm9tdmi_common *arm9tdmi = &arm966e->arm9tdmi_common;
- struct arm7_9_common *arm7_9 = &arm9tdmi->arm7_9_common;
+ struct arm7_9_common *arm7_9 = &arm966e->arm7_9_common;
- arm9tdmi_init_arch_info(target, arm9tdmi, tap);
+ /* initialize arm7/arm9 specific info (including armv4_5) */
+ arm9tdmi_init_arch_info(target, arm7_9, tap);
arm966e->common_magic = ARM966E_COMMON_MAGIC;
}
/* one or more argument, access a single register (write if second argument is given */
- if (argc >= 1)
+ if (CMD_ARGC >= 1)
{
uint32_t address;
- COMMAND_PARSE_NUMBER(u32, args[0], address);
+ COMMAND_PARSE_NUMBER(u32, CMD_ARGV[0], address);
- if (argc == 1)
+ if (CMD_ARGC == 1)
{
uint32_t value;
if ((retval = arm966e_read_cp15(target, address, &value)) != ERROR_OK)
{
- command_print(cmd_ctx, "couldn't access reg %i", address);
+ command_print(cmd_ctx,
+ "couldn't access reg %" PRIi32,
+ address);
return ERROR_OK;
}
if ((retval = jtag_execute_queue()) != ERROR_OK)
return retval;
}
- command_print(cmd_ctx, "%i: %8.8" PRIx32 "", address, value);
+ command_print(cmd_ctx, "%" PRIi32 ": %8.8" PRIx32,
+ address, value);
}
- else if (argc == 2)
+ else if (CMD_ARGC == 2)
{
uint32_t value;
- COMMAND_PARSE_NUMBER(u32, args[1], value);
+ COMMAND_PARSE_NUMBER(u32, CMD_ARGV[1], value);
if ((retval = arm966e_write_cp15(target, address, value)) != ERROR_OK)
{
- command_print(cmd_ctx, "couldn't access reg %i", address);
+ command_print(cmd_ctx,
+ "couldn't access reg %" PRIi32,
+ address);
return ERROR_OK;
}
- command_print(cmd_ctx, "%i: %8.8" PRIx32 "", address, value);
+ command_print(cmd_ctx, "%" PRIi32 ": %8.8" PRIx32,
+ address, value);
}
}
.read_memory = arm7_9_read_memory,
.write_memory = arm7_9_write_memory,
.bulk_write_memory = arm7_9_bulk_write_memory,
- .checksum_memory = arm7_9_checksum_memory,
- .blank_check_memory = arm7_9_blank_check_memory,
+
+ .checksum_memory = arm_checksum_memory,
+ .blank_check_memory = arm_blank_check_memory,
.run_algorithm = armv4_5_run_algorithm,