hw/misc/sifive_u_otp: Do not reset OTP content on hardware reset
commit526e7443027c71fe7b04c29df529e1f9f425f9e3
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Fri, 19 Nov 2021 10:47:57 +0000 (19 11:47 +0100)
committerAlistair Francis <alistair.francis@wdc.com>
Mon, 22 Nov 2021 00:46:22 +0000 (22 10:46 +1000)
tree501b5aa7d1b621ac6587cd6550a644ba68d16ee9
parent6b717a8d4482fa88fb2a40b5afd5a55e7a0ba412
hw/misc/sifive_u_otp: Do not reset OTP content on hardware reset

Once a "One Time Programmable" is programmed, it shouldn't be reset.

Do not re-initialize the OTP content in the DeviceReset handler,
initialize it once in the DeviceRealize one.

Fixes: 9fb45c62ae8 ("riscv: sifive: Implement a model for SiFive FU540 OTP")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20211119104757.331579-1-f4bug@amsat.org>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
hw/misc/sifive_u_otp.c