2018-09-26 13:55:21 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2019-11-14 19:57:42 +00:00
|
|
|
#include <irq_func.h>
|
2020-05-10 17:39:56 +00:00
|
|
|
#include <asm/cache.h>
|
2018-09-26 13:55:21 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 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();
|
|
|
|
|
2018-11-07 01:34:06 +00:00
|
|
|
cache_flush();
|
2018-09-26 13:55:21 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|