blob: adaed8968eb9f2f2cab0f08061f9c8082fc13c30 [file] [log] [blame]
Stephen Warren8e5d8042016-09-23 17:43:49 -06001/*
2 * Copyright (c) 2016, NVIDIA CORPORATION.
3 *
4 * SPDX-License-Identifier: GPL-2.0
5 */
6
7#include <common.h>
8#include <asm/system.h>
9
10#define SMC_SIP_INVOKE_MCE 0x82FFFF00
11#define MCE_SMC_ROC_FLUSH_CACHE 11
12
13int __asm_flush_l3_cache(void)
14{
15 struct pt_regs regs = {0};
16
17 isb();
18
19 regs.regs[0] = SMC_SIP_INVOKE_MCE | MCE_SMC_ROC_FLUSH_CACHE;
20 smc_call(&regs);
21
22 return 0;
23}