openocd: src/target: replace the GPL-2.0-or-later license tag
[fw/openocd] / src / target / espressif / esp_xtensa.h
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2
3 /***************************************************************************
4  *   Generic ESP xtensa target implementation for OpenOCD                  *
5  *   Copyright (C) 2019 Espressif Systems Ltd.                             *
6  *   Author: Alexey Gerenkov <alexey@espressif.com>                        *
7  ***************************************************************************/
8
9 #ifndef OPENOCD_TARGET_ESP_XTENSA_H
10 #define OPENOCD_TARGET_ESP_XTENSA_H
11
12 #include <helper/command.h>
13 #include <target/target.h>
14 #include <target/xtensa/xtensa.h>
15
16 struct esp_xtensa_common {
17         struct xtensa xtensa;   /* must be the first element */
18 };
19
20 static inline struct esp_xtensa_common *target_to_esp_xtensa(struct target *target)
21 {
22         return container_of(target->arch_info, struct esp_xtensa_common, xtensa);
23 }
24
25 int esp_xtensa_init_arch_info(struct target *target,
26         struct esp_xtensa_common *esp_xtensa,
27         const struct xtensa_config *xtensa_cfg,
28         struct xtensa_debug_module_config *dm_cfg);
29 int esp_xtensa_target_init(struct command_context *cmd_ctx, struct target *target);
30 void esp_xtensa_target_deinit(struct target *target);
31 int esp_xtensa_arch_state(struct target *target);
32 void esp_xtensa_queue_tdi_idle(struct target *target);
33 int esp_xtensa_breakpoint_add(struct target *target, struct breakpoint *breakpoint);
34 int esp_xtensa_breakpoint_remove(struct target *target, struct breakpoint *breakpoint);
35 int esp_xtensa_poll(struct target *target);
36
37 #endif  /* OPENOCD_TARGET_ESP_XTENSA_H */