blob: d78e1a3453af9c517a8eb6ae3966465ed1726e4a [file] [log] [blame]
Bin Meng8a8694d2018-09-26 06:55:21 -07001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
4 */
5
6#include <common.h>
Simon Glass8f3f7612019-11-14 12:57:42 -07007#include <irq_func.h>
Simon Glass274e0b02020-05-10 11:39:56 -06008#include <asm/cache.h>
Bin Meng8a8694d2018-09-26 06:55:21 -07009
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
Rick Chen842d5802018-11-07 09:34:06 +080020 cache_flush();
Bin Meng8a8694d2018-09-26 06:55:21 -070021
22 return 0;
23}