doc: qemu-arm peripherials
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 28 Nov 2021 10:50:58 +0000 (11:50 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 30 Nov 2021 08:23:27 +0000 (09:23 +0100)
* add description how to add RNG device
* for a disk specify format=raw to avoid a warning
* fix a typo

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
doc/board/emulation/qemu-arm.rst
drivers/tpm/tpm2_tis_mmio.c

index 584ef0a..7c24e29 100644 (file)
@@ -65,7 +65,8 @@ can be enabled with the following command line parameters:
 
 - To add a Serial ATA disk via an Intel ICH9 AHCI controller, pass e.g.::
 
-    -drive if=none,file=disk.img,id=mydisk -device ich9-ahci,id=ahci -device ide-drive,drive=mydisk,bus=ahci.0
+    -drive if=none,file=disk.img,format=raw,id=mydisk \
+    -device ich9-ahci,id=ahci -device ide-drive,drive=mydisk,bus=ahci.0
 
 - To add an Intel E1000 network adapter, pass e.g.::
 
@@ -75,10 +76,14 @@ can be enabled with the following command line parameters:
 
     -device usb-ehci,id=ehci
 
-- To add a NVMe disk, pass e.g.::
+- To add an NVMe disk, pass e.g.::
 
     -drive if=none,file=disk.img,id=mydisk -device nvme,drive=mydisk,serial=foo
 
+- To add a random number generator, pass e.g.::
+
+    -device virtio-rng-pci
+
 These have been tested in QEMU 2.9.0 but should work in at least 2.5.0 as well.
 
 Enabling TPMv2 support
index 9cedff2..f04aab2 100644 (file)
@@ -118,10 +118,13 @@ iounmap:
 static int tpm_tis_remove(struct udevice *dev)
 {
        struct tpm_tis_chip_data *drv_data = (void *)dev_get_driver_data(dev);
+       int ret;
+
+       ret =  tpm_tis_cleanup(dev);
 
        iounmap(drv_data->iobase);
 
-       return tpm_tis_cleanup(dev);
+       return ret;
 }
 
 static const struct tpm_ops tpm_tis_ops = {