From patchwork Wed Oct 19 13:31:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 120630 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5FB91B71BB for ; Thu, 20 Oct 2011 00:32:24 +1100 (EST) Received: from localhost ([::1]:55015 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGWFi-0001yq-OM for incoming@patchwork.ozlabs.org; Wed, 19 Oct 2011 09:32:14 -0400 Received: from eggs.gnu.org ([140.186.70.92]:46723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGWFZ-0001yF-C8 for qemu-devel@nongnu.org; Wed, 19 Oct 2011 09:32:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGWFQ-0001F7-U3 for qemu-devel@nongnu.org; Wed, 19 Oct 2011 09:32:05 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:42379) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGWFQ-0001Ek-Mr for qemu-devel@nongnu.org; Wed, 19 Oct 2011 09:31:56 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1RGWFM-0000H6-Qn; Wed, 19 Oct 2011 14:31:52 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Wed, 19 Oct 2011 14:31:52 +0100 Message-Id: <1319031112-1033-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 81.2.115.146 Cc: Mathieu Sonet , patches@linaro.org Subject: [Qemu-devel] [PATCH] hw/vexpress.c, hw/realview.c: Add PL041 to VExpress, Realview boards 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 Instantiate the PL041 audio on the Versatile Express and Realview board models. Signed-off-by: Peter Maydell --- This obviously is intended to be applied after Mathieu Sonet's PL041/AACI v5 patch. hw/realview.c | 8 +++++++- hw/vexpress.c | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/hw/realview.c b/hw/realview.c index 549bb15..433d397 100644 --- a/hw/realview.c +++ b/hw/realview.c @@ -126,7 +126,7 @@ static void realview_init(ram_addr_t ram_size, { CPUState *env = NULL; ram_addr_t ram_offset; - DeviceState *dev, *sysctl, *gpio2; + DeviceState *dev, *sysctl, *gpio2, *pl041; SysBusDevice *busdev; qemu_irq *irqp; qemu_irq pic[64]; @@ -233,6 +233,12 @@ static void realview_init(ram_addr_t ram_size, pic[n] = qdev_get_gpio_in(dev, n); } + pl041 = qdev_create(NULL, "pl041"); + qdev_prop_set_uint32(pl041, "nc_fifo_depth", 512); + qdev_init_nofail(pl041); + sysbus_mmio_map(sysbus_from_qdev(pl041), 0, 0x10004000); + sysbus_connect_irq(sysbus_from_qdev(pl041), 0, pic[19]); + sysbus_create_simple("pl050_keyboard", 0x10006000, pic[20]); sysbus_create_simple("pl050_mouse", 0x10007000, pic[21]); diff --git a/hw/vexpress.c b/hw/vexpress.c index c9766dd..0940a26 100644 --- a/hw/vexpress.c +++ b/hw/vexpress.c @@ -41,7 +41,7 @@ static void vexpress_a9_init(ram_addr_t ram_size, { CPUState *env = NULL; ram_addr_t ram_offset, vram_offset, sram_offset; - DeviceState *dev, *sysctl; + DeviceState *dev, *sysctl, *pl041; SysBusDevice *busdev; qemu_irq *irqp; qemu_irq pic[64]; @@ -118,6 +118,11 @@ static void vexpress_a9_init(ram_addr_t ram_size, /* 0x10001000 SP810 system control */ /* 0x10002000 serial bus PCI */ /* 0x10004000 PL041 audio */ + pl041 = qdev_create(NULL, "pl041"); + qdev_prop_set_uint32(pl041, "nc_fifo_depth", 512); + qdev_init_nofail(pl041); + sysbus_mmio_map(sysbus_from_qdev(pl041), 0, 0x10004000); + sysbus_connect_irq(sysbus_from_qdev(pl041), 0, pic[11]); dev = sysbus_create_varargs("pl181", 0x10005000, pic[9], pic[10], NULL); /* Wire up MMC card detect and read-only signals */