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-10-15 09:21:13 +00:00
|
|
|
#include <dm.h>
|
2018-09-26 13:55:21 +00:00
|
|
|
#include <fdtdec.h>
|
2018-10-15 09:21:13 +00:00
|
|
|
#include <virtio_types.h>
|
|
|
|
#include <virtio.h>
|
2018-09-26 13:55:21 +00:00
|
|
|
|
|
|
|
#define MROM_FDT_ADDR 0x1020
|
|
|
|
|
|
|
|
int board_init(void)
|
|
|
|
{
|
2018-10-15 09:21:13 +00:00
|
|
|
/*
|
|
|
|
* Make sure virtio bus is enumerated so that peripherals
|
|
|
|
* on the virtio bus can be discovered by their drivers
|
|
|
|
*/
|
|
|
|
virtio_init();
|
|
|
|
|
2018-09-26 13:55:21 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void *board_fdt_blob_setup(void)
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* QEMU loads a generated DTB for us immediately
|
|
|
|
* after the reset vectors in the MROM
|
|
|
|
*/
|
|
|
|
return (void *)MROM_FDT_ADDR;
|
|
|
|
}
|