summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/tegra186/cache.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-09-27 12:47:25 -0400
committerTom Rini <trini@konsulko.com>2016-09-27 12:47:25 -0400
commit40e1236afeeacdadfa3865f70fc7e3b8016acbe2 (patch)
treea915b83d54beceb8a5c4fa424c0bcb6df56238d8 /arch/arm/mach-tegra/tegra186/cache.c
parent6d5565608f385b89f528ecf5680410cdc6cf63e9 (diff)
parent8e5d804f890b32959cc9d9f9349ccd2ff4a744a0 (diff)
downloadu-boot-imx-40e1236afeeacdadfa3865f70fc7e3b8016acbe2.zip
u-boot-imx-40e1236afeeacdadfa3865f70fc7e3b8016acbe2.tar.gz
u-boot-imx-40e1236afeeacdadfa3865f70fc7e3b8016acbe2.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-tegra
Diffstat (limited to 'arch/arm/mach-tegra/tegra186/cache.c')
-rw-r--r--arch/arm/mach-tegra/tegra186/cache.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/tegra186/cache.c b/arch/arm/mach-tegra/tegra186/cache.c
new file mode 100644
index 0000000..adaed89
--- /dev/null
+++ b/arch/arm/mach-tegra/tegra186/cache.c
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2016, NVIDIA CORPORATION.
+ *
+ * SPDX-License-Identifier: GPL-2.0
+ */
+
+#include <common.h>
+#include <asm/system.h>
+
+#define SMC_SIP_INVOKE_MCE 0x82FFFF00
+#define MCE_SMC_ROC_FLUSH_CACHE 11
+
+int __asm_flush_l3_cache(void)
+{
+ struct pt_regs regs = {0};
+
+ isb();
+
+ regs.regs[0] = SMC_SIP_INVOKE_MCE | MCE_SMC_ROC_FLUSH_CACHE;
+ smc_call(&regs);
+
+ return 0;
+}