From afe0298399bd06700926822e6d49c5bc44151956 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Fri, 13 Nov 2009 13:44:50 -0800 Subject: ARM7/9: rm arm7_9_get_arch_pointers() Remove the last external user of arm7_9_get_arch_pointers(), and that annoying downcast utility. Add an is_arm7_9() predicate. Stop returning specious success codes on various failure paths in the ARM7/ARM9 commands which used that downcast utility. Signed-off-by: David Brownell --- src/target/arm7_9_common.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/target/arm7_9_common.h') diff --git a/src/target/arm7_9_common.h b/src/target/arm7_9_common.h index 035c5fe3..e46da887 100644 --- a/src/target/arm7_9_common.h +++ b/src/target/arm7_9_common.h @@ -115,6 +115,11 @@ target_to_arm7_9(struct target *target) armv4_5_common); } +static inline bool is_arm7_9(struct arm7_9_common *arm7_9) +{ + return arm7_9->common_magic == ARM7_9_COMMON_MAGIC; +} + int arm7_9_register_commands(struct command_context *cmd_ctx); int arm7_9_poll(struct target *target); @@ -154,6 +159,5 @@ void arm7_9_disable_eice_step(struct target *target); int arm7_9_execute_sys_speed(struct target *target); int arm7_9_init_arch_info(struct target *target, struct arm7_9_common *arm7_9); -int arm7_9_get_arch_pointers(struct target *target, struct arm **armv4_5_p, struct arm7_9_common **arm7_9_p); #endif /* ARM7_9_COMMON_H */ -- cgit v1.2.3