qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [patch 3/5] ioemu: Remove usb_ohci_init*()s devfn parameter


From: Simon Horman
Subject: [Qemu-devel] [patch 3/5] ioemu: Remove usb_ohci_init*()s devfn parameter as they are always passed as -1
Date: Mon, 23 Feb 2009 20:18:13 +1100
User-agent: quilt/0.46-1

Signed-off-by: Simon Horman <address@hidden>

Index: qemu/hw/pci.h
===================================================================
--- qemu.orig/hw/pci.h  2009-02-23 18:42:23.000000000 +1100
+++ qemu/hw/pci.h       2009-02-23 18:44:19.000000000 +1100
@@ -274,7 +274,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: qemu/hw/ppc_oldworld.c
===================================================================
--- qemu.orig/hw/ppc_oldworld.c 2009-02-23 18:28:47.000000000 +1100
+++ qemu/hw/ppc_oldworld.c      2009-02-23 18:44:19.000000000 +1100
@@ -358,7 +358,7 @@ static void ppc_heathrow_init (ram_addr_
                escc_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: qemu/hw/ppc_prep.c
===================================================================
--- qemu.orig/hw/ppc_prep.c     2009-02-23 18:28:47.000000000 +1100
+++ qemu/hw/ppc_prep.c  2009-02-23 18:44:19.000000000 +1100
@@ -734,7 +734,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: qemu/hw/realview.c
===================================================================
--- qemu.orig/hw/realview.c     2009-02-23 18:42:23.000000000 +1100
+++ qemu/hw/realview.c  2009-02-23 18:44:19.000000000 +1100
@@ -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: qemu/hw/versatilepb.c
===================================================================
--- qemu.orig/hw/versatilepb.c  2009-02-23 18:42:23.000000000 +1100
+++ qemu/hw/versatilepb.c       2009-02-23 18:44:19.000000000 +1100
@@ -201,7 +201,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: qemu/hw/usb-ohci.c
===================================================================
--- qemu.orig/hw/usb-ohci.c     2009-02-23 18:28:47.000000000 +1100
+++ qemu/hw/usb-ohci.c  2009-02-23 18:44:19.000000000 +1100
@@ -1619,7 +1619,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;
@@ -1668,12 +1668,12 @@ 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;
 
     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;
@@ -1685,20 +1685,18 @@ void usb_ohci_init_pci(struct PCIBus *bu
     pci_config_set_class(ohci->pci_dev.config, PCI_CLASS_SERIAL_USB);
     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");
 
     cpu_register_physical_memory(base, 0x1000, ohci->mem);
 }
Index: qemu/hw/pxa.h
===================================================================
--- qemu.orig/hw/pxa.h  2009-02-23 18:28:47.000000000 +1100
+++ qemu/hw/pxa.h       2009-02-23 18:44:19.000000000 +1100
@@ -219,7 +219,6 @@ struct pxa2xx_state_s *pxa270_init(unsig
 struct pxa2xx_state_s *pxa255_init(unsigned int sdram_size);
 
 /* 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: qemu/hw/pxa2xx.c
===================================================================
--- qemu.orig/hw/pxa2xx.c       2009-02-23 18:28:47.000000000 +1100
+++ qemu/hw/pxa2xx.c    2009-02-23 18:44:19.000000000 +1100
@@ -2112,7 +2112,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);
@@ -2234,7 +2234,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);
Index: qemu/hw/ppc_newworld.c
===================================================================
--- qemu.orig/hw/ppc_newworld.c 2009-02-23 18:45:13.000000000 +1100
+++ qemu/hw/ppc_newworld.c      2009-02-23 18:45:29.000000000 +1100
@@ -304,7 +304,7 @@ static void ppc_core99_init (ram_addr_t 
                escc_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)

-- 

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





reply via email to

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