qemu/include/hw/misc
Green Wan 51b6c1bbc3 hw/misc/sifive_u_otp: Add backend drive support
Add '-drive' support to OTP device. Allow users to assign a raw file
as OTP image.

test commands for 16k otp.img filled with zero:

$ dd if=/dev/zero of=./otp.img bs=1k count=16
$ ./qemu-system-riscv64 -M sifive_u -m 256M -nographic -bios none \
-kernel ../opensbi/build/platform/sifive/fu540/firmware/fw_payload.elf \
-d guest_errors -drive if=none,format=raw,file=otp.img

Signed-off-by: Green Wan <green.wan@sifive.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Tested-by: Bin Meng <bin.meng@windriver.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20201020033732.12921-3-green.wan@sifive.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-10-22 12:00:50 -07:00
..
macio Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
a9scu.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
allwinner-cpucfg.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
allwinner-h3-ccu.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
allwinner-h3-dramc.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
allwinner-h3-sysctrl.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
allwinner-sid.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
arm11scu.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
arm_integrator_debug.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
armsse-cpuid.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
armsse-mhu.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
aspeed_scu.h Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
aspeed_sdmc.h Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
aspeed_xdma.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
auxbus.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
avr_power.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
bcm2835_mbox_defs.h hw/arm/bcm283x: Correct the license text 2020-03-23 17:22:30 +00:00
bcm2835_mbox.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
bcm2835_mphi.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
bcm2835_property.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
bcm2835_rng.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
bcm2835_thermal.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
cbus.h Include hw/irq.h a lot less 2019-08-16 13:31:52 +02:00
empty_slot.h hw/misc/empty_slot: Name the slots when created 2020-06-09 06:59:44 +02:00
grlib_ahb_apb_pnp.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx6_ccm.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx6_src.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx6ul_ccm.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx7_ccm.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx7_gpr.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx7_snvs.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx25_ccm.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx31_ccm.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx_ccm.h Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx_rngc.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
iotkit-secctl.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
iotkit-sysctl.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
iotkit-sysinfo.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
ivshmem.h ivshmem: add check on protocol version in QEMU 2015-10-24 18:03:18 +02:00
mac_via.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
max111x.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
mips_cmgcr.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
mips_cpc.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
mips_itu.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
mos6522.h Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
mps2-fpgaio.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
mps2-scc.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
msf2-sysreg.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
npcm7xx_clk.h hw/misc: Add NPCM7xx Clock Controller device model 2020-09-14 14:24:58 +01:00
npcm7xx_gcr.h hw/misc: Add NPCM7xx System Global Control Registers device model 2020-09-14 14:24:15 +01:00
nrf51_rng.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
pca9552_regs.h misc: add pca9552 LED blinker model 2018-06-08 13:15:32 +01:00
pca9552.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
pvpanic.h include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
sifive_e_prci.h sifive: Use DECLARE_*CHECKER* macros 2020-09-18 13:49:48 -04:00
sifive_test.h sifive: Use DECLARE_*CHECKER* macros 2020-09-18 13:49:48 -04:00
sifive_u_otp.h hw/misc/sifive_u_otp: Add backend drive support 2020-10-22 12:00:50 -07:00
sifive_u_prci.h sifive: Use DECLARE_*CHECKER* macros 2020-09-18 13:49:48 -04:00
stm32f2xx_syscfg.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
stm32f4xx_exti.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
stm32f4xx_syscfg.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
tmp105_regs.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
tz-mpc.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
tz-msc.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
tz-ppc.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
unimp.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
vmcoreinfo.h qom: fix objects with improper parent type 2020-10-12 11:50:22 -04:00
zynq-xadc.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00