1 1.4 reinoud /* $NetBSD: pl310_reg.h,v 1.4 2014/03/22 17:12:20 reinoud Exp $ */ 2 1.1 matt /*- 3 1.1 matt * Copyright (c) 2012 The NetBSD Foundation, Inc. 4 1.1 matt * All rights reserved. 5 1.1 matt * 6 1.1 matt * This code is derived from software contributed to The NetBSD Foundation 7 1.1 matt * by Matt Thomas of 3am Software Foundry. 8 1.1 matt * 9 1.1 matt * Redistribution and use in source and binary forms, with or without 10 1.1 matt * modification, are permitted provided that the following conditions 11 1.1 matt * are met: 12 1.1 matt * 1. Redistributions of source code must retain the above copyright 13 1.1 matt * notice, this list of conditions and the following disclaimer. 14 1.1 matt * 2. Redistributions in binary form must reproduce the above copyright 15 1.1 matt * notice, this list of conditions and the following disclaimer in the 16 1.1 matt * documentation and/or other materials provided with the distribution. 17 1.1 matt * 18 1.1 matt * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19 1.1 matt * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20 1.1 matt * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 1.1 matt * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 1.1 matt * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 1.1 matt * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 1.1 matt * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 1.1 matt * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 1.1 matt * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 1.1 matt * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 1.1 matt * POSSIBILITY OF SUCH DAMAGE. 29 1.1 matt */ 30 1.1 matt 31 1.1 matt #ifndef _ARM_CORTEX_PL310_REG_H_ 32 1.1 matt #define _ARM_CORTEX_PL310_REG_H_ 33 1.1 matt 34 1.1 matt /* 35 1.1 matt * ARM PL310 L2 Cache Controller 36 1.1 matt * Used by Cortex cores 37 1.1 matt */ 38 1.1 matt 39 1.1 matt #define L2C_CACHE_ID 0x000 40 1.2 matt #define CACHE_ID_IMPL __BITS(31,24) 41 1.2 matt #define CACHE_ID_ID __BITS(15,10) 42 1.2 matt #define CACHE_ID_PART __BITS(9,6) 43 1.2 matt #define CACHE_ID_PART_PL310 3 44 1.2 matt #define CACHE_ID_REV __BITS(5,0) 45 1.2 matt #define CACHE_ID_REV_R3P3 9 46 1.2 matt #define CACHE_ID_REV_R3P2 8 47 1.2 matt 48 1.1 matt #define L2C_CACHE_TYPE 0x004 49 1.2 matt #define CACHE_TYPE_DATA_BANKING __BIT(31) 50 1.2 matt #define CACHE_TYPE_CTYPE __BITS(28,25) 51 1.2 matt #define CACHE_TYPE_HARVARD __BIT(24) 52 1.2 matt #define CACHE_TYPE_DSIZE __BITS(23,12) 53 1.2 matt #define CACHE_TYPE_ISIZE __BITS(11,0) 54 1.2 matt #define CACHE_TYPE_xWAYSIZE __BITS(10,8) 55 1.2 matt #define CACHE_TYPE_xASSOC __BIT(6) 56 1.2 matt #define CACHE_TYPE_xLINESIZE __BITS(5,0) 57 1.1 matt 58 1.1 matt #define L2C_CTL 0x100 59 1.2 matt #define CTL_ENABLE __BIT(1) 60 1.1 matt #define L2C_AUXCTL 0x104 61 1.4 reinoud #define AUXCTL_RSVD31 __BIT(31) 62 1.2 matt #define AUXCTL_EARLY_BRESP_EN __BIT(30) 63 1.2 matt #define AUXCTL_I_PREFETCH __BIT(29) 64 1.2 matt #define AUXCTL_D_PREFETCH __BIT(28) 65 1.2 matt #define AUXCTL_NS_INT_ACC_CTL __BIT(27) 66 1.2 matt #define AUXCTL_NS_INT_LOCK_EN __BIT(26) 67 1.2 matt #define AUXCTL_CACHE_REPL_RR __BIT(25) 68 1.2 matt #define AUXCTL_FORCE_WA __BITS(24,23) 69 1.2 matt #define AUXCTL_FORCE_WA_AWCACHE 0 70 1.2 matt #define AUXCTL_FORCE_WA_NEVER 1 71 1.2 matt #define AUXCTL_FORCE_WA_ALWAYS 2 72 1.2 matt #define AUXCTL_FORCE_WA_0 3 73 1.2 matt #define AUXCTL_SHARED_ATT_OVR __BIT(22) 74 1.2 matt #define AUXCTL_PARITY_EN __BIT(21) 75 1.2 matt #define AUXCTL_EVT_MON_BUS_EN __BIT(20) 76 1.2 matt #define AUXCTL_WAY_SIZE __BITS(19,17) 77 1.2 matt #define AUXCTL_WAY_SIZE_RSVD0 0 78 1.2 matt #define AUXCTL_WAY_SIZE_16KB 1 79 1.2 matt #define AUXCTL_WAY_SIZE_32KB 2 80 1.2 matt #define AUXCTL_WAY_SIZE_64KB 3 81 1.2 matt #define AUXCTL_WAY_SIZE_128KB 4 82 1.2 matt #define AUXCTL_WAY_SIZE_256KB 5 83 1.2 matt #define AUXCTL_WAY_SIZE_512KB 6 84 1.2 matt #define AUXCTL_WAY_SIZE_RSVD7 7 85 1.2 matt #define AUXCTL_ASSOCIATIVITY __BIT(16) 86 1.2 matt #define AUXCTL_SH_ATTR_INV_ENA __BIT(13) 87 1.2 matt #define AUXCTL_EXCL_CACHE_CFG __BIT(12) 88 1.2 matt #define AUXCTL_ST_BUF_DEV_LIM_EN __BIT(11) 89 1.2 matt #define AUXCTL_HIPRO_SO_DEV_EN __BIT(10) 90 1.2 matt #define AUXCTL_FULL_LINE_WR0 __BIT(0) 91 1.1 matt #define L2C_TAGRAM_CTL 0x108 92 1.1 matt #define L2C_DATARAM_CTL 0x10c 93 1.1 matt 94 1.1 matt #define L2C_EV_CTR_CTL 0x200 95 1.1 matt #define L2C_EV_CTR1_CTL 0x204 96 1.1 matt #define L2C_EV_CTR0_CTL 0x208 97 1.1 matt #define L2C_EV_CTR1 0x20c 98 1.1 matt #define L2C_EV_CTR0 0x210 99 1.1 matt #define L2C_INT_MASK 0x214 100 1.1 matt #define L2C_INT_MASK_STS 0x218 101 1.1 matt #define L2C_INT_RAW_STS 0x21c 102 1.1 matt #define L2C_INT_CLR 0x220 103 1.1 matt 104 1.1 matt #define L2C_CACHE_SYNC 0x730 105 1.1 matt #define L2C_INV_PA 0x770 106 1.1 matt #define L2C_INV_WAY 0x77c 107 1.1 matt #define L2C_CLEAN_PA 0x7b0 108 1.1 matt #define L2C_CLEAN_INDEX 0x7b8 109 1.1 matt #define L2C_CLEAN_WAY 0x7bc 110 1.1 matt #define L2C_CLEAN_INV_PA 0x7f0 111 1.1 matt #define L2C_CLEAN_INV_INDEX 0x7f8 112 1.1 matt #define L2C_CLEAN_INV_WAY 0x7fc 113 1.1 matt 114 1.1 matt #define L2C_D_LOCKDOWN0 0x900 115 1.1 matt #define L2C_I_LOCKDOWN0 0x904 116 1.1 matt #define L2C_D_LOCKDOWN1 0x908 117 1.1 matt #define L2C_I_LOCKDOWN1 0x90c 118 1.1 matt #define L2C_D_LOCKDOWN2 0x910 119 1.1 matt #define L2C_I_LOCKDOWN2 0x914 120 1.1 matt #define L2C_D_LOCKDOWN3 0x918 121 1.1 matt #define L2C_I_LOCKDOWN3 0x91c 122 1.1 matt #define L2C_D_LOCKDOWN4 0x920 123 1.1 matt #define L2C_I_LOCKDOWN4 0x924 124 1.1 matt #define L2C_D_LOCKDOWN5 0x928 125 1.1 matt #define L2C_I_LOCKDOWN5 0x92c 126 1.1 matt #define L2C_D_LOCKDOWN6 0x930 127 1.1 matt #define L2C_I_LOCKDOWN6 0x934 128 1.1 matt #define L2C_D_LOCKDOWN7 0x938 129 1.1 matt #define L2C_I_LOCKDOWN7 0x93c 130 1.1 matt #define L2C_LOCK_LINE_EN 0x950 131 1.1 matt #define L2C_UNLOCK_WAY 0x954 132 1.1 matt 133 1.1 matt #define L2C_ADDR_FILTER_START 0xc00 134 1.1 matt #define L2C_ADDR_FILTER_END 0xc04 135 1.1 matt 136 1.1 matt #define L2C_DEBUG_CTL 0xf40 137 1.1 matt #define L2C_PREFETCH_CTL 0xf60 138 1.3 reinoud #define PREFETCHCTL_DBLLINEF_EN __BIT(30) 139 1.3 reinoud #define PREFETCHCTL_INSTRPREF_EN __BIT(29) 140 1.3 reinoud #define PREFETCHCTL_DATAPREF_EN __BIT(28) 141 1.3 reinoud #define PREFETCHCTL_DBLLINEF_WRAP_DA __BIT(27) 142 1.3 reinoud #define PREFETCHCTL_PREF_DROP_EN __BIT(24) 143 1.3 reinoud #define PREFETCHCTL_INCRDBL_LINEF_EN __BIT(23) 144 1.3 reinoud #define PREFETCHCTL_NOSAMEID_EXCL_SEQ_EN __BIT(21) 145 1.3 reinoud #define PREFETCHCTL_PREFETCH_OFFSET_0 0 146 1.3 reinoud #define PREFETCHCTL_PREFETCH_OFFSET_7 7 147 1.3 reinoud #define PREFETCHCTL_PREFETCH_OFFSET_15 15 148 1.3 reinoud #define PREFETCHCTL_PREFETCH_OFFSET_23 23 149 1.3 reinoud #define PREFETCHCTL_PREFETCH_OFFSET_31 31 150 1.3 reinoud 151 1.1 matt #define L2C_POWER_CTL 0xf80 152 1.3 reinoud #define POWERCTL_DYNCLKGATE __BIT(1) 153 1.3 reinoud #define POWERCTL_STANDBY __BIT(0) 154 1.1 matt 155 1.1 matt #endif /* _ARM_CORTEX_PL310_REG_H_ */ 156