]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/block/pflash_cfi01: Add missing DeviceReset() handler
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Mon, 1 Jul 2019 22:38:38 +0000 (00:38 +0200)
committerPhilippe Mathieu-Daudé <philmd@redhat.com>
Tue, 23 Jul 2019 09:31:07 +0000 (11:31 +0200)
commit3a283507c03474d285196620fca506bd1a89b198
treed3ad87af2e78ad82a8e1a9c15920b5bf950f22dc
parent23da9e297b4120ca9702cabec91599a44255fe96
hw/block/pflash_cfi01: Add missing DeviceReset() handler

To avoid incoherent states when the machine resets (see bug report
below), add the device reset callback.

A "system reset" sets the device state machine in READ_ARRAY mode
and, after some delay, set the SR.7 READY bit.

Since we do not model timings, we set the SR.7 bit directly.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1678713
Reported-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
[Laszlo Ersek: Regression tested EDK2 OVMF IA32X64, ArmVirtQemu Aarch64
 https://lists.gnu.org/archive/html/qemu-devel/2019-07/msg04373.html]
Message-Id: <20190718104837.13905-2-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
hw/block/pflash_cfi01.c