qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 19/48] usb-ohci: add omap init support


From: Riku Voipio
Subject: [Qemu-devel] [PATCH 19/48] usb-ohci: add omap init support
Date: Fri, 26 Mar 2010 16:06:39 +0000

From: Riku Voipio <address@hidden>

Signed-Off-By: Riku Voipio <address@hidden>

---
 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
 
-- 
1.6.5





reply via email to

[Prev in Thread] Current Thread [Next in Thread]