[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 10/28] hw/i2c/mpc_i2c: Fix mmio region size
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 10/28] hw/i2c/mpc_i2c: Fix mmio region size |
Date: |
Tue, 23 Jul 2024 22:38:37 +0200 |
From: BALATON Zoltan <balaton@eik.bme.hu>
The last register of this device is at offset 0x14 occupying 8 bits so
to cover it the mmio region needs to be 0x15 bytes long. Also correct
the name of the field storing this register value to match the
register name.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Fixes: 7abb479c7a ("PPC: E500: Add FSL I2C controller")
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240721225506.B32704E6039@zero.eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/i2c/mpc_i2c.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/i2c/mpc_i2c.c b/hw/i2c/mpc_i2c.c
index cb051a520f7..06d4ce7d68d 100644
--- a/hw/i2c/mpc_i2c.c
+++ b/hw/i2c/mpc_i2c.c
@@ -82,7 +82,7 @@ struct MPCI2CState {
uint8_t cr;
uint8_t sr;
uint8_t dr;
- uint8_t dfssr;
+ uint8_t dfsrr;
};
static bool mpc_i2c_is_enabled(MPCI2CState *s)
@@ -293,7 +293,7 @@ static void mpc_i2c_write(void *opaque, hwaddr addr,
}
break;
case MPC_I2C_DFSRR:
- s->dfssr = value;
+ s->dfsrr = value;
break;
default:
DPRINTF("ERROR: Bad write addr 0x%x\n", (unsigned int)addr);
@@ -319,7 +319,7 @@ static const VMStateDescription mpc_i2c_vmstate = {
VMSTATE_UINT8(cr, MPCI2CState),
VMSTATE_UINT8(sr, MPCI2CState),
VMSTATE_UINT8(dr, MPCI2CState),
- VMSTATE_UINT8(dfssr, MPCI2CState),
+ VMSTATE_UINT8(dfsrr, MPCI2CState),
VMSTATE_END_OF_LIST()
}
};
@@ -329,7 +329,7 @@ static void mpc_i2c_realize(DeviceState *dev, Error **errp)
MPCI2CState *i2c = MPC_I2C(dev);
sysbus_init_irq(SYS_BUS_DEVICE(dev), &i2c->irq);
memory_region_init_io(&i2c->iomem, OBJECT(i2c), &i2c_ops, i2c,
- "mpc-i2c", 0x14);
+ "mpc-i2c", 0x15);
sysbus_init_mmio(SYS_BUS_DEVICE(dev), &i2c->iomem);
i2c->bus = i2c_init_bus(dev, "i2c");
}
--
2.41.0
- [PULL 00/28] Misc HW+ patches for 2024-07-23, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 01/28] accel: Restrict probe_access*() functions to TCG, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 02/28] hw/i386/intel_iommu: Extract device IOTLB invalidation logic, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 03/28] hw/intc/loongson_ipi: Access memory in little endian, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 04/28] hw/intc/loongson_ipi: Fix resource leak, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 05/28] hw/intc/loongson_ipi: Declare QOM types using DEFINE_TYPES() macro, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 06/28] docs: Correct Loongarch -> LoongArch, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 07/28] docs/interop/firmware.json: add new enum FirmwareFormat, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 08/28] docs/interop/firmware.json: add new enum FirmwareArchitecture, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 09/28] docs/interop/firmware.json: convert "Example" section, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 10/28] hw/i2c/mpc_i2c: Fix mmio region size,
Philippe Mathieu-Daudé <=
- [PULL 11/28] hw/mips/loongson3_virt: remove useless type cast, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 12/28] util/range: Make ranges_overlap() return bool, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 15/28] system/memory_mapping: make range overlap check more readable, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 14/28] sparc/ldst_helper: make range overlap check more readable, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 13/28] cxl/mailbox: make range overlap check more readable, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 16/28] crypto/block-luks: make range overlap check more readable, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 18/28] hw/nubus/virtio-mmio: Fix missing ERRP_GUARD() in realize handler, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 19/28] hw/char/goldfish: Use DMA memory API, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 17/28] dump: make range overlap check more readable, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 20/28] chardev/char-fe: Document returned value on error, Philippe Mathieu-Daudé, 2024/07/23