]> git.sur5r.net Git - openocd/blob - src/target/arm946e.h
5e5cf57fada6bfbc63903d5a36f7f9239348e7a1
[openocd] / src / target / arm946e.h
1 /***************************************************************************
2  *   Copyright (C) 2005 by Dominic Rath                                    *
3  *   Dominic.Rath@gmx.de                                                   *
4  *                                                                         *
5  *   Copyright (C) 2008 by Spencer Oliver                                  *
6  *   spen@spen-soft.co.uk                                                  *
7  *                                                                         *
8  *   Copyright (C) 2010 by Drasko DRASKOVIC                                *
9  *   drasko.draskovic@gmail.com                                            *
10  *                                                                         *
11  *   This program is free software; you can redistribute it and/or modify  *
12  *   it under the terms of the GNU General Public License as published by  *
13  *   the Free Software Foundation; either version 2 of the License, or     *
14  *   (at your option) any later version.                                   *
15  *                                                                         *
16  *   This program is distributed in the hope that it will be useful,       *
17  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
18  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
19  *   GNU General Public License for more details.                          *
20  *                                                                         *
21  *   You should have received a copy of the GNU General Public License     *
22  *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
23  ***************************************************************************/
24
25 #ifndef ARM946E_H
26 #define ARM946E_H
27
28 #include "arm9tdmi.h"
29
30 #define ARM946E_COMMON_MAGIC 0x20f920f9
31
32 struct arm946e_common {
33         struct arm7_9_common arm7_9_common;
34         int common_magic;
35         uint32_t cp15_control_reg;
36         uint32_t cp15_cache_info;
37 };
38
39 static inline struct arm946e_common *target_to_arm946(struct target *target)
40 {
41         return container_of(target->arch_info, struct arm946e_common,
42                         arm7_9_common.arm);
43 }
44
45 int arm946e_init_arch_info(struct target *target,
46                            struct arm946e_common *arm946e, struct jtag_tap *tap);
47 int arm946e_write_cp15(struct target *target, int reg_addr, uint32_t value);
48
49 extern const struct command_registration arm946e_command_handlers[];
50
51 #endif  /* ARM946E_H */