blob: 1d7c026584a05b433e90090d30c1c307b7f440e1 [file] [log] [blame]
Yanhong Wange28ec342023-03-29 11:42:08 +08001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2022 StarFive Technology Co., Ltd.
4 * Author: Yanhong Wang <yanhong.wang@starfivetech.com>
5 */
6
7#include <asm/cache.h>
8#include <irq_func.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}