diff options
author | Gregory CLEMENT <gregory.clement@free-electrons.com> | 2012-11-05 19:58:07 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-11-06 14:47:35 -0500 |
commit | b8db6b886a1fecd6a5b1d13b190f3149247305ef (patch) | |
tree | 382e1fc446b99ee32e3f64d399f27e3af32d5782 /arch/arm/mm/cache-aurora-l2.h | |
parent | c3545236e8740ab556022f87685d18503c86e187 (diff) |
ARM: 7547/4: cache-l2x0: add support for Aurora L2 cache ctrl
Aurora Cache Controller was designed to be compatible with the ARM L2
Cache Controller. It comes with some difference or improvement such
as:
- no cache id part number available through hardware (need to get it
by the DT).
- always write through mode available.
- two flavors of the controller outer cache and system cache (meaning
maintenance operations on L1 are broadcasted to the L2 and L2
performs the same operation).
- in outer cache mode, the cache maintenance operations are improved and
can be done on a range inside a page and are not limited to a cache
line.
Tested-and-Reviewed-by: Lior Amsalem <alior@marvell.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Yehuda Yitschak <yehuday@marvell.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/cache-aurora-l2.h')
-rw-r--r-- | arch/arm/mm/cache-aurora-l2.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/arch/arm/mm/cache-aurora-l2.h b/arch/arm/mm/cache-aurora-l2.h new file mode 100644 index 000000000000..c86124769831 --- /dev/null +++ b/arch/arm/mm/cache-aurora-l2.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * AURORA shared L2 cache controller support | ||
3 | * | ||
4 | * Copyright (C) 2012 Marvell | ||
5 | * | ||
6 | * Yehuda Yitschak <yehuday@marvell.com> | ||
7 | * Gregory CLEMENT <gregory.clement@free-electrons.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARM_HARDWARE_AURORA_L2_H | ||
15 | #define __ASM_ARM_HARDWARE_AURORA_L2_H | ||
16 | |||
17 | #define AURORA_SYNC_REG 0x700 | ||
18 | #define AURORA_RANGE_BASE_ADDR_REG 0x720 | ||
19 | #define AURORA_FLUSH_PHY_ADDR_REG 0x7f0 | ||
20 | #define AURORA_INVAL_RANGE_REG 0x774 | ||
21 | #define AURORA_CLEAN_RANGE_REG 0x7b4 | ||
22 | #define AURORA_FLUSH_RANGE_REG 0x7f4 | ||
23 | |||
24 | #define AURORA_ACR_REPLACEMENT_OFFSET 27 | ||
25 | #define AURORA_ACR_REPLACEMENT_MASK \ | ||
26 | (0x3 << AURORA_ACR_REPLACEMENT_OFFSET) | ||
27 | #define AURORA_ACR_REPLACEMENT_TYPE_WAYRR \ | ||
28 | (0 << AURORA_ACR_REPLACEMENT_OFFSET) | ||
29 | #define AURORA_ACR_REPLACEMENT_TYPE_LFSR \ | ||
30 | (1 << AURORA_ACR_REPLACEMENT_OFFSET) | ||
31 | #define AURORA_ACR_REPLACEMENT_TYPE_SEMIPLRU \ | ||
32 | (3 << AURORA_ACR_REPLACEMENT_OFFSET) | ||
33 | |||
34 | #define AURORA_ACR_FORCE_WRITE_POLICY_OFFSET 0 | ||
35 | #define AURORA_ACR_FORCE_WRITE_POLICY_MASK \ | ||
36 | (0x3 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET) | ||
37 | #define AURORA_ACR_FORCE_WRITE_POLICY_DIS \ | ||
38 | (0 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET) | ||
39 | #define AURORA_ACR_FORCE_WRITE_BACK_POLICY \ | ||
40 | (1 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET) | ||
41 | #define AURORA_ACR_FORCE_WRITE_THRO_POLICY \ | ||
42 | (2 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET) | ||
43 | |||
44 | #define MAX_RANGE_SIZE 1024 | ||
45 | |||
46 | #define AURORA_WAY_SIZE_SHIFT 2 | ||
47 | |||
48 | #define AURORA_CTRL_FW 0x100 | ||
49 | |||
50 | /* chose a number outside L2X0_CACHE_ID_PART_MASK to be sure to make | ||
51 | * the distinction between a number coming from hardware and a number | ||
52 | * coming from the device tree */ | ||
53 | #define AURORA_CACHE_ID 0x100 | ||
54 | |||
55 | #endif /* __ASM_ARM_HARDWARE_AURORA_L2_H */ | ||