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>
|
2018-12-12 14:12:25 +00:00
|
|
|
#include <dm.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;
|
|
|
|
}
|
2018-12-12 14:12:25 +00:00
|
|
|
|
|
|
|
/* To enumerate devices on the /soc/ node, create a "simple-bus" driver */
|
|
|
|
static const struct udevice_id riscv_virtio_soc_ids[] = {
|
|
|
|
{ .compatible = "riscv-virtio-soc" },
|
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
|
|
|
U_BOOT_DRIVER(riscv_virtio_soc) = {
|
|
|
|
.name = "riscv_virtio_soc",
|
|
|
|
.id = UCLASS_SIMPLE_BUS,
|
|
|
|
.of_match = riscv_virtio_soc_ids,
|
|
|
|
.flags = DM_FLAG_PRE_RELOC,
|
|
|
|
};
|