diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2013-07-16 13:25:10 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2013-07-19 12:58:47 +0100 |
commit | 3b1cceb8b52320150fd93dc094ba11fd01c6adfa (patch) | |
tree | 97f7d7475135b5bff8846564bae9911e352eff52 /hw/arm/boot.c | |
parent | 4b52530be987f33f8bffbdec9826298ad53ec180 (diff) |
arm/boot: Allow boards to modify the FDT blob
Add a callback hook in arm_boot_info to allow board models to
modify the device tree blob if they need to. (The major expected
use case is to add virtio-mmio nodes for virtio-mmio transports
that exist in QEMU but not in the hardware.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1373977512-28932-7-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'hw/arm/boot.c')
-rw-r--r-- | hw/arm/boot.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/arm/boot.c b/hw/arm/boot.c index 1780316afb..9fbe5d22a5 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -294,6 +294,11 @@ static int load_dtb(hwaddr addr, const struct arm_boot_info *binfo) goto fail; } } + + if (binfo->modify_dtb) { + binfo->modify_dtb(binfo, fdt); + } + qemu_devtree_dumpdtb(fdt, size); cpu_physical_memory_write(addr, fdt, size); |