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

[Xen-devel] [rfc 06/18] ioemu: Remove usb_ohci_init*()s devfn parameter as they are always passed as -1



Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>

Index: ioemu-remote/hw/pci.h
===================================================================
--- ioemu-remote.orig/hw/pci.h  2009-02-17 17:24:14.000000000 +0900
+++ ioemu-remote/hw/pci.h       2009-02-17 17:24:24.000000000 +0900
@@ -136,7 +136,7 @@ void usb_uhci_piix3_init(PCIBus *bus, in
 void usb_uhci_piix4_init(PCIBus *bus, int devfn);
 
 /* usb-ohci.c */
-void usb_ohci_init_pci(struct PCIBus *bus, int num_ports, int devfn);
+void usb_ohci_init_pci(struct PCIBus *bus, int num_ports);
 
 /* eepro100.c */
 
Index: ioemu-remote/hw/ppc_chrp.c
===================================================================
--- ioemu-remote.orig/hw/ppc_chrp.c     2009-02-17 17:23:25.000000000 +0900
+++ ioemu-remote/hw/ppc_chrp.c  2009-02-17 17:24:24.000000000 +0900
@@ -298,7 +298,7 @@ static void ppc_core99_init (ram_addr_t 
                cuda_mem_index, NULL, 2, ide_mem_index);
 
     if (usb_enabled) {
-        usb_ohci_init_pci(pci_bus, 3, -1);
+        usb_ohci_init_pci(pci_bus, 3);
     }
 
     if (graphic_depth != 15 && graphic_depth != 32 && graphic_depth != 8)
Index: ioemu-remote/hw/ppc_oldworld.c
===================================================================
--- ioemu-remote.orig/hw/ppc_oldworld.c 2009-02-17 17:23:25.000000000 +0900
+++ ioemu-remote/hw/ppc_oldworld.c      2009-02-17 17:24:24.000000000 +0900
@@ -342,7 +342,7 @@ static void ppc_heathrow_init (ram_addr_
                cuda_mem_index, nvr, 2, ide_mem_index);
 
     if (usb_enabled) {
-        usb_ohci_init_pci(pci_bus, 3, -1);
+        usb_ohci_init_pci(pci_bus, 3);
     }
 
     if (graphic_depth != 15 && graphic_depth != 32 && graphic_depth != 8)
Index: ioemu-remote/hw/ppc_prep.c
===================================================================
--- ioemu-remote.orig/hw/ppc_prep.c     2009-02-17 17:23:25.000000000 +0900
+++ ioemu-remote/hw/ppc_prep.c  2009-02-17 17:24:24.000000000 +0900
@@ -733,7 +733,7 @@ static void ppc_prep_init (ram_addr_t ra
 #endif
 
     if (usb_enabled) {
-        usb_ohci_init_pci(pci_bus, 3, -1);
+        usb_ohci_init_pci(pci_bus, 3);
     }
 
     m48t59 = m48t59_init(i8259[8], 0, 0x0074, NVRAM_SIZE, 59);
Index: ioemu-remote/hw/realview.c
===================================================================
--- ioemu-remote.orig/hw/realview.c     2009-02-17 17:24:14.000000000 +0900
+++ ioemu-remote/hw/realview.c  2009-02-17 17:24:24.000000000 +0900
@@ -106,7 +106,7 @@ static void realview_init(ram_addr_t ram
 
     pci_bus = pci_vpb_init(pic, 48, 1);
     if (usb_enabled) {
-        usb_ohci_init_pci(pci_bus, 3, -1);
+        usb_ohci_init_pci(pci_bus, 3);
     }
     if (drive_get_max_bus(IF_SCSI) > 0) {
         fprintf(stderr, "qemu: too many SCSI bus\n");
Index: ioemu-remote/hw/versatilepb.c
===================================================================
--- ioemu-remote.orig/hw/versatilepb.c  2009-02-17 17:24:14.000000000 +0900
+++ ioemu-remote/hw/versatilepb.c       2009-02-17 17:24:24.000000000 +0900
@@ -207,7 +207,7 @@ static void versatile_init(ram_addr_t ra
         }
     }
     if (usb_enabled) {
-        usb_ohci_init_pci(pci_bus, 3, -1);
+        usb_ohci_init_pci(pci_bus, 3);
     }
     if (drive_get_max_bus(IF_SCSI) > 0) {
         fprintf(stderr, "qemu: too many SCSI bus\n");
Index: ioemu-remote/hw/usb-ohci.c
===================================================================
--- ioemu-remote.orig/hw/usb-ohci.c     2009-02-17 17:23:25.000000000 +0900
+++ ioemu-remote/hw/usb-ohci.c  2009-02-17 17:24:24.000000000 +0900
@@ -1592,7 +1592,7 @@ static CPUWriteMemoryFunc *ohci_writefn[
     ohci_mem_write
 };
 
-static void usb_ohci_init(OHCIState *ohci, int num_ports, int devfn,
+static void usb_ohci_init(OHCIState *ohci, int num_ports,
             qemu_irq irq, enum ohci_type type, const char *name)
 {
     int i;
@@ -1642,14 +1642,14 @@ static void ohci_mapfunc(PCIDevice *pci_
     cpu_register_physical_memory(addr, size, ohci->state.mem);
 }
 
-void usb_ohci_init_pci(struct PCIBus *bus, int num_ports, int devfn)
+void usb_ohci_init_pci(struct PCIBus *bus, int num_ports)
 {
     OHCIPCIState *ohci;
     int vid = 0x106b;
     int did = 0x003f;
 
     ohci = (OHCIPCIState *)pci_register_device(bus, "OHCI USB", sizeof(*ohci),
-                                               devfn, NULL, NULL);
+                                               -1, NULL, NULL);
     if (ohci == NULL) {
         fprintf(stderr, "usb-ohci: Failed to register PCI device\n");
         return;
@@ -1664,20 +1664,18 @@ void usb_ohci_init_pci(struct PCIBus *bu
     ohci->pci_dev.config[0x0b] = 0xc;
     ohci->pci_dev.config[0x3d] = 0x01; /* interrupt pin 1 */
 
-    usb_ohci_init(&ohci->state, num_ports, devfn, ohci->pci_dev.irq[0],
+    usb_ohci_init(&ohci->state, num_ports, ohci->pci_dev.irq[0],
                   OHCI_TYPE_PCI, ohci->pci_dev.name);
 
     pci_register_io_region((struct PCIDevice *)ohci, 0, 256,
                            PCI_ADDRESS_SPACE_MEM, ohci_mapfunc);
 }
 
-void usb_ohci_init_pxa(target_phys_addr_t base, int num_ports, int devfn,
-                       qemu_irq irq)
+void usb_ohci_init_pxa(target_phys_addr_t base, int num_ports, qemu_irq irq)
 {
     OHCIState *ohci = (OHCIState *)qemu_mallocz(sizeof(OHCIState));
 
-    usb_ohci_init(ohci, num_ports, devfn, irq,
-                  OHCI_TYPE_PXA, "OHCI USB");
+    usb_ohci_init(ohci, num_ports, irq, OHCI_TYPE_PXA, "OHCI USB");
     ohci->mem_base = base;
 
     cpu_register_physical_memory(ohci->mem_base, 0x1000, ohci->mem);
Index: ioemu-remote/hw/pxa.h
===================================================================
--- ioemu-remote.orig/hw/pxa.h  2009-02-17 17:23:25.000000000 +0900
+++ ioemu-remote/hw/pxa.h       2009-02-17 17:24:24.000000000 +0900
@@ -221,7 +221,6 @@ struct pxa2xx_state_s *pxa270_init(unsig
 struct pxa2xx_state_s *pxa255_init(unsigned int sdram_size, DisplayState *ds);
 
 /* usb-ohci.c */
-void usb_ohci_init_pxa(target_phys_addr_t base, int num_ports, int devfn,
-                       qemu_irq irq);
+void usb_ohci_init_pxa(target_phys_addr_t base, int num_ports, qemu_irq irq);
 
 #endif /* PXA_H */
Index: ioemu-remote/hw/pxa2xx.c
===================================================================
--- ioemu-remote.orig/hw/pxa2xx.c       2009-02-17 17:23:25.000000000 +0900
+++ ioemu-remote/hw/pxa2xx.c    2009-02-17 17:24:24.000000000 +0900
@@ -2130,7 +2130,7 @@ struct pxa2xx_state_s *pxa270_init(unsig
     }
 
     if (usb_enabled) {
-        usb_ohci_init_pxa(0x4c000000, 3, -1, s->pic[PXA2XX_PIC_USBH1]);
+        usb_ohci_init_pxa(0x4c000000, 3, s->pic[PXA2XX_PIC_USBH1]);
     }
 
     s->pcmcia[0] = pxa2xx_pcmcia_init(0x20000000);
@@ -2253,7 +2253,7 @@ struct pxa2xx_state_s *pxa255_init(unsig
     }
 
     if (usb_enabled) {
-        usb_ohci_init_pxa(0x4c000000, 3, -1, s->pic[PXA2XX_PIC_USBH1]);
+        usb_ohci_init_pxa(0x4c000000, 3, s->pic[PXA2XX_PIC_USBH1]);
     }
 
     s->pcmcia[0] = pxa2xx_pcmcia_init(0x20000000);

-- 

-- 
Simon Horman
  VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
  H: www.vergenet.net/~horms/             W: www.valinux.co.jp/en


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.