aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Beschow <shentey@gmail.com>2024-11-03 14:33:51 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-11-05 23:32:25 +0000
commitb5d65592d931d07d4f4bcb915d018ec9598058b4 (patch)
tree0f66614b465a9d0cc849d4cda7effdcbf48299f3
parent2a309354ac5decf78763c9de999bfb42c8612069 (diff)
downloadqemu-b5d65592d931d07d4f4bcb915d018ec9598058b4.zip
qemu-b5d65592d931d07d4f4bcb915d018ec9598058b4.tar.gz
qemu-b5d65592d931d07d4f4bcb915d018ec9598058b4.tar.bz2
hw/ppc/e500: Add missing device tree properties to i2c controller node
When compiling a decompiled device tree blob created with dumpdtb, dtc complains with: /soc@e0000000/i2c@3000: incorrect #address-cells for I2C bus /soc@e0000000/i2c@3000: incorrect #size-cells for I2C bus Fix this by adding the missing device tree properties. Reviewed-by: Cédric Le Goater <clg@redhat.com> Signed-off-by: Bernhard Beschow <shentey@gmail.com> Message-ID: <20241103133412.73536-6-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
-rw-r--r--hw/ppc/e500.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index d4d3a92..4626122 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -203,6 +203,8 @@ static void dt_i2c_create(void *fdt, const char *soc, const char *mpic,
qemu_fdt_setprop_cells(fdt, i2c, "cell-index", 0);
qemu_fdt_setprop_cells(fdt, i2c, "interrupts", irq0, 0x2);
qemu_fdt_setprop_phandle(fdt, i2c, "interrupt-parent", mpic);
+ qemu_fdt_setprop_cell(fdt, i2c, "#size-cells", 0);
+ qemu_fdt_setprop_cell(fdt, i2c, "#address-cells", 1);
qemu_fdt_setprop_string(fdt, "/aliases", alias, i2c);
g_free(i2c);