target: consolidate existing target/algo common_magic
[openocd.git] / src / target / avr32_ap7k.h
blobac35754f47df724a31e7cac825eee84749a23cb3
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 /***************************************************************************
4 * Copyright (C) 2010 by Oleksandr Tymoshenko <gonzo@bluezbox.com> *
5 ***************************************************************************/
7 #ifndef OPENOCD_TARGET_AVR32_AP7K_H
8 #define OPENOCD_TARGET_AVR32_AP7K_H
10 struct target;
12 #define AP7K_COMMON_MAGIC 0x4150374bU
14 struct avr32_ap7k_common {
15 unsigned int common_magic;
17 struct avr32_jtag jtag;
18 struct reg_cache *core_cache;
19 uint32_t core_regs[AVR32NUMCOREREGS];
22 static inline struct avr32_ap7k_common *
23 target_to_ap7k(struct target *target)
25 return (struct avr32_ap7k_common *)target->arch_info;
28 struct avr32_core_reg {
29 uint32_t num;
30 struct target *target;
31 struct avr32_ap7k_common *avr32_common;
34 #endif /* OPENOCD_TARGET_AVR32_AP7K_H */