diff options
Diffstat (limited to 'arch/riscv/cpu/ast2700/cpu.c')
-rw-r--r-- | arch/riscv/cpu/ast2700/cpu.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/riscv/cpu/ast2700/cpu.c b/arch/riscv/cpu/ast2700/cpu.c new file mode 100644 index 00000000000..c1540546a9a --- /dev/null +++ b/arch/riscv/cpu/ast2700/cpu.c @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com> + * Copyright (C) 2024, Aspeed Technology Inc. + */ + +#include <irq_func.h> +#include <asm/cache.h> + +/* + * 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; +} |