-extern int arm926ejs_init_arch_info(target_t *target, arm926ejs_common_t *arm926ejs, jtag_tap_t *tap);
-extern int arm926ejs_register_commands(struct command_context_s *cmd_ctx);
-extern int arm926ejs_arch_state(struct target_s *target);
-extern int arm926ejs_write_memory(struct target_s *target, u32 address, u32 size, u32 count, uint8_t *buffer);
-extern int arm926ejs_soft_reset_halt(struct target_s *target);
+static inline struct arm926ejs_common_s *
+target_to_arm926(struct target_s *target)
+{
+ return container_of(target->arch_info, struct arm926ejs_common_s,
+ arm9tdmi_common.arm7_9_common.armv4_5_common);
+}
+
+
+int arm926ejs_init_arch_info(target_t *target,
+ arm926ejs_common_t *arm926ejs, struct jtag_tap *tap);
+int arm926ejs_register_commands(struct command_context_s *cmd_ctx);
+int arm926ejs_arch_state(struct target_s *target);
+int arm926ejs_write_memory(struct target_s *target,
+ uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer);
+int arm926ejs_soft_reset_halt(struct target_s *target);