Rather than directly calling the device's implementation of its 'hold'
reset phase, call device_cold_reset(). This means we don't have to
adjust this callsite when we add another argument to the function
signature for the hold and exit reset methods.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Luc Michel <luc.michel@amd.com>
Message-id:
20240412160809.
1260625-3-peter.maydell@linaro.org
break;
case TWI_SRST_REG:
if (((value & TWI_SRST_MASK) == 0) && (s->srst & TWI_SRST_MASK)) {
- /* Perform reset */
- allwinner_i2c_reset_hold(OBJECT(s));
+ device_cold_reset(DEVICE(s));
}
s->srst = value & TWI_SRST_MASK;
break;
break;
case ADM1272_MFR_POWER_CYCLE:
- adm1272_exit_reset((Object *)s);
+ device_cold_reset(DEVICE(s));
break;
case ADM1272_HYSTERESIS_LOW: