pl310_reg.h revision 1.1 1 /* $NetBSD: pl310_reg.h,v 1.1 2012/09/02 16:55:10 matt Exp $ */
2 /*-
3 * Copyright (c) 2012 The NetBSD Foundation, Inc.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to The NetBSD Foundation
7 * by Matt Thomas of 3am Software Foundry.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef _ARM_CORTEX_PL310_REG_H_
32 #define _ARM_CORTEX_PL310_REG_H_
33
34 /*
35 * ARM PL310 L2 Cache Controller
36 * Used by Cortex cores
37 */
38
39 #define L2C_CACHE_ID 0x000
40 #define CACHE_ID_IMPL __BITS(31,24)
41 #define CACHE_ID_ID __BITS(15,10)
42 #define CACHE_ID_PART __BITS(9,6)
43 #define CACHE_ID_PART_PL310 3
44 #define CACHE_ID_REV __BITS(5,0)
45 #define CACHE_ID_REV_R3P3 9
46 #define CACHE_ID_REV_R3P2 8
47 #define L2C_CACHE_TYPE 0x004
48 #define CACHE_TYPE_DATA_BANKING __BIT(31)
49 #define CACHE_TYPE_CTYPE __BITS(28,25)
50 #define CACHE_TYPE_HARVARD __BIT(24)
51 #define CACHE_TYPE_DSIZE __BITS(23,12)
52 #define CACHE_TYPE_ISIZE __BITS(11,0)
53 #define CACHE_TYPE_xWAYSIZE __BITS(10,8)
54 #define CACHE_TYPE_xASSOC __BIT(6)
55 #define CACHE_TYPE_xLINESIZE __BITS(5,0)
56
57 #define L2C_CTL 0x100
58 #define L2C_AUXCTL 0x104
59 #define L2C_TAGRAM_CTL 0x108
60 #define L2C_DATARAM_CTL 0x10c
61
62 #define L2C_EV_CTR_CTL 0x200
63 #define L2C_EV_CTR1_CTL 0x204
64 #define L2C_EV_CTR0_CTL 0x208
65 #define L2C_EV_CTR1 0x20c
66 #define L2C_EV_CTR0 0x210
67 #define L2C_INT_MASK 0x214
68 #define L2C_INT_MASK_STS 0x218
69 #define L2C_INT_RAW_STS 0x21c
70 #define L2C_INT_CLR 0x220
71
72 #define L2C_CACHE_SYNC 0x730
73 #define L2C_INV_PA 0x770
74 #define L2C_INV_WAY 0x77c
75 #define L2C_CLEAN_PA 0x7b0
76 #define L2C_CLEAN_INDEX 0x7b8
77 #define L2C_CLEAN_WAY 0x7bc
78 #define L2C_CLEAN_INV_PA 0x7f0
79 #define L2C_CLEAN_INV_INDEX 0x7f8
80 #define L2C_CLEAN_INV_WAY 0x7fc
81
82 #define L2C_D_LOCKDOWN0 0x900
83 #define L2C_I_LOCKDOWN0 0x904
84 #define L2C_D_LOCKDOWN1 0x908
85 #define L2C_I_LOCKDOWN1 0x90c
86 #define L2C_D_LOCKDOWN2 0x910
87 #define L2C_I_LOCKDOWN2 0x914
88 #define L2C_D_LOCKDOWN3 0x918
89 #define L2C_I_LOCKDOWN3 0x91c
90 #define L2C_D_LOCKDOWN4 0x920
91 #define L2C_I_LOCKDOWN4 0x924
92 #define L2C_D_LOCKDOWN5 0x928
93 #define L2C_I_LOCKDOWN5 0x92c
94 #define L2C_D_LOCKDOWN6 0x930
95 #define L2C_I_LOCKDOWN6 0x934
96 #define L2C_D_LOCKDOWN7 0x938
97 #define L2C_I_LOCKDOWN7 0x93c
98 #define L2C_LOCK_LINE_EN 0x950
99 #define L2C_UNLOCK_WAY 0x954
100
101 #define L2C_ADDR_FILTER_START 0xc00
102 #define L2C_ADDR_FILTER_END 0xc04
103
104 #define L2C_DEBUG_CTL 0xf40
105 #define L2C_PREFETCH_CTL 0xf60
106 #define L2C_POWER_CTL 0xf80
107
108 #endif /* _ARM_CORTEX_PL310_REG_H_ */
109