Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Net5X-0006Gv-8Y for qemu-devel@nongnu.org; Tue, 09 Feb 2010 11:37:23 -0500 Received: from [199.232.76.173] (port=50198 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Net5W-0006Gi-Hw for qemu-devel@nongnu.org; Tue, 09 Feb 2010 11:37:22 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Net5Q-0007DY-Bw for qemu-devel@nongnu.org; Tue, 09 Feb 2010 11:37:21 -0500 Received: from cantor2.suse.de ([195.135.220.15]:43980 helo=mx2.suse.de) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Net5N-0007Cc-TN for qemu-devel@nongnu.org; Tue, 09 Feb 2010 11:37:15 -0500 From: Alexander Graf Date: Tue, 9 Feb 2010 17:37:08 +0100 Message-Id: <1265733430-9656-9-git-send-email-agraf@suse.de> In-Reply-To: <1265733430-9656-1-git-send-email-agraf@suse.de> References: <1265733430-9656-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH 08/10] PPC: Add USB per default on U3 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: blauwirbel@gmail.com, aurelien@aurel32.net, mst@redhat.com Linux with CONFIG_PPC64 doesn't support ADB devices anymore, so we have to use USB for keyboard and mouse. This patch enables USB per default on U3 and adds a virtual keyboard and mouse there. Signed-off-by: Alexander Graf --- hw/ppc_newworld.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/hw/ppc_newworld.c b/hw/ppc_newworld.c index dafd37c..bc86c85 100644 --- a/hw/ppc_newworld.c +++ b/hw/ppc_newworld.c @@ -65,6 +65,7 @@ #include "elf.h" #include "kvm.h" #include "kvm_ppc.h" +#include "hw/usb.h" #define MAX_IDE_BUS 2 #define VGA_BIOS_SIZE 65536 @@ -377,12 +378,14 @@ static void ppc_core99_init (ram_addr_t ram_size, ide_mem_index[2] = pmac_ide_init(hd, pic[0x0e], dbdma, 0x1a, pic[0x02]); /* cuda also initialize ADB */ + if (machine_arch == ARCH_MAC99_U3) { + usb_enabled = 1; + } cuda_init(&cuda_mem_index, pic[0x19]); adb_kbd_init(&adb_bus); adb_mouse_init(&adb_bus); - macio_init(pci_bus, PCI_DEVICE_ID_APPLE_UNI_N_KEYL, 0, pic_mem_index, dbdma_mem_index, cuda_mem_index, NULL, 3, ide_mem_index, escc_mem_index); @@ -391,6 +394,13 @@ static void ppc_core99_init (ram_addr_t ram_size, usb_ohci_init_pci(pci_bus, -1); } + /* U3 needs to use USB for input because Linux doesn't support via-cuda + on PPC64 */ + if (machine_arch == ARCH_MAC99_U3) { + usbdevice_create("keyboard"); + usbdevice_create("mouse"); + } + if (graphic_depth != 15 && graphic_depth != 32 && graphic_depth != 8) graphic_depth = 15; -- 1.6.0.2