]> git.sur5r.net Git - openocd/commitdiff
feroceon updated w.r.t. latest arm7/9 changes
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 14 Aug 2008 14:44:10 +0000 (14:44 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 14 Aug 2008 14:44:10 +0000 (14:44 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@921 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/target/arm7_9_common.c
src/target/arm7_9_common.h
src/target/feroceon.c

index 8e2adcc6bb0805452a0c55529bcc1ebb59b254b0..d014e4b9589e150166f3421afbbdc68b40361843 100644 (file)
@@ -59,15 +59,14 @@ int handle_arm7_9_dcc_downloads_command(struct command_context_s *cmd_ctx, char
 int handle_arm7_9_etm_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
 
 
-/* FIX!!! this needs to be overrideable by e.g. fereceon*/
 static int arm7_9_clear_watchpoints(arm7_9_common_t *arm7_9)
 {
        embeddedice_write_reg(&arm7_9->eice_cache->reg_list[EICE_W0_CONTROL_VALUE], 0x0);
        embeddedice_write_reg(&arm7_9->eice_cache->reg_list[EICE_W1_CONTROL_VALUE], 0x0);
        arm7_9->sw_breakpoints_added = 0;
        arm7_9->wp0_used = 0;
-       arm7_9->wp1_used = 0;
-       arm7_9->wp_available = 2;
+       arm7_9->wp1_used = arm7_9->wp1_used_default;
+       arm7_9->wp_available = arm7_9->wp_available_max;
 
        return jtag_execute_queue();
 }
@@ -2586,11 +2585,13 @@ int arm7_9_init_arch_info(target_t *target, arm7_9_common_t *arm7_9)
        arm7_9->common_magic = ARM7_9_COMMON_MAGIC;
 
        arm_jtag_setup_connection(&arm7_9->jtag_info);
-       arm7_9->wp_available = 2;
+       arm7_9->wp_available = 0; /* this is set up in arm7_9_clear_watchpoints() */
+       arm7_9->wp_available_max = 2;
        arm7_9->sw_breakpoints_added = 0;
        arm7_9->breakpoint_count = 0;
        arm7_9->wp0_used = 0;
        arm7_9->wp1_used = 0;
+       arm7_9->wp1_used_default = 0;
        arm7_9->use_dbgrq = 0;
 
        arm7_9->etm_ctx = NULL;
index 6d7e13ef06d66d9bc853b86faf3ec601d35436f8..ae17a6d1d776d16be55c58fd63e76fe5ea370ade 100644 (file)
@@ -44,8 +44,10 @@ typedef struct arm7_9_common_s
        int sw_breakpoints_added;
        int breakpoint_count;
        int wp_available;
+       int wp_available_max;
        int wp0_used;
        int wp1_used;
+       int wp1_used_default;
        int force_hw_bkpts;
        int dbgreq_adjust_pc;
        int use_dbgrq;
index 9c774716cf7ebe5cb9007a9d77a53fe1850fc1d5..38444ab72c6557361866f9fc04ebfccef21d2aee 100644 (file)
@@ -688,8 +688,8 @@ int feroceon_target_command(struct command_context_s *cmd_ctx, char *cmd, char *
        arm7_9->set_special_dbgrq = feroceon_set_dbgrq;
 
        /* only one working comparator */
-       arm7_9->wp_available = 1; 
-       arm7_9->wp1_used = -1; 
+       arm7_9->wp_available_max = 1; 
+       arm7_9->wp1_used_default = -1; 
 
        return ERROR_OK;
 }