blob: c1540546a9a9f16ce3fe4efd99162af2d00cd3e6 [file] [log] [blame]
Chia-Wei Wang1c7ed532024-09-10 17:39:16 +08001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
4 * Copyright (C) 2024, Aspeed Technology Inc.
5 */
6
7#include <irq_func.h>
8#include <asm/cache.h>
9
10/*
11 * cleanup_before_linux() is called just before we call linux
12 * it prepares the processor for linux
13 *
14 * we disable interrupt and caches.
15 */
16int cleanup_before_linux(void)
17{
18 disable_interrupts();
19
20 cache_flush();
21
22 return 0;
23}