Patchwork [19/48] usb-ohci: add omap init support

login
register
mail settings
Submitter Riku Voipio
Date March 26, 2010, 4:06 p.m.
Message ID <10ed38ebaa0084383e36ff9159bcbf116b7a2526.1269617186.git.riku.voipio@nokia.com>
Download mbox | patch
Permalink /patch/48702/
State New
Headers show

Comments

Riku Voipio - March 26, 2010, 4:06 p.m.
From: Riku Voipio <riku.voipio@nokia.com>

Signed-Off-By: Riku Voipio <riku.voipio@nokia.com>

---
 hw/usb-ohci.c |   12 ++++++++++++
 hw/usb-ohci.h |    2 ++
 2 files changed, 14 insertions(+), 0 deletions(-)

Patch

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