From 1d9fba8c1488c3774c8bde737c2d658b1f525d09 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Harboe?= Date: Tue, 16 Mar 2010 10:58:21 +0100 Subject: [PATCH] arm7/9: remove unused post_restore_context MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Unused. If something should happen after context restore, then the calling code can just do it afterwards. Signed-off-by: Øyvind Harboe --- src/target/arm7_9_common.c | 3 --- src/target/arm7_9_common.h | 3 --- src/target/arm7tdmi.c | 1 - src/target/arm9tdmi.c | 1 - src/target/armv7a.h | 2 -- src/target/armv7m.c | 3 --- src/target/armv7m.h | 1 - src/target/cortex_a8.c | 4 ---- src/target/cortex_m3.c | 1 - src/target/fa526.c | 1 - 10 files changed, 20 deletions(-) diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c index f9deb831..d1e7a93e 100644 --- a/src/target/arm7_9_common.c +++ b/src/target/arm7_9_common.c @@ -1726,9 +1726,6 @@ int arm7_9_restore_context(struct target *target) arm7_9->write_pc(target, buf_get_u32(armv4_5->pc->value, 0, 32)); armv4_5->pc->dirty = 0; - if (arm7_9->post_restore_context) - arm7_9->post_restore_context(target); - return ERROR_OK; } diff --git a/src/target/arm7_9_common.h b/src/target/arm7_9_common.h index 93bee071..71f9a9d5 100644 --- a/src/target/arm7_9_common.h +++ b/src/target/arm7_9_common.h @@ -103,9 +103,6 @@ struct arm7_9_common void (*post_debug_entry)(struct target *target); /**< Callback function called after entering debug mode */ void (*pre_restore_context)(struct target *target); /**< Callback function called before restoring the processor context */ - void (*post_restore_context)(struct target *target); /**< Callback function called after restoring the processor context */ - - }; static inline struct arm7_9_common * diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c index bd29caf9..ab8a3e52 100644 --- a/src/target/arm7tdmi.c +++ b/src/target/arm7tdmi.c @@ -685,7 +685,6 @@ int arm7tdmi_init_arch_info(struct target *target, arm7_9->post_debug_entry = NULL; arm7_9->pre_restore_context = NULL; - arm7_9->post_restore_context = NULL; /* initialize arch-specific breakpoint handling */ arm7_9->arm_bkpt = 0xdeeedeee; diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c index 7c1e372f..f3935a3a 100644 --- a/src/target/arm9tdmi.c +++ b/src/target/arm9tdmi.c @@ -787,7 +787,6 @@ int arm9tdmi_init_arch_info(struct target *target, arm7_9->post_debug_entry = NULL; arm7_9->pre_restore_context = NULL; - arm7_9->post_restore_context = NULL; /* initialize arch-specific breakpoint handling */ arm7_9->arm_bkpt = 0xdeeedeee; diff --git a/src/target/armv7a.h b/src/target/armv7a.h index 5ef8c42a..621761d7 100644 --- a/src/target/armv7a.h +++ b/src/target/armv7a.h @@ -65,8 +65,6 @@ struct armv7a_common void (*post_debug_entry)(struct target *target); void (*pre_restore_context)(struct target *target); - void (*post_restore_context)(struct target *target); - }; static inline struct armv7a_common * diff --git a/src/target/armv7m.c b/src/target/armv7m.c index 1216a45f..f0829c61 100644 --- a/src/target/armv7m.c +++ b/src/target/armv7m.c @@ -139,9 +139,6 @@ int armv7m_restore_context(struct target *target) } } - if (armv7m->post_restore_context) - armv7m->post_restore_context(target); - return ERROR_OK; } diff --git a/src/target/armv7m.h b/src/target/armv7m.h index 51d67048..57d46ede 100644 --- a/src/target/armv7m.h +++ b/src/target/armv7m.h @@ -124,7 +124,6 @@ struct armv7m_common void (*post_debug_entry)(struct target *target); void (*pre_restore_context)(struct target *target); - void (*post_restore_context)(struct target *target); }; static inline struct armv7m_common * diff --git a/src/target/cortex_a8.c b/src/target/cortex_a8.c index 332a55a5..a5480272 100644 --- a/src/target/cortex_a8.c +++ b/src/target/cortex_a8.c @@ -1020,9 +1020,6 @@ static int cortex_a8_restore_context(struct target *target, bool bpwp) arm_dpm_write_dirty_registers(&armv7a->dpm, bpwp); - if (armv7a->post_restore_context) - armv7a->post_restore_context(target); - return ERROR_OK; } @@ -1589,7 +1586,6 @@ static int cortex_a8_init_arch_info(struct target *target, armv7a->post_debug_entry = cortex_a8_post_debug_entry; armv7a->pre_restore_context = NULL; - armv7a->post_restore_context = NULL; armv7a->armv4_5_mmu.armv4_5_cache.ctype = -1; // armv7a->armv4_5_mmu.get_ttb = armv7a_get_ttb; armv7a->armv4_5_mmu.read_memory = cortex_a8_read_memory; diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c index d39d839c..7f6cbafa 100644 --- a/src/target/cortex_m3.c +++ b/src/target/cortex_m3.c @@ -1876,7 +1876,6 @@ static int cortex_m3_init_arch_info(struct target *target, armv7m->post_debug_entry = NULL; armv7m->pre_restore_context = NULL; - armv7m->post_restore_context = NULL; armv7m->load_core_reg_u32 = cortex_m3_load_core_reg_u32; armv7m->store_core_reg_u32 = cortex_m3_store_core_reg_u32; diff --git a/src/target/fa526.c b/src/target/fa526.c index b6149e31..d9d5d43b 100644 --- a/src/target/fa526.c +++ b/src/target/fa526.c @@ -292,7 +292,6 @@ static int fa526_init_arch_info_2(struct target *target, arm7_9->post_debug_entry = NULL; arm7_9->pre_restore_context = NULL; - arm7_9->post_restore_context = NULL; /* initialize arch-specific breakpoint handling */ arm7_9->arm_bkpt = 0xdeeedeee; -- 2.39.5