From patchwork Thu Sep 10 09:43:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 33306 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id CA913B7067 for ; Thu, 10 Sep 2009 20:52:11 +1000 (EST) Received: from localhost ([127.0.0.1]:47302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlhG3-0003ZW-Qd for incoming@patchwork.ozlabs.org; Thu, 10 Sep 2009 06:52:07 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlgC2-0008WP-4U for qemu-devel@nongnu.org; Thu, 10 Sep 2009 05:43:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlgBv-0008TR-Tg for qemu-devel@nongnu.org; Thu, 10 Sep 2009 05:43:52 -0400 Received: from [199.232.76.173] (port=39546 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlgBv-0008TI-9K for qemu-devel@nongnu.org; Thu, 10 Sep 2009 05:43:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12656) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MlgBu-0005W1-Ra for qemu-devel@nongnu.org; Thu, 10 Sep 2009 05:43:47 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8A9hjgV030018 for ; Thu, 10 Sep 2009 05:43:46 -0400 Received: from zweiblum.home.kraxel.org (vpn2-9-74.ams2.redhat.com [10.36.9.74]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id n8A9hfCc026788; Thu, 10 Sep 2009 05:43:42 -0400 Received: by zweiblum.home.kraxel.org (Postfix, from userid 500) id F29D8700E6; Thu, 10 Sep 2009 11:43:35 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 10 Sep 2009 11:43:34 +0200 Message-Id: <1252575815-7824-13-git-send-email-kraxel@redhat.com> In-Reply-To: <1252575815-7824-1-git-send-email-kraxel@redhat.com> References: <1252575815-7824-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH v2 12/13] qdev/isa: finish pckbd conversion X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org drop old init path and switch remaining users to isa_create_simple(). Signed-off-by: Gerd Hoffmann --- hw/mips_r4k.c | 4 +++- hw/pckbd.c | 22 ---------------------- hw/ppc_prep.c | 2 +- 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/hw/mips_r4k.c b/hw/mips_r4k.c index aacb256..ae265a0 100644 --- a/hw/mips_r4k.c +++ b/hw/mips_r4k.c @@ -241,6 +241,8 @@ void mips_r4k_init (ram_addr_t ram_size, /* The PIC is attached to the MIPS CPU INT0 pin */ i8259 = i8259_init(env->irq[2]); + isa_bus_new(NULL); + isa_bus_irqs(i8259); rtc_state = rtc_init(0x70, i8259[8], 2000); @@ -276,7 +278,7 @@ void mips_r4k_init (ram_addr_t ram_size, hd[MAX_IDE_DEVS * i], hd[MAX_IDE_DEVS * i + 1]); - i8042_init(i8259[1], i8259[12], 0x60); + isa_create_simple("i8042"); } static QEMUMachine mips_machine = { diff --git a/hw/pckbd.c b/hw/pckbd.c index 5acf4a6..3d573c2 100644 --- a/hw/pckbd.c +++ b/hw/pckbd.c @@ -362,28 +362,6 @@ static int kbd_load(QEMUFile* f, void* opaque, int version_id) return 0; } -void i8042_init(qemu_irq kbd_irq, qemu_irq mouse_irq, uint32_t io_base) -{ - KBDState *s = &kbd_state; - - s->irq_kbd = kbd_irq; - s->irq_mouse = mouse_irq; - - kbd_reset(s); - register_savevm("pckbd", 0, 3, kbd_save, kbd_load, s); - register_ioport_read(io_base, 1, 1, kbd_read_data, s); - register_ioport_write(io_base, 1, 1, kbd_write_data, s); - register_ioport_read(io_base + 4, 1, 1, kbd_read_status, s); - register_ioport_write(io_base + 4, 1, 1, kbd_write_command, s); - - s->kbd = ps2_kbd_init(kbd_update_kbd_irq, s); - s->mouse = ps2_mouse_init(kbd_update_aux_irq, s); -#ifdef TARGET_I386 - vmmouse_init(s->mouse); -#endif - qemu_register_reset(kbd_reset, s); -} - /* Memory mapped interface */ static uint32_t kbd_mm_readb (void *opaque, target_phys_addr_t addr) { diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c index cde235a..c48304b 100644 --- a/hw/ppc_prep.c +++ b/hw/ppc_prep.c @@ -711,7 +711,7 @@ static void ppc_prep_init (ram_addr_t ram_size, hd[2 * i], hd[2 * i + 1]); } - i8042_init(i8259[1], i8259[12], 0x60); + isa_create_simple("i8042"); DMA_init(1); // SB16_init();