diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2009-11-13 13:44:50 -0800 |
---|---|---|
committer | David Brownell <dbrownell@users.sourceforge.net> | 2009-11-13 13:44:50 -0800 |
commit | afe0298399bd06700926822e6d49c5bc44151956 (patch) | |
tree | 55daffc576bd1264222a9602778b1f12d3e7cdfc /src/target/arm7_9_common.h | |
parent | 6435e75e147a6559ed4f784b5e89c8390e787a2a (diff) |
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 <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/target/arm7_9_common.h')
-rw-r--r-- | src/target/arm7_9_common.h | 6 |
1 files changed, 5 insertions, 1 deletions
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 */ |