]> git.sur5r.net Git - openocd/blob - src/target/armv7a_cache.h
e0ebb618b472fa2e0f092b293d6cd3f605dd2bda
[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_inval_virt(struct target *target, uint32_t virt,
25                                         unsigned int size);
26 int armv7a_l1_d_cache_flush_virt(struct target *target, uint32_t virt,
27                                         unsigned int size);
28 int armv7a_l1_i_cache_inval_all(struct target *target);
29 int armv7a_l1_i_cache_inval_virt(struct target *target, uint32_t virt,
30                                         uint32_t size);
31 int armv7a_cache_auto_flush_on_write(struct target *target, uint32_t virt,
32                                         uint32_t size);
33 int armv7a_cache_auto_flush_all_data(struct target *target);
34 int armv7a_cache_flush_virt(struct target *target, uint32_t virt,
35                                 uint32_t size);
36 extern const struct command_registration arm7a_cache_command_handlers[];
37
38 /* CLIDR cache types */
39 #define CACHE_LEVEL_HAS_UNIFIED_CACHE   0x4
40 #define CACHE_LEVEL_HAS_D_CACHE         0x2
41 #define CACHE_LEVEL_HAS_I_CACHE         0x1
42
43 #endif