From a74e9d899d98037c75ca770d02367e26c179b45c Mon Sep 17 00:00:00 2001 From: Green Wan Date: Thu, 27 May 2021 06:52:07 -0700 Subject: riscv: cpu: fu740: Add support for cpu fu740 Add SiFive fu740 cpu to support RISC-V arch Signed-off-by: Green Wan Reviewed-by: Bin Meng --- arch/riscv/cpu/fu740/cpu.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 arch/riscv/cpu/fu740/cpu.c (limited to 'arch/riscv/cpu/fu740/cpu.c') diff --git a/arch/riscv/cpu/fu740/cpu.c b/arch/riscv/cpu/fu740/cpu.c new file mode 100644 index 00000000000..f13c18942f3 --- /dev/null +++ b/arch/riscv/cpu/fu740/cpu.c @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2018, Bin Meng + */ + +#include +#include + +/* + * cleanup_before_linux() is called just before we call linux + * it prepares the processor for linux + * + * we disable interrupt and caches. + */ +int cleanup_before_linux(void) +{ + disable_interrupts(); + + cache_flush(); + + return 0; +} -- cgit v1.2.3