From patchwork Fri Jun 15 09:47:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guan Xuetao X-Patchwork-Id: 165075 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4E74DB706B for ; Fri, 15 Jun 2012 19:51:55 +1000 (EST) Received: from localhost ([::1]:44917 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfTC5-0001Np-1h for incoming@patchwork.ozlabs.org; Fri, 15 Jun 2012 05:51:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfTBp-00016m-Qi for qemu-devel@nongnu.org; Fri, 15 Jun 2012 05:51:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SfTBj-0001MA-JW for qemu-devel@nongnu.org; Fri, 15 Jun 2012 05:51:37 -0400 Received: from mprc.pku.edu.cn ([162.105.203.9]:52993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfTBi-0001Lf-P9 for qemu-devel@nongnu.org; Fri, 15 Jun 2012 05:51:31 -0400 Received: from linuxdev-32 ([162.105.203.8]) by mprc.pku.edu.cn (8.13.8/8.13.8) with ESMTP id q5FAQ757006955; Fri, 15 Jun 2012 18:26:07 +0800 Received: by linuxdev-32 (Postfix, from userid 1000) id 39256146052E; Fri, 15 Jun 2012 17:47:58 +0800 (CST) From: Guan Xuetao To: qemu-devel@nongnu.org Date: Fri, 15 Jun 2012 17:47:45 +0800 Message-Id: <5e34b3fb0f809b1814bdb4c6322a16f29d46c783.1339753406.git.gxt@mprc.pku.edu.cn> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 162.105.203.9 Cc: blauwirbel@gmail.com, Guan Xuetao , afaerber@suse.de, chenwj@iis.sinica.edu.tw Subject: [Qemu-devel] [PATCHv2 12/13] unicore32-softmmu: Add ps2 support 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This patch adds ps2/keyboard support, and enables CONFIG_PCKBD. Signed-off-by: Guan Xuetao --- default-configs/unicore32-softmmu.mak | 1 + hw/puv3.c | 5 +++++ 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/default-configs/unicore32-softmmu.mak b/default-configs/unicore32-softmmu.mak index 4d4fbfc..de38577 100644 --- a/default-configs/unicore32-softmmu.mak +++ b/default-configs/unicore32-softmmu.mak @@ -1,3 +1,4 @@ # Default configuration for unicore32-softmmu CONFIG_PUV3=y CONFIG_PTIMER=y +CONFIG_PCKBD=y diff --git a/hw/puv3.c b/hw/puv3.c index 226a34f..0eabefd 100644 --- a/hw/puv3.c +++ b/hw/puv3.c @@ -38,6 +38,7 @@ static void puv3_soc_init(CPUUniCore32State *env) { qemu_irq *cpu_intc, irqs[PUV3_IRQS_NR]; DeviceState *dev; + MemoryRegion *i8042 = g_new(MemoryRegion, 1); int i; /* Initialize interrupt controller */ @@ -57,6 +58,10 @@ static void puv3_soc_init(CPUUniCore32State *env) irqs[PUV3_IRQS_GPIOLOW4], irqs[PUV3_IRQS_GPIOLOW5], irqs[PUV3_IRQS_GPIOLOW6], irqs[PUV3_IRQS_GPIOLOW7], irqs[PUV3_IRQS_GPIOHIGH], NULL); + + /* Keyboard (i8042), mouse disabled for nographic */ + i8042_mm_init(irqs[PUV3_IRQS_PS2_KBD], NULL, i8042, PUV3_REGS_OFFSET, 4); + memory_region_add_subregion(get_system_memory(), PUV3_PS2_BASE, i8042); } static void puv3_board_init(CPUUniCore32State *env, ram_addr_t ram_size)