uint8_t reg_addr_buf = reg_addr & 0x3f;
uint8_t nr_w_buf = 0;
- jtag_info = &arm920t->arm9tdmi_common.arm7_9_common.jtag_info;
+ jtag_info = &arm920t->arm7_9_common.jtag_info;
jtag_set_end_state(TAP_IDLE);
arm_jtag_scann(jtag_info, 0xf);
uint8_t nr_w_buf = 1;
uint8_t value_buf[4];
- jtag_info = &arm920t->arm9tdmi_common.arm7_9_common.jtag_info;
+ jtag_info = &arm920t->arm7_9_common.jtag_info;
buf_set_u32(value_buf, 0, 32, value);
uint8_t nr_w_buf = 0;
uint8_t cp15_opcode_buf[4];
- jtag_info = &arm920t->arm9tdmi_common.arm7_9_common.jtag_info;
+ jtag_info = &arm920t->arm7_9_common.jtag_info;
jtag_set_end_state(TAP_IDLE);
arm_jtag_scann(jtag_info, 0xf);
return ERROR_TARGET_INVALID;
}
- armv4_5 = &arm920t->arm9tdmi_common.arm7_9_common.armv4_5_common;
+ armv4_5 = &arm920t->arm7_9_common.armv4_5_common;
LOG_USER("target halted in %s state due to %s, current mode: %s\n"
"cpsr: 0x%8.8" PRIx32 " pc: 0x%8.8" PRIx32 "\n"
int arm920t_init_arch_info(struct target *target, struct arm920t_common *arm920t, struct jtag_tap *tap)
{
- struct arm9tdmi_common *arm9tdmi = &arm920t->arm9tdmi_common;
- struct arm7_9_common *arm7_9 = &arm9tdmi->arm7_9_common;
+ struct arm7_9_common *arm7_9 = &arm920t->arm7_9_common;
- /* initialize arm9tdmi specific info (including arm7_9 and armv4_5)
- */
- arm9tdmi_init_arch_info(target, arm9tdmi, tap);
+ /* initialize arm7/arm9 specific info (including armv4_5) */
+ arm9tdmi_init_arch_info(target, arm7_9, tap);
arm920t->common_magic = ARM920T_COMMON_MAGIC;
struct arm920t_common
{
- struct arm9tdmi_common arm9tdmi_common;
+ struct arm7_9_common arm7_9_common;
uint32_t common_magic;
struct armv4_5_mmu_common armv4_5_mmu;
uint32_t cp15_control_reg;
target_to_arm920(struct target *target)
{
return container_of(target->arch_info, struct arm920t_common,
- arm9tdmi_common.arm7_9_common.armv4_5_common);
+ arm7_9_common.armv4_5_common);
}
struct arm920t_cache_line
return ERROR_TARGET_INVALID;
}
- armv4_5 = &arm926ejs->arm9tdmi_common.arm7_9_common.armv4_5_common;
+ armv4_5 = &arm926ejs->arm7_9_common.armv4_5_common;
LOG_USER("target halted in %s state due to %s, current mode: %s\n"
"cpsr: 0x%8.8" PRIx32 " pc: 0x%8.8" PRIx32 "\n"
int arm926ejs_init_arch_info(struct target *target, struct arm926ejs_common *arm926ejs,
struct jtag_tap *tap)
{
- struct arm9tdmi_common *arm9tdmi = &arm926ejs->arm9tdmi_common;
- struct arm7_9_common *arm7_9 = &arm9tdmi->arm7_9_common;
+ struct arm7_9_common *arm7_9 = &arm926ejs->arm7_9_common;
- /* initialize arm9tdmi specific info (including arm7_9 and armv4_5)
- */
- arm9tdmi_init_arch_info(target, arm9tdmi, tap);
+ /* initialize arm7/arm9 specific info (including armv4_5) */
+ arm9tdmi_init_arch_info(target, arm7_9, tap);
arm926ejs->common_magic = ARM926EJS_COMMON_MAGIC;
struct arm926ejs_common
{
- struct arm9tdmi_common arm9tdmi_common;
+ struct arm7_9_common arm7_9_common;
uint32_t common_magic;
struct armv4_5_mmu_common armv4_5_mmu;
int (*read_cp15)(struct target *target, uint32_t op1, uint32_t op2, uint32_t CRn, uint32_t CRm, uint32_t *value);
target_to_arm926(struct target *target)
{
return container_of(target->arch_info, struct arm926ejs_common,
- arm9tdmi_common.arm7_9_common.armv4_5_common);
+ arm7_9_common.armv4_5_common);
}
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;
struct arm966e_common
{
- struct arm9tdmi_common arm9tdmi_common;
+ struct arm7_9_common arm7_9_common;
int common_magic;
uint32_t cp15_control_reg;
};
target_to_arm966(struct target *target)
{
return container_of(target->arch_info, struct arm966e_common,
- arm9tdmi_common.arm7_9_common.armv4_5_common);
+ arm7_9_common.armv4_5_common);
}
int arm966e_init_arch_info(struct target *target,
#define _DEBUG_INSTRUCTION_EXECUTION_
#endif
-static const struct arm9tdmi_vector arm9tdmi_vectors[] =
+enum arm9tdmi_vector_bit
{
+ ARM9TDMI_RESET_VECTOR = 0x01,
+ ARM9TDMI_UNDEF_VECTOR = 0x02,
+ ARM9TDMI_SWI_VECTOR = 0x04,
+ ARM9TDMI_PABT_VECTOR = 0x08,
+ ARM9TDMI_DABT_VECTOR = 0x10,
+ /* BIT(5) reserved -- must be zero */
+ ARM9TDMI_IRQ_VECTOR = 0x40,
+ ARM9TDMI_FIQ_VECTOR = 0x80,
+};
+
+static const struct arm9tdmi_vector {
+ char *name;
+ uint32_t value;
+} arm9tdmi_vectors[] = {
{"reset", ARM9TDMI_RESET_VECTOR},
{"undef", ARM9TDMI_UNDEF_VECTOR},
{"swi", ARM9TDMI_SWI_VECTOR},
return ERROR_OK;
}
-int arm9tdmi_init_arch_info(struct target *target, struct arm9tdmi_common *arm9tdmi, struct jtag_tap *tap)
+int arm9tdmi_init_arch_info(struct target *target,
+ struct arm7_9_common *arm7_9, struct jtag_tap *tap)
{
- struct arm *armv4_5;
- struct arm7_9_common *arm7_9;
-
- arm7_9 = &arm9tdmi->arm7_9_common;
- armv4_5 = &arm7_9->armv4_5_common;
-
/* prepare JTAG information for the new target */
arm7_9->jtag_info.tap = tap;
arm7_9->jtag_info.scann_size = 5;
static int arm9tdmi_target_create(struct target *target, Jim_Interp *interp)
{
- struct arm9tdmi_common *arm9tdmi = calloc(1,sizeof(struct arm9tdmi_common));
+ struct arm7_9_common *arm7_9 = calloc(1,sizeof(struct arm7_9_common));
- arm9tdmi_init_arch_info(target, arm9tdmi, target->tap);
- arm9tdmi->arm7_9_common.armv4_5_common.is_armv4 = true;
+ arm9tdmi_init_arch_info(target, arm7_9, target->tap);
+ arm7_9->armv4_5_common.is_armv4 = true;
return ERROR_OK;
}
#include "embeddedice.h"
-/* FIXME we don't really need a separate arm9tdmi struct any more...
- * remove it, the arm7/arm9 common struct suffices.
- */
-struct arm9tdmi_common
-{
- struct arm7_9_common arm7_9_common;
-};
-
-struct arm9tdmi_vector
-{
- char *name;
- uint32_t value;
-};
-
-enum arm9tdmi_vector_bit
-{
- ARM9TDMI_RESET_VECTOR = 0x01,
- ARM9TDMI_UNDEF_VECTOR = 0x02,
- ARM9TDMI_SWI_VECTOR = 0x04,
- ARM9TDMI_PABT_VECTOR = 0x08,
- ARM9TDMI_DABT_VECTOR = 0x10,
- /* BIT(5) reserved -- must be zero */
- ARM9TDMI_IRQ_VECTOR = 0x40,
- ARM9TDMI_FIQ_VECTOR = 0x80,
-};
-
int arm9tdmi_init_target(struct command_context *cmd_ctx,
struct target *target);
int arm9tdmi_init_arch_info(struct target *target,
- struct arm9tdmi_common *arm9tdmi, struct jtag_tap *tap);
+ struct arm7_9_common *arm7_9, struct jtag_tap *tap);
int arm9tdmi_register_commands(struct command_context *cmd_ctx);
int arm9tdmi_clock_out(struct arm_jtag *jtag_info,
}
static int fa526_init_arch_info_2(struct target *target,
- struct arm9tdmi_common *arm9tdmi, struct jtag_tap *tap)
+ struct arm7_9_common *arm7_9, struct jtag_tap *tap)
{
- struct arm7_9_common *arm7_9;
-
- arm7_9 = &arm9tdmi->arm7_9_common;
-
/* prepare JTAG information for the new target */
arm7_9->jtag_info.tap = tap;
arm7_9->jtag_info.scann_size = 5;
static int fa526_init_arch_info(struct target *target,
struct arm920t_common *arm920t, struct jtag_tap *tap)
{
- struct arm9tdmi_common *arm9tdmi = &arm920t->arm9tdmi_common;
- struct arm7_9_common *arm7_9 = &arm9tdmi->arm7_9_common;
+ struct arm7_9_common *arm7_9 = &arm920t->arm7_9_common;
- /* initialize arm9tdmi specific info (including arm7_9 and armv4_5)
- */
- fa526_init_arch_info_2(target, arm9tdmi, tap);
+ /* initialize arm7/arm9 specific info (including armv4_5) */
+ fa526_init_arch_info_2(target, arm7_9, tap);
arm920t->common_magic = ARM920T_COMMON_MAGIC;