+ /* override some insn sequence functions */
+ arm7_9->change_to_arm = feroceon_change_to_arm;
+ arm7_9->read_core_regs = feroceon_read_core_regs;
+ arm7_9->read_core_regs_target_buffer = feroceon_read_core_regs_target_buffer;
+ arm7_9->read_xpsr = feroceon_read_xpsr;
+ arm7_9->write_xpsr = feroceon_write_xpsr;
+ arm7_9->write_xpsr_im8 = feroceon_write_xpsr_im8;
+ arm7_9->write_core_regs = feroceon_write_core_regs;
+ arm7_9->branch_resume = feroceon_branch_resume;
+ arm7_9->branch_resume_thumb = feroceon_branch_resume_thumb;
+
+ /* must be implemented with only one comparator */
+ arm7_9->enable_single_step = feroceon_enable_single_step;
+ arm7_9->disable_single_step = feroceon_disable_single_step;
+
+ /* MOE is not implemented */
+ arm7_9->examine_debug_reason = feroceon_examine_debug_reason;
+
+ /* Note: asserting DBGRQ might not win over the undef exception.
+ If that happens then just use "arm7_9 dbgrq disable". */
+ arm7_9->use_dbgrq = 1;
+ arm7_9->set_special_dbgrq = feroceon_set_dbgrq;
+
+ /* only one working comparator */
+ arm7_9->wp_available_max = 1;
+ arm7_9->wp1_used_default = -1;
+}
+
+int feroceon_target_create(struct target *target, Jim_Interp *interp)
+{
+ struct arm926ejs_common *arm926ejs = calloc(1,sizeof(struct arm926ejs_common));
+
+ arm926ejs_init_arch_info(target, arm926ejs, target->tap);
+ feroceon_common_setup(target);
+
+ /* the standard ARM926 methods don't always work (don't ask...) */
+ arm926ejs->read_cp15 = feroceon_read_cp15;
+ arm926ejs->write_cp15 = feroceon_write_cp15;
+
+ return ERROR_OK;
+}
+
+int dragonite_target_create(struct target *target, Jim_Interp *interp)
+{
+ struct arm966e_common *arm966e = calloc(1,sizeof(struct arm966e_common));
+
+ arm966e_init_arch_info(target, arm966e, target->tap);
+ feroceon_common_setup(target);
+
+ return ERROR_OK;
+}
+
+int feroceon_examine(struct target *target)
+{
+ struct arm *armv4_5;
+ struct arm7_9_common *arm7_9;
+ int retval;
+
+ retval = arm7_9_examine(target);
+ if (retval != ERROR_OK)
+ return retval;