OSDN Git Service

hw/i2c/npcm7xx_smbus: Simplify npcm7xx_smbus_init()
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Sun, 28 Feb 2021 22:48:13 +0000 (23:48 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 5 Mar 2021 15:17:34 +0000 (15:17 +0000)
The STATUS register will be reset to IDLE in
cnpcm7xx_smbus_enter_reset(), no need to preset
it in instance_init().

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Hao Wu <wuhaotsh@google.com>
Message-id: 20210228224813.312532-1-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/i2c/npcm7xx_smbus.c

index 6b2f9e1..e7e0ba6 100644 (file)
@@ -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 = {