From patchwork Wed Mar 16 00:12:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Programmingkid X-Patchwork-Id: 8594031 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B58DAC0553 for ; Wed, 16 Mar 2016 00:13:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 117D0203AD for ; Wed, 16 Mar 2016 00:13:12 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5324C203AC for ; Wed, 16 Mar 2016 00:13:11 +0000 (UTC) Received: from localhost ([::1]:52219 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afz5K-00054h-FN for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Mar 2016 20:13:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afz5A-000514-Qa for qemu-devel@nongnu.org; Tue, 15 Mar 2016 20:13:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afz57-0005Is-Hw for qemu-devel@nongnu.org; Tue, 15 Mar 2016 20:13:00 -0400 Received: from mail-io0-x22e.google.com ([2607:f8b0:4001:c06::22e]:33762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afz57-0005IV-CQ; Tue, 15 Mar 2016 20:12:57 -0400 Received: by mail-io0-x22e.google.com with SMTP id n190so44636916iof.0; Tue, 15 Mar 2016 17:12:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-transfer-encoding:subject:date:message-id:cc:to :mime-version; bh=n2K+icKj6rdxYfA7Ok2JlJ3KjDMePP2xDkUMDjLhKb8=; b=oQto5uhLKL5uyKm4Pg4mZ6Z3MGXDOjk+vjviZhCvDJN69hJAuIkUpcAplnsoKZA0+N UZizd26HGzFUUNxpuMQc1yZ1n2KSDDXgL9zUgTBNhvDDx84NqRwxQbHaXv3bWw5MaKYQ jcMa8UNVStbiWyj8AHnfTDXdfFUoko12RYJoW6eT0B7rnaaELf7Yv+wQNRbZEWw2tQIE hQo9dDEa+rgKWzvk7Elv6b8ga5MkDlYhOmO70ueIWz3RLQzj06IipYF47n3tV4fUQ9Hh 4QfOpcVNfa9fhdL32wdOw681trpWwTN92RJkaoTm8MBj8zsKrt1iIpePGvlZ14Otggbc 4XQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-transfer-encoding:subject:date :message-id:cc:to:mime-version; bh=n2K+icKj6rdxYfA7Ok2JlJ3KjDMePP2xDkUMDjLhKb8=; b=Lty2GT9BXaqqtAUovQKIByG+Bkr6UabTRZea1MIgvGOP4ncc9+QM9FKtKcIJPkNKze 6zDv7jGq0/J0H5A9+6npFDmLQUzsA7ird5TMqMIw5o7LK6Zt2RNrtk5rbcJXbrC/b5DM yTDL6OfnaKvf29HhfnCLaBtzcaZCpZRJj60aRoAh+UV49P/BERaH6uKKXYKNjSCyGYlt XqD1Uvp0umtz/7WDwnC2h3KlVmvF9f1vq2DrSEkekO9t9Mh7dwGLLGVsZnc5cNiZ+tUn B0kL737ruG+PWuZETww1UW7wk/FkDsk0WRA7FlG8VlMG13Hae1HBV+V7yVcB9lvGQ0w+ mBDQ== X-Gm-Message-State: AD7BkJKPDPP+0YWFen8jiwtJ+BHFJNr0WOYFYrRMj0pT0EySbHG88ghlYH7/EO3z69FaAQ== X-Received: by 10.107.132.142 with SMTP id o14mr1444349ioi.66.1458087176656; Tue, 15 Mar 2016 17:12:56 -0700 (PDT) Received: from [192.168.0.5] (d199-74-164-53.col.wideopenwest.com. [74.199.53.164]) by smtp.gmail.com with ESMTPSA id h131sm579038ioe.7.2016.03.15.17.12.55 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 15 Mar 2016 17:12:56 -0700 (PDT) From: Programmingkid Date: Tue, 15 Mar 2016 20:12:54 -0400 Message-Id: To: qemu-devel qemu-devel , "qemu-ppc@nongnu.org list:PowerPC" , Alexander Graf Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4001:c06::22e Cc: =?iso-8859-1?Q?Herv=E9_Poussineau?= , Mark Cave-Ayland Subject: [Qemu-devel] [PATCH] mac_newworld.c: add USB keyboard and mouse as default X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the USB keyboard and mouse by default to the mac99 target. This more closely represents what a real PowerMac3,1 would be using. Signed-off-by: John Arbuckle --- The USB keyboard and mouse work better than their ADB counterparts. I can right click on a Mac OS X guest with a USB mouse. The Key Caps program on Mac OS 9 actually works well with the USB keyboard. Apple System Profiler on Mac OS 9 actually displays a keyboard name under the keyboard heading. hw/ppc/mac_newworld.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index f0a36b3..ab38b77 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -165,7 +165,6 @@ static void ppc_core99_init(MachineState *machine) PCIBus *pci_bus; PCIDevice *macio; MACIOIDEState *macio_ide; - BusState *adb_bus; MacIONVRAMState *nvr; int bios_size; MemoryRegion *pic_mem, *escc_mem; @@ -415,24 +414,11 @@ static void ppc_core99_init(MachineState *machine) "ide[1]")); macio_ide_init_drives(macio_ide, &hd[MAX_IDE_DEVS]); - dev = DEVICE(object_resolve_path_component(OBJECT(macio), "cuda")); - adb_bus = qdev_get_child_bus(dev, "adb.0"); - dev = qdev_create(adb_bus, TYPE_ADB_KEYBOARD); - qdev_init_nofail(dev); - dev = qdev_create(adb_bus, TYPE_ADB_MOUSE); - qdev_init_nofail(dev); - if (machine->usb) { pci_create_simple(pci_bus, -1, "pci-ohci"); - - /* U3 needs to use USB for input because Linux doesn't support via-cuda - on PPC64 */ - if (machine_arch == ARCH_MAC99_U3) { - USBBus *usb_bus = usb_bus_find(-1); - - usb_create_simple(usb_bus, "usb-kbd"); - usb_create_simple(usb_bus, "usb-mouse"); - } + USBBus *usb_bus = usb_bus_find(-1); + usb_create_simple(usb_bus, "usb-kbd"); + usb_create_simple(usb_bus, "usb-mouse"); } pci_vga_init(pci_bus);