mem_ap_read_u32 error propagation
[fw/openocd] / src / target / armv7a.h
index 2bd261aabdc7d9120263a4df5a5a6ff701ddc605..f93245634adb3bd147f9f076b4c1cfa1f779af06 100644 (file)
@@ -19,8 +19,8 @@
 #ifndef ARMV7A_H
 #define ARMV7A_H
 
-#include <target/arm_adi_v5.h>
-#include "armv4_5.h"
+#include "arm_adi_v5.h"
+#include "arm.h"
 #include "armv4_5_mmu.h"
 #include "armv4_5_cache.h"
 #include "arm_dpm.h"
@@ -50,8 +50,7 @@ struct armv7a_common
        int common_magic;
        struct reg_cache *core_cache;
 
-       /* arm adp debug port */
-       struct swjdp_common swjdp_info;
+       struct adiv5_dap dap;
 
        /* Core Debug Unit */
        struct arm_dpm dpm;
@@ -63,11 +62,9 @@ struct armv7a_common
        struct armv4_5_mmu_common armv4_5_mmu;
 
        int (*examine_debug_reason)(struct target *target);
-       void (*post_debug_entry)(struct target *target);
+       int (*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 *
@@ -114,32 +111,6 @@ target_to_armv7a(struct target *target)
 /* See ARMv7a arch spec section C10.8 */
 #define CPUDBG_AUTHSTATUS      0xFB8
 
-/* DSCR bit numbers (See ARMv7a arch spec section 12.4.5) */
-#define DSCR_CORE_HALTED       0
-#define DSCR_CORE_RESTARTED    1
-#define DSCR_EXT_INT_EN                13
-#define DSCR_HALT_DBG_MODE     14
-#define DSCR_MON_DBG_MODE      15
-#define DSCR_INSTR_COMP                24
-#define DSCR_DTR_TX_FULL       29
-#define DSCR_DTR_RX_FULL       30
-
-struct armv7a_algorithm
-{
-       int common_magic;
-
-       enum armv4_5_mode core_mode;
-       enum armv4_5_state core_state;
-};
-
-struct armv7a_core_reg
-{
-       int num;
-       enum armv4_5_mode mode;
-       struct target *target;
-       struct armv7a_common *armv7a_common;
-};
-
 int armv7a_arch_state(struct target *target);
 struct reg_cache *armv7a_build_reg_cache(struct target *target,
                struct armv7a_common *armv7a_common);