]> git.sur5r.net Git - openocd/blob - src/target/armv7a_cache.h
fbd158b4d5ebe812efe179e6bdbfb4598e77d54a
[openocd] / src / target / armv7a_cache.h
1 /***************************************************************************
2  *   Copyright (C) 2015 Oleksij Rempel                                     *
3  *   linux@rempel-privat.de                                                *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) any later version.                                   *
9  *                                                                         *
10  *   This program is distributed in the hope that it will be useful,       *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  ***************************************************************************/
15
16 #ifndef ARM7A_CACHE_H
17 #define ARM7A_CACHE_H
18
19 #include "arm_jtag.h"
20 #include "armv7a_cache_l2x.h"
21
22 int armv7a_l1_d_cache_clean_virt(struct target *target, uint32_t virt,
23                                         unsigned int size);
24 int armv7a_l1_d_cache_flush_virt(struct target *target, uint32_t virt,
25                                         unsigned int size);
26 int armv7a_l1_i_cache_inval_all(struct target *target);
27 int armv7a_l1_i_cache_inval_virt(struct target *target, uint32_t virt,
28                                         uint32_t size);
29 int armv7a_cache_auto_flush_on_write(struct target *target, uint32_t virt,
30                                         uint32_t size);
31 int armv7a_cache_auto_flush_all_data(struct target *target);
32 int armv7a_cache_flush_virt(struct target *target, uint32_t virt,
33                                 uint32_t size);
34 extern const struct command_registration arm7a_cache_command_handlers[];
35
36 /* CLIDR cache types */
37 #define CACHE_LEVEL_HAS_UNIFIED_CACHE   0x4
38 #define CACHE_LEVEL_HAS_D_CACHE         0x2
39 #define CACHE_LEVEL_HAS_I_CACHE         0x1
40
41 #endif