summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorAlper Nebi Yasak <[email protected]>2023-08-14 20:39:43 +0300
committerTom Rini <[email protected]>2023-08-24 16:47:25 -0400
commit05e2fa79310ab30dd3e3fe522333aef3cfb1c421 (patch)
tree261e12aed28a3efa9ee1b6f2d3fc582680c8b848 /board
parent120f540a71e425efc702308352453ddf443a2c98 (diff)
arm: qemu: Enable usb keyboard as an input device
Commit 02be57caf730 ("riscv: qemu: Enable usb keyboard as an input device") adds PCI xHCI support to QEMU RISC-V virtual machines and enables using a USB keyboard as one of the input devices. Similarly, enable those for ARM virtual machines as well. Signed-off-by: Alper Nebi Yasak <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
Diffstat (limited to 'board')
-rw-r--r--board/emulation/qemu-arm/qemu-arm.c5
-rw-r--r--board/emulation/qemu-arm/qemu-arm.env2
2 files changed, 6 insertions, 1 deletions
diff --git a/board/emulation/qemu-arm/qemu-arm.c b/board/emulation/qemu-arm/qemu-arm.c
index dfea0d92a3c..942f1fff571 100644
--- a/board/emulation/qemu-arm/qemu-arm.c
+++ b/board/emulation/qemu-arm/qemu-arm.c
@@ -11,6 +11,7 @@
#include <fdtdec.h>
#include <init.h>
#include <log.h>
+#include <usb.h>
#include <virtio_types.h>
#include <virtio.h>
@@ -114,6 +115,10 @@ int board_late_init(void)
*/
virtio_init();
+ /* start usb so that usb keyboard can be used as input device */
+ if (CONFIG_IS_ENABLED(USB_KEYBOARD))
+ usb_init();
+
return 0;
}
diff --git a/board/emulation/qemu-arm/qemu-arm.env b/board/emulation/qemu-arm/qemu-arm.env
index 86a99a2e871..fb4adef281e 100644
--- a/board/emulation/qemu-arm/qemu-arm.env
+++ b/board/emulation/qemu-arm/qemu-arm.env
@@ -2,7 +2,7 @@
/* environment for qemu-arm and qemu-arm64 */
-stdin=serial
+stdin=serial,usbkbd
stdout=serial,vidconsole
stderr=serial,vidconsole
fdt_high=0xffffffff