2 * Copyright (C) 2016 Marvell International Ltd.
4 * SPDX-License-Identifier: GPL-2.0
5 * https://spdx.org/licenses
8 #include <asm/arch-armada8k/cache_llc.h>
9 #include <linux/linkage.h>
12 * int __asm_flush_l3_dcache
14 * flush Armada-8K last level cache.
17 ENTRY(__asm_flush_l3_dcache)
19 mov x0, #LLC_BASE_ADDR
20 add x0, x0, #LLC_FLUSH_BY_WAY
21 movk x0, #MVEBU_A8K_REGS_BASE_MSB, lsl #16
25 mov x0, #LLC_BASE_ADDR
26 add x0, x0, #LLC_CACHE_SYNC
27 movk x0, #MVEBU_A8K_REGS_BASE_MSB, lsl #16
29 /* check that cache sync completed */
30 mov x0, #LLC_BASE_ADDR
31 add x0, x0, #LLC_CACHE_SYNC_COMPLETE
32 movk x0, #MVEBU_A8K_REGS_BASE_MSB, lsl #16
34 and w1, w1, #LLC_CACHE_SYNC_MASK
39 ENDPROC(__asm_flush_l3_dcache)