hw/i2c/npcm7xx_smbus: Simplify npcm7xx_smbus_init()
PATCH 1/1 hw/i2c/npcm7xx_smbus: Simplify npcm7xx_smbus_init()
The STATUS register will be reset to IDLE incnpcm7xx_smbus_enter_reset(), no need to preset
it in instance_init().
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
--- hw/i2c/npcm7xx_smbus.c | 1 - 1 file changed, 1 deletion(-)
hw/i2c/npcm7xx_smbus.c +0 -1
@@ -1040,7 +1040,6 @@ static void npcm7xx_smbus_init(Object *obj)sysbus_init_mmio (sbd, &s->iomem); s->bus =i2c_init_bus (DEVICE (s),"i2c-bus" ); - s->status =NPCM7XX_SMBUS_STATUS_IDLE ; }static const VMStateDescription vmstate_npcm7xx_smbus = {
Signature · 1 line
2.26.2
Quoted 6 lines · Philippe Mathieu-Daudé
The STATUS register will be reset to IDLE in
cnpcm7xx_smbus_enter_reset(), no need to preset
it ininstance_init().Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Reviewed-by Hao Wu <[email protected]>
Quoted 21 lines
--- hw/i2c/npcm7xx_smbus.c | 1 - 1 file changed, 1 deletion(-)hw/i2c/npcm7xx_smbus.c +0
-2@@ -1040,7 +1040,6 @@ static void npcm7xx_smbus_init(Object *obj)sysbus_init_mmio (sbd, &s->iomem); s->bus =i2c_init_bus (DEVICE (s),"i2c-bus" ); - s->status =NPCM7XX_SMBUS_STATUS_IDLE ; }static const VMStateDescription vmstate_npcm7xx_smbus = { --2.26.2
Peter Maydell
AppliedQuoted 15 lines · Philippe Mathieu-Daudé
The STATUS register will be reset to IDLE in
cnpcm7xx_smbus_enter_reset(), no need to preset
it ininstance_init().Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/i2c/npcm7xx_smbus.c | 1 - 1 file changed, 1 deletion(-)hw/i2c/npcm7xx_smbus.c +0
-0
hw/i2c/npcm7xx_smbus.c static void npcm7xx_smbus_init(Object *obj) · line 1045
Quoted 7 lines
hw/i2c/npcm7xx_smbus.c +0
-1@@ -1040,7 +1040,6 @@ static void npcm7xx_smbus_init(Object *obj)sysbus_init_mmio (sbd, &s->iomem); s->bus =i2c_init_bus (DEVICE (s),"i2c-bus" ); - s->status =NPCM7XX_SMBUS_STATUS_IDLE ; } static const VMStateDescription vmstate_npcm7xx_smbus =
Applied to target-arm.next, thanks.
-- PMM