[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 05/26] hw/ppc/e500: Add missing device tree properties to i2c
From: |
Bernhard Beschow |
Subject: |
[PATCH v3 05/26] hw/ppc/e500: Add missing device tree properties to i2c controller node |
Date: |
Sat, 2 Nov 2024 14:16:54 +0100 |
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>
---
hw/ppc/e500.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index ecaaab1558..a0c856568b 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -196,6 +196,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);
--
2.47.0
- Re: [PATCH v3 22/26] hw/i2c/smbus_eeprom: Prefer DEFINE_TYPES() macro, (continued)
[PATCH v3 21/26] hw/block/pflash_cfi01: Prefer DEFINE_TYPES() macro, Bernhard Beschow, 2024/11/02
[PATCH v3 01/26] hw/ppc/e500: Do not leak struct boot_info, Bernhard Beschow, 2024/11/02
[PATCH v3 23/26] hw/rtc/ds1338: Prefer DEFINE_TYPES() macro, Bernhard Beschow, 2024/11/02
[PATCH v3 02/26] hw/ppc/e500: Remove firstenv variable, Bernhard Beschow, 2024/11/02
[PATCH v3 09/26] hw/ppc/ppce500_ccsr: Trace access to CCSR region, Bernhard Beschow, 2024/11/02
[PATCH v3 08/26] hw/ppc/e500: Extract ppce500_ccsr.c, Bernhard Beschow, 2024/11/02
[PATCH v3 26/26] MAINTAINERS: Add hw/gpio/gpio_pwr.c, Bernhard Beschow, 2024/11/02
[PATCH v3 04/26] hw/ppc/e500: Remove unused "irqs" parameter, Bernhard Beschow, 2024/11/02
[PATCH v3 05/26] hw/ppc/e500: Add missing device tree properties to i2c controller node,
Bernhard Beschow <=
[PATCH v3 03/26] hw/ppc/e500: Prefer QOM cast, Bernhard Beschow, 2024/11/02
[PATCH v3 11/26] hw/i2c/mpc_i2c: Convert DPRINTF to trace events for register access, Bernhard Beschow, 2024/11/02
[PATCH v3 16/26] hw/net/fsl_etsec/etsec: Prefer DEFINE_TYPES() macro, Bernhard Beschow, 2024/11/02
[PATCH v3 17/26] hw/gpio/mpc8xxx: Prefer DEFINE_TYPES() macro, Bernhard Beschow, 2024/11/02
[PATCH v3 07/26] hw/ppc/e500: Use SysBusDevice API to access TYPE_CCSR's internal resources, Bernhard Beschow, 2024/11/02
[PATCH v3 20/26] hw/sd/sdhci: Prefer DEFINE_TYPES() macro, Bernhard Beschow, 2024/11/02
[PATCH v3 13/26] hw/pci-host/ppce500: Reuse TYPE_PPC_E500_PCI_BRIDGE define, Bernhard Beschow, 2024/11/02