From patchwork Fri Mar 26 16:06:39 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 48702 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 ozlabs.org (Postfix) with ESMTPS id E0927B7BEE for ; Sat, 27 Mar 2010 06:02:37 +1100 (EST) Received: from localhost ([127.0.0.1]:38942 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NvDtJ-0007zZ-A7 for incoming@patchwork.ozlabs.org; Fri, 26 Mar 2010 14:04:17 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NvC5u-0004QR-Do for qemu-devel@nongnu.org; Fri, 26 Mar 2010 12:09:10 -0400 Received: from [140.186.70.92] (port=41723 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NvC5j-0003jd-Kz for qemu-devel@nongnu.org; Fri, 26 Mar 2010 12:09:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NvC4G-0006wg-Kh for qemu-devel@nongnu.org; Fri, 26 Mar 2010 12:07:55 -0400 Received: from afflict.kos.to ([92.243.29.197]:33622) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NvC4B-0006tD-15 for qemu-devel@nongnu.org; Fri, 26 Mar 2010 12:07:25 -0400 Received: by afflict.kos.to (Postfix, from userid 1000) id 333B0265B9; Fri, 26 Mar 2010 16:07:22 +0000 (UTC) From: Riku Voipio To: qemu-devel@nongnu.org Date: Fri, 26 Mar 2010 16:06:39 +0000 Message-Id: <10ed38ebaa0084383e36ff9159bcbf116b7a2526.1269617186.git.riku.voipio@nokia.com> X-Mailer: git-send-email 1.6.5 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: Riku Voipio Subject: [Qemu-devel] [PATCH 19/48] usb-ohci: add omap init support 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 From: Riku Voipio Signed-Off-By: Riku Voipio --- hw/usb-ohci.c | 12 ++++++++++++ hw/usb-ohci.h | 2 ++ 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c index 93f7d79..c9865f4 100644 --- a/hw/usb-ohci.c +++ b/hw/usb-ohci.c @@ -61,6 +61,7 @@ typedef struct OHCIPort { enum ohci_type { OHCI_TYPE_PCI, OHCI_TYPE_PXA, + OHCI_TYPE_OMAP, OHCI_TYPE_SM501, }; @@ -1782,6 +1783,17 @@ void usb_ohci_init_pxa(target_phys_addr_t base, int num_ports, int devfn, cpu_register_physical_memory(base, 0x1000, ohci->mem); } +void usb_ohci_init_omap(target_phys_addr_t base, uint32_t region_size, + int num_ports, qemu_irq irq, int be) +{ + OHCIState *ohci = (OHCIState *)qemu_mallocz(sizeof(OHCIState)); + + usb_ohci_init(ohci, NULL /* FIXME */, num_ports, -1, irq, + OHCI_TYPE_OMAP, "OHCI USB" ,0, be); + + cpu_register_physical_memory(base, 0x1000, ohci->mem); +} + void usb_ohci_init_sm501(uint32_t mmio_base, uint32_t localmem_base, int num_ports, int devfn, qemu_irq irq, int be) { diff --git a/hw/usb-ohci.h b/hw/usb-ohci.h index aadc365..741b6a1 100644 --- a/hw/usb-ohci.h +++ b/hw/usb-ohci.h @@ -6,5 +6,7 @@ void usb_ohci_init_pci(struct PCIBus *bus, int devfn, int be); void usb_ohci_init_pxa(target_phys_addr_t base, int num_ports, int devfn, qemu_irq irq, int be); +void usb_ohci_init_omap(target_phys_addr_t base, uint32_t region_size, + int num_ports, qemu_irq irq, int be); #endif