diff options
author | zhlcindy@gmail.com <zhlcindy@gmail.com> | 2012-09-02 19:25:28 +0000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2012-10-29 11:45:54 +0100 |
commit | 094b287f0b3b79d1e68df8f3a63cb144ec9cdfb6 (patch) | |
tree | 1f3d884968c40a2375be2b3d54a82e11bd25fae2 /hw/nseries.c | |
parent | 59de4f98d14fb84f04181a6f816ef6dd8b82dd79 (diff) | |
download | qemu-094b287f0b3b79d1e68df8f3a63cb144ec9cdfb6.tar.gz qemu-094b287f0b3b79d1e68df8f3a63cb144ec9cdfb6.tar.bz2 qemu-094b287f0b3b79d1e68df8f3a63cb144ec9cdfb6.zip |
Add USB option in machine options
When -usb option is used, global varible usb_enabled is set.
And all the plaform will create one USB controller according
to this variable. In fact, global varibles make code hard
to read.
So this patch is to remove global variable usb_enabled and
add USB option in machine options. All the plaforms will get
USB option value from machine options.
USB option of machine options will be set either by:
* -usb
* -machine type=pseries,usb=on
Both these ways can work now. They both set USB option in
machine options. In the future, the first way will be removed.
Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/nseries.c')
-rw-r--r-- | hw/nseries.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/nseries.c b/hw/nseries.c index 7ada90d280..9306aa15a7 100644 --- a/hw/nseries.c +++ b/hw/nseries.c @@ -1334,8 +1334,9 @@ static void n8x0_init(ram_addr_t ram_size, const char *boot_device, n8x0_dss_setup(s); n8x0_cbus_setup(s); n8x0_uart_setup(s); - if (usb_enabled) + if (usb_enabled(false)) { n8x0_usb_setup(s); + } if (kernel_filename) { /* Or at the linux loader. */ |