From: Michal Schulz <michal.schulz@gmx.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] patch for PC target - OHCI use
Date: Thu, 29 Mar 2007 23:34:35 +0200 [thread overview]
Message-ID: <200703292334.35893.michal.schulz@gmx.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 232 bytes --]
Hello. I've made small patch for qemu, which adds a new command line option -
the "-ohci". It instructs qemu that the OHCI controller should be emulated
instead of the default UHCI. What do you think about it?
--
Michal Schulz
[-- Attachment #2: qemu-ohci.patch --]
[-- Type: text/x-diff, Size: 2536 bytes --]
diff -Naur qemu-0.9.0/hw/pc.c qemu-0.9.0-ohci-patch/hw/pc.c
--- qemu-0.9.0/hw/pc.c 2007-02-06 00:01:54.000000000 +0100
+++ qemu-0.9.0-ohci-patch/hw/pc.c 2007-03-29 15:43:18.000000000 +0200
@@ -695,7 +695,10 @@
cmos_init(ram_size, boot_device, bs_table);
if (pci_enabled && usb_enabled) {
- usb_uhci_init(pci_bus, piix3_devfn + 2);
+ if (use_ohci_instead)
+ usb_ohci_init(pci_bus, 3, -1);
+ else
+ usb_uhci_init(pci_bus, piix3_devfn + 2);
}
if (pci_enabled && acpi_enabled) {
diff -Naur qemu-0.9.0/vl.c qemu-0.9.0-ohci-patch/vl.c
--- qemu-0.9.0/vl.c 2007-02-06 00:01:54.000000000 +0100
+++ qemu-0.9.0-ohci-patch/vl.c 2007-03-29 15:44:52.000000000 +0200
@@ -155,6 +155,7 @@
int win2k_install_hack = 0;
#endif
int usb_enabled = 0;
+int use_ohci_instead = 0;
static VLANState *first_vlan;
int smp_cpus = 1;
const char *vnc_display;
@@ -6048,6 +6049,7 @@
"-win2k-hack use it when installing Windows 2000 to avoid a disk full bug\n"
#endif
"-usb enable the USB driver (will be the default soon)\n"
+ "-ohci use the OHCI controller instead of the UHCI\n"
"-usbdevice name add the host or guest USB device 'name'\n"
#if defined(TARGET_PPC) || defined(TARGET_SPARC)
"-g WxH[xDEPTH] Set the initial graphical resolution and depth\n"
@@ -6198,6 +6200,7 @@
QEMU_OPTION_kernel_kqemu,
QEMU_OPTION_win2k_hack,
QEMU_OPTION_usb,
+ QEMU_OPTION_ohci,
QEMU_OPTION_usbdevice,
QEMU_OPTION_smp,
QEMU_OPTION_vnc,
@@ -6284,6 +6287,7 @@
/* temporary options */
{ "usb", 0, QEMU_OPTION_usb },
+ { "ohci", 0, QEMU_OPTION_ohci },
{ "cirrusvga", 0, QEMU_OPTION_cirrusvga },
{ "no-acpi", 0, QEMU_OPTION_no_acpi },
{ "no-reboot", 0, QEMU_OPTION_no_reboot },
@@ -6917,6 +6921,9 @@
case QEMU_OPTION_usb:
usb_enabled = 1;
break;
+ case QEMU_OPTION_ohci:
+ use_ohci_instead = 1;
+ break;
case QEMU_OPTION_usbdevice:
usb_enabled = 1;
if (usb_devices_index >= MAX_USB_CMDLINE) {
diff -Naur qemu-0.9.0/vl.h qemu-0.9.0-ohci-patch/vl.h
--- qemu-0.9.0/vl.h 2007-02-06 00:01:54.000000000 +0100
+++ qemu-0.9.0-ohci-patch/vl.h 2007-03-29 15:42:19.000000000 +0200
@@ -155,6 +155,7 @@
extern int kqemu_allowed;
extern int win2k_install_hack;
extern int usb_enabled;
+extern int use_ohci_instead;
extern int smp_cpus;
extern int no_quit;
extern int semihosting_enabled;
next reply other threads:[~2007-03-29 21:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-29 21:34 Michal Schulz [this message]
2007-03-31 20:34 ` [Qemu-devel] patch for PC target - OHCI use Thiemo Seufer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200703292334.35893.michal.schulz@gmx.de \
--to=michal.schulz@gmx.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).