hw/pflash: fix block write start
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 16 May 2024 12:12:37 +0000 (14:12 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 17 May 2024 14:49:04 +0000 (16:49 +0200)
commit2563be6317fa9b5e661d79581538c704ecb90a1a
treeeb985ef1ff4d84f8b35144aaa2a3d0636ce355bb
parent3dba3c0b2501e6afa9f722608be6a343465895da
hw/pflash: fix block write start

Move the pflash_blk_write_start() call.  We need the offset of the
first data write, not the offset for the setup (number-of-bytes)
write.  Without this fix u-boot can do block writes to the first
flash block only.

While being at it drop a leftover FIXME.

Cc: qemu-stable@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2343
Fixes: 284a7ee2e290 ("hw/pflash: implement update buffer for block writes")
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240516121237.534875-1-kraxel@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/block/pflash_cfi01.c