mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-12 15:53:21 +09:00
![Bin Meng](/assets/img/avatar_default.png)
Currently devices on the virtio bus is not automatically enumerated, which means peripherals on the virtio bus are not discovered by their drivers. This uses board_init() to do the virtio enumeration. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
33 lines
577 B
C
33 lines
577 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <dm.h>
|
|
#include <fdtdec.h>
|
|
#include <virtio_types.h>
|
|
#include <virtio.h>
|
|
|
|
#define MROM_FDT_ADDR 0x1020
|
|
|
|
int board_init(void)
|
|
{
|
|
/*
|
|
* Make sure virtio bus is enumerated so that peripherals
|
|
* on the virtio bus can be discovered by their drivers
|
|
*/
|
|
virtio_init();
|
|
|
|
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;
|
|
}
|