target: add generic Xtensa LX support
[fw/openocd] / src / target / nds32_v3m.h
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2
3 /***************************************************************************
4  *   Copyright (C) 2013 Andes Technology                                   *
5  *   Hsiangkai Wang <hkwang@andestech.com>                                 *
6  ***************************************************************************/
7
8 #ifndef OPENOCD_TARGET_NDS32_V3M_H
9 #define OPENOCD_TARGET_NDS32_V3M_H
10
11 #include "nds32.h"
12
13 struct nds32_v3m_common {
14         struct nds32 nds32;
15
16         /** number of hardware breakpoints */
17         int32_t n_hbr;
18
19         /** number of hardware watchpoints */
20         int32_t n_hwp;
21
22         /** number of used hardware watchpoints */
23         int32_t used_n_wp;
24
25         /** next hardware breakpoint index */
26         /** for simple breakpoints, hardware breakpoints are inserted
27          * from high index to low index */
28         int32_t next_hbr_index;
29
30         /** next hardware watchpoint index */
31         /** increase from low index to high index */
32         int32_t next_hwp_index;
33 };
34
35 static inline struct nds32_v3m_common *target_to_nds32_v3m(struct target *target)
36 {
37         return container_of(target->arch_info, struct nds32_v3m_common, nds32);
38 }
39
40 #endif /* OPENOCD_TARGET_NDS32_V3M_H */