blob: f293d65daead352f8fff6cd69d5be9d131ee98b0 [file] [log] [blame]
Aaron Williamsb2ea8182020-06-30 12:08:56 +02001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2020 Marvell International Ltd.
4 */
5
6#include <cpu_func.h>
7
Stefan Roese5e297f82020-08-24 13:04:41 +02008/* Octeon memory write barrier */
9#define CVMX_SYNCW asm volatile ("syncw\nsyncw\n" : : : "memory")
10
Aaron Williamsb2ea8182020-06-30 12:08:56 +020011void flush_dcache_range(ulong start_addr, ulong stop)
12{
Stefan Roese5e297f82020-08-24 13:04:41 +020013 /* Flush all pending writes */
14 CVMX_SYNCW;
Aaron Williamsb2ea8182020-06-30 12:08:56 +020015}
16
17void flush_cache(ulong start_addr, ulong size)
18{
19}
20
21void invalidate_dcache_range(ulong start_addr, ulong stop)
22{
Stefan Roese5e297f82020-08-24 13:04:41 +020023 /* Don't need to do anything for OCTEON */
Aaron Williamsb2ea8182020-06-30 12:08:56 +020024}