mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-10-20 13:04:51 +00:00
8e5d804f89
On Tegra186, it is necessary to perform an SMC to fully flush all caches; flushing/cleaning by set/way is not enough. Implement the required hook to make this happen. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
23 lines
374 B
C
23 lines
374 B
C
/*
|
|
* 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(®s);
|
|
|
|
return 0;
|
|
}
|