blob: f293d65daead352f8fff6cd69d5be9d131ee98b0 [file] [log] [blame]
Aaron Williams0dc4ab92020-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 Roese399b8672020-08-24 13:04:41 +02008/* Octeon memory write barrier */
9#define CVMX_SYNCW asm volatile ("syncw\nsyncw\n" : : : "memory")
10
Aaron Williams0dc4ab92020-06-30 12:08:56 +020011void flush_dcache_range(ulong start_addr, ulong stop)
12{
Stefan Roese399b8672020-08-24 13:04:41 +020013 /* Flush all pending writes */
14 CVMX_SYNCW;
Aaron Williams0dc4ab92020-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 Roese399b8672020-08-24 13:04:41 +020023 /* Don't need to do anything for OCTEON */
Aaron Williams0dc4ab92020-06-30 12:08:56 +020024}