Skip to contentSkip to conversation

Memory mapped OHCI host with PXA-specific bits.

PATCH New andrzej zaborowski 1 participant 1 message Mar 16, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Memory mapped OHCI host with PXA-specific bits.

This reuses the PCI OHCI code for a IO memory-mapped OHCI host (this is what Intel PXA and Samsung S3C processors have). Also adds PXA-specific things in the controller, in particular four additional registers.

I renamed usb_ohci_init to usb_ohci_init_pci for consistency. Also includes the OHCI remote-wakeup interrupt change that was posted to the list earlier (numerous times?).

Cheers,
Andrew

From 554663523c5f44d8d06e8cce79b784900f92036e Mon Sep 17 00:00:00 2001
From: Andrzej Zaborowski <[email protected]>
Date: Fri, 16 Mar 2007 16:25:13 +0100
Subject: [PATCH] Memory mapped OHCI host with PXA-specific bits.

---
 hw/ppc_chrp.c    |    2 +-
 hw/ppc_prep.c    |    2 +-
 hw/realview.c    |    2 +-
 hw/usb-ohci.c    |  142 +++++++++++++++++++++++++++++++++++++++++------------
 hw/usb.h         |    4 +-
 hw/versatilepb.c |    2 +-
 6 files changed, 117 insertions(+), 37 deletions(-)
hw/ppc_chrp.c +1 -1
index 937be15..b1199e2 100644
@@ -501,7 +501,7 @@ static void ppc_chrp_init (int ram_size, int vga_ram_size, int boot_device,
     }
 
     if (usb_enabled) {
-        usb_ohci_init(pci_bus, 3, -1);
+        usb_ohci_init_pci(pci_bus, 3, -1);
     }
 
     if (graphic_depth != 15 && graphic_depth != 32 && graphic_depth != 8)
hw/ppc_prep.c +1 -1
index 27d3d48..32a3e52 100644
@@ -666,7 +666,7 @@ static void ppc_prep_init (int ram_size, int vga_ram_size, int boot_device,
 #endif
 
     if (usb_enabled) {
-        usb_ohci_init(pci_bus, 3, -1);
+        usb_ohci_init_pci(pci_bus, 3, -1);
     }
 
     nvram = m48t59_init(8, 0, 0x0074, NVRAM_SIZE, 59);
hw/realview.c +1 -1
index 619739c..a5607e7 100644
@@ -57,7 +57,7 @@ static void realview_init(int ram_size, int vga_ram_size, int boot_device,
 
     pci_bus = pci_vpb_init(pic, 48, 1);
     if (usb_enabled) {
-        usb_ohci_init(pci_bus, 3, -1);
+        usb_ohci_init_pci(pci_bus, 3, -1);
     }
     scsi_hba = lsi_scsi_init(pci_bus, -1);
     for (n = 0; n < MAX_DISKS; n++) {
hw/usb-ohci.c +110 -32

250 lines not on this page · raw message

hw/usb.h +3 -1
index a6d0ae6..aa57f01 100644
@@ -206,7 +206,9 @@ USBDevice *usb_hub_init(int nb_ports);
 void usb_uhci_init(PCIBus *bus, int devfn);
 
 /* usb-ohci.c */
-void usb_ohci_init(struct PCIBus *bus, int num_ports, int devfn);
+void usb_ohci_init_pci(struct PCIBus *bus, int num_ports, int devfn);
+void usb_ohci_init_memio(target_phys_addr_t base, int num_ports, int devfn,
+                         void *pic, int irq);
 
 /* usb-linux.c */
 USBDevice *usb_host_device_open(const char *devname);
hw/versatilepb.c +1 -1
index 050878d..5d3e857 100644
@@ -195,7 +195,7 @@ static void versatile_init(int ram_size, int vga_ram_size, int boot_device,
         }
     }
     if (usb_enabled) {
-        usb_ohci_init(pci_bus, 3, -1);
+        usb_ohci_init_pci(pci_bus, 3, -1);
     }
     scsi_hba = lsi_scsi_init(pci_bus, -1);
     for (n = 0; n < MAX_DISKS; n++) {
Signature · 1 line
1.4.4.3