summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorMarcel Apfelbaum <marcel@redhat.com>2015-01-06 15:29:16 +0200
committerPeter Maydell <peter.maydell@linaro.org>2015-01-08 17:32:27 +0000
commitd941fba0b5fa75604503aac9b3bcc2aa38b03cd0 (patch)
treeddf8e63dc86e4444874021ffeea26ee45d612cbb /hw
parentb1c2fb9b29c325a6944ce4ddddef9fe7e9af26bd (diff)
downloadhqemu-d941fba0b5fa75604503aac9b3bcc2aa38b03cd0.zip
hqemu-d941fba0b5fa75604503aac9b3bcc2aa38b03cd0.tar.gz
hw/ppc/spapr: simplify usb controller creation logic
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Alexander Graf <agraf@suse.de> Message-id: 1420550957-22337-6-git-send-email-marcel@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/ppc/spapr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 72c3102..53c4116 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1484,9 +1484,10 @@ static void ppc_spapr_init(MachineState *machine)
/* Graphics */
if (spapr_vga_init(phb->bus)) {
spapr->has_graphics = true;
+ machine->usb |= defaults_enabled();
}
- if ((spapr->has_graphics && defaults_enabled()) || usb_enabled()) {
+ if (machine->usb) {
pci_create_simple(phb->bus, -1, "pci-ohci");
if (spapr->has_graphics) {
usbdevice_create("keyboard");
OpenPOWER on IntegriCloud