Home | History | Annotate | Line # | Download | only in cortex
pl310_reg.h revision 1.2.6.2
      1 /* $NetBSD: pl310_reg.h,v 1.2.6.2 2012/11/28 22:40:27 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 
     48 #define	L2C_CACHE_TYPE		0x004
     49 #define	 CACHE_TYPE_DATA_BANKING __BIT(31)
     50 #define	 CACHE_TYPE_CTYPE	__BITS(28,25)
     51 #define	 CACHE_TYPE_HARVARD	__BIT(24)
     52 #define	 CACHE_TYPE_DSIZE	__BITS(23,12)
     53 #define	 CACHE_TYPE_ISIZE	__BITS(11,0)
     54 #define	 CACHE_TYPE_xWAYSIZE	__BITS(10,8)
     55 #define	 CACHE_TYPE_xASSOC	__BIT(6)
     56 #define	 CACHE_TYPE_xLINESIZE	__BITS(5,0)
     57 
     58 #define	L2C_CTL			0x100
     59 #define	 CTL_ENABLE		__BIT(1)
     60 #define	L2C_AUXCTL		0x104
     61 #define	 AUXCTL_EARLY_BRESP_EN	__BIT(30)
     62 #define	 AUXCTL_I_PREFETCH	__BIT(29)
     63 #define	 AUXCTL_D_PREFETCH	__BIT(28)
     64 #define	 AUXCTL_NS_INT_ACC_CTL	__BIT(27)
     65 #define	 AUXCTL_NS_INT_LOCK_EN	__BIT(26)
     66 #define	 AUXCTL_CACHE_REPL_RR	__BIT(25)
     67 #define	 AUXCTL_FORCE_WA	__BITS(24,23)
     68 #define	 AUXCTL_FORCE_WA_AWCACHE 0
     69 #define	 AUXCTL_FORCE_WA_NEVER	1
     70 #define	 AUXCTL_FORCE_WA_ALWAYS	2
     71 #define	 AUXCTL_FORCE_WA_0	3
     72 #define	 AUXCTL_SHARED_ATT_OVR	__BIT(22)
     73 #define	 AUXCTL_PARITY_EN	__BIT(21)
     74 #define	 AUXCTL_EVT_MON_BUS_EN	__BIT(20)
     75 #define	 AUXCTL_WAY_SIZE	__BITS(19,17)
     76 #define  AUXCTL_WAY_SIZE_RSVD0	0
     77 #define  AUXCTL_WAY_SIZE_16KB	1
     78 #define  AUXCTL_WAY_SIZE_32KB	2
     79 #define  AUXCTL_WAY_SIZE_64KB	3
     80 #define  AUXCTL_WAY_SIZE_128KB	4
     81 #define  AUXCTL_WAY_SIZE_256KB	5
     82 #define  AUXCTL_WAY_SIZE_512KB	6
     83 #define  AUXCTL_WAY_SIZE_RSVD7	7
     84 #define	 AUXCTL_ASSOCIATIVITY	__BIT(16)
     85 #define	 AUXCTL_SH_ATTR_INV_ENA	__BIT(13)
     86 #define	 AUXCTL_EXCL_CACHE_CFG	__BIT(12)
     87 #define	 AUXCTL_ST_BUF_DEV_LIM_EN	__BIT(11)
     88 #define	 AUXCTL_HIPRO_SO_DEV_EN	__BIT(10)
     89 #define	 AUXCTL_FULL_LINE_WR0	__BIT(0)
     90 #define	L2C_TAGRAM_CTL		0x108
     91 #define	L2C_DATARAM_CTL		0x10c
     92 
     93 #define	L2C_EV_CTR_CTL		0x200
     94 #define	L2C_EV_CTR1_CTL		0x204
     95 #define	L2C_EV_CTR0_CTL		0x208
     96 #define	L2C_EV_CTR1		0x20c
     97 #define	L2C_EV_CTR0		0x210
     98 #define	L2C_INT_MASK		0x214
     99 #define	L2C_INT_MASK_STS	0x218
    100 #define	L2C_INT_RAW_STS		0x21c
    101 #define	L2C_INT_CLR		0x220
    102 
    103 #define	L2C_CACHE_SYNC		0x730
    104 #define	L2C_INV_PA		0x770
    105 #define	L2C_INV_WAY		0x77c
    106 #define	L2C_CLEAN_PA		0x7b0
    107 #define	L2C_CLEAN_INDEX		0x7b8
    108 #define	L2C_CLEAN_WAY		0x7bc
    109 #define	L2C_CLEAN_INV_PA	0x7f0
    110 #define	L2C_CLEAN_INV_INDEX	0x7f8
    111 #define	L2C_CLEAN_INV_WAY	0x7fc
    112 
    113 #define	L2C_D_LOCKDOWN0		0x900
    114 #define	L2C_I_LOCKDOWN0		0x904
    115 #define	L2C_D_LOCKDOWN1		0x908
    116 #define	L2C_I_LOCKDOWN1		0x90c
    117 #define	L2C_D_LOCKDOWN2		0x910
    118 #define	L2C_I_LOCKDOWN2		0x914
    119 #define	L2C_D_LOCKDOWN3		0x918
    120 #define	L2C_I_LOCKDOWN3		0x91c
    121 #define	L2C_D_LOCKDOWN4		0x920
    122 #define	L2C_I_LOCKDOWN4		0x924
    123 #define	L2C_D_LOCKDOWN5		0x928
    124 #define	L2C_I_LOCKDOWN5		0x92c
    125 #define	L2C_D_LOCKDOWN6		0x930
    126 #define	L2C_I_LOCKDOWN6		0x934
    127 #define	L2C_D_LOCKDOWN7		0x938
    128 #define	L2C_I_LOCKDOWN7		0x93c
    129 #define	L2C_LOCK_LINE_EN	0x950
    130 #define	L2C_UNLOCK_WAY		0x954
    131 
    132 #define	L2C_ADDR_FILTER_START	0xc00
    133 #define	L2C_ADDR_FILTER_END	0xc04
    134 
    135 #define	L2C_DEBUG_CTL		0xf40
    136 #define	L2C_PREFETCH_CTL	0xf60
    137 #define	L2C_POWER_CTL		0xf80
    138 
    139 #endif /* _ARM_CORTEX_PL310_REG_H_ */
    140