diff options
author | Tom Rini <trini@konsulko.com> | 2016-11-08 10:36:57 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-11-08 10:36:57 -0500 |
commit | 38cacdab3b5a6d8efd16a4b2620f7ab72144a624 (patch) | |
tree | 9512b7854ae573df2fa63591ff6d1c80ddc44d2b /arch/arm/mach-tegra/tegra186 | |
parent | d8c4eb60f8d1af74116eaee4f53adc937e618d6f (diff) | |
parent | a8d0526133e542ea93a741fd18833e571e817775 (diff) | |
download | u-boot-38cacdab3b5a6d8efd16a4b2620f7ab72144a624.tar.gz |
Merge branch 'master' of git://git.denx.de/u-boot-tegra
Diffstat (limited to 'arch/arm/mach-tegra/tegra186')
-rw-r--r-- | arch/arm/mach-tegra/tegra186/cache.S | 43 | ||||
-rw-r--r-- | arch/arm/mach-tegra/tegra186/cache.c | 23 | ||||
-rw-r--r-- | arch/arm/mach-tegra/tegra186/nvtboot_ll.S | 1 |
3 files changed, 44 insertions, 23 deletions
diff --git a/arch/arm/mach-tegra/tegra186/cache.S b/arch/arm/mach-tegra/tegra186/cache.S new file mode 100644 index 0000000000..3061dc2ecf --- /dev/null +++ b/arch/arm/mach-tegra/tegra186/cache.S @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2016, NVIDIA CORPORATION. + * + * SPDX-License-Identifier: GPL-2.0 + */ + +#include <config.h> +#include <linux/linkage.h> + +#define SMC_SIP_INVOKE_MCE 0x82FFFF00 +#define MCE_SMC_ROC_FLUSH_CACHE (SMC_SIP_INVOKE_MCE | 11) +#define MCE_SMC_ROC_FLUSH_CACHE_ONLY (SMC_SIP_INVOKE_MCE | 14) +#define MCE_SMC_ROC_CLEAN_CACHE_ONLY (SMC_SIP_INVOKE_MCE | 15) + +ENTRY(__asm_tegra_cache_smc) + mov x1, #0 + mov x2, #0 + mov x3, #0 + mov x4, #0 + mov x5, #0 + mov x6, #0 + smc #0 + mov x0, #0 + ret +ENDPROC(__asm_invalidate_l3_dcache) + +ENTRY(__asm_invalidate_l3_dcache) + mov x0, #(MCE_SMC_ROC_FLUSH_CACHE_ONLY & 0xffff) + movk x0, #(MCE_SMC_ROC_FLUSH_CACHE_ONLY >> 16), lsl #16 + b __asm_tegra_cache_smc +ENDPROC(__asm_invalidate_l3_dcache) + +ENTRY(__asm_flush_l3_dcache) + mov x0, #(MCE_SMC_ROC_CLEAN_CACHE_ONLY & 0xffff) + movk x0, #(MCE_SMC_ROC_CLEAN_CACHE_ONLY >> 16), lsl #16 + b __asm_tegra_cache_smc +ENDPROC(__asm_flush_l3_dcache) + +ENTRY(__asm_invalidate_l3_icache) + mov x0, #(MCE_SMC_ROC_FLUSH_CACHE & 0xffff) + movk x0, #(MCE_SMC_ROC_FLUSH_CACHE >> 16), lsl #16 + b __asm_tegra_cache_smc +ENDPROC(__asm_invalidate_l3_icache) diff --git a/arch/arm/mach-tegra/tegra186/cache.c b/arch/arm/mach-tegra/tegra186/cache.c deleted file mode 100644 index adaed8968e..0000000000 --- a/arch/arm/mach-tegra/tegra186/cache.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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; -} diff --git a/arch/arm/mach-tegra/tegra186/nvtboot_ll.S b/arch/arm/mach-tegra/tegra186/nvtboot_ll.S index 1eab890958..899c9cccbe 100644 --- a/arch/arm/mach-tegra/tegra186/nvtboot_ll.S +++ b/arch/arm/mach-tegra/tegra186/nvtboot_ll.S @@ -9,6 +9,7 @@ #include <config.h> #include <linux/linkage.h> +.align 8 .globl nvtboot_boot_x0 nvtboot_boot_x0: .dword 0 |