All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: xen-devel@lists.xensource.com
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Subject: [rfc 06/18] ioemu: Remove usb_ohci_init*()s devfn parameter as they are always passed as -1
Date: Tue, 17 Feb 2009 20:07:54 +1100	[thread overview]
Message-ID: <20090217091545.975806387@vergenet.net> (raw)
In-Reply-To: 20090217090748.580007796@vergenet.net

[-- Attachment #1: ioemu-usb_ohci_init-no-devfn-arg.patch --]
[-- Type: text/plain, Size: 7092 bytes --]

Signed-off-by: Simon Horman <horms@verge.net.au>

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

  parent reply	other threads:[~2009-02-17  9:07 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-17  9:07 [rfc 00/18] ioemu: use devfn instead of slots as the unit for passthrough Simon Horman
2009-02-17  9:07 ` [rfc 01/18] Make register_real_device() and unregister_real_device() static Simon Horman
2009-02-17  9:07 ` [rfc 02/18] Make dpci_infos static Simon Horman
2009-02-17  9:07 ` [rfc 03/18] ioemu: vslots needs to be freed on error in power_off_php_slot() Simon Horman
2009-02-17  9:07 ` [rfc 04/18] ioemu: Remove lsi_scsi_init()s devfn parameter as it is always passed as -1 Simon Horman
2009-02-17  9:07 ` [rfc 05/18] " Simon Horman
2009-02-17  9:07 ` Simon Horman [this message]
2009-02-17  9:07 ` [rfc 07/18] iommu: Define PCI_DEVFN_AUTO and use it Simon Horman
2009-02-17  9:07 ` [rfc 08/18] iommu: Use PCI_DEVFN to create devfn numbers Simon Horman
2009-02-17  9:07 ` [rfc 09/18] ioemu: piix4acpi.c: make various variables static Simon Horman
2009-02-17  9:07 ` [rfc 10/18] ioemu: piix4acpi.c: Simplfy PHPSlots structure Simon Horman
2009-02-17  9:07 ` [rfc 11/18] ioemu: piix4acpi.c: Consistently dont cast opaque to PHPSlots Simon Horman
2009-02-17  9:08 ` [rfc 12/18] ioemu: piix4acpi.c: remove unnecessary assignment of pci_slots to local variables Simon Horman
2009-02-17  9:08 ` [rfc 13/18] ioemu: piix4acpi.c: remove ACPI_PHP_SLOT_NUM Simon Horman
2009-02-17  9:08 ` [rfc 14/18] ioemu: use devfn instead of slots as the unit for passthrough Simon Horman
2009-02-17  9:08 ` [rfc 15/18] ioemu: use struct php_dev to pass around PCI pass-through assignment parameters Simon Horman
2009-02-17  9:08 ` [rfc 16/18] ioemu: non-destructive parsing of PCI assignement strings Simon Horman
2009-02-17  9:08 ` [rfc 17/18] ioemu: sort pass-through PCI devices before inserting Simon Horman
2009-02-17  9:08 ` [rfc 18/18] ioemu: Allow virtual function to be speficied for PCI pass-through Simon Horman
2009-02-17 12:03 ` [rfc 00/18] ioemu: use devfn instead of slots as the unit for passthrough Ian Jackson
2009-02-17 22:24   ` Simon Horman
2009-02-18  3:12 ` Yuji Shimada
2009-02-19  6:15   ` Simon Horman
2009-02-19  9:21     ` Yuji Shimada
2009-02-19  9:38       ` Keir Fraser
2009-02-20  7:07         ` Simon Horman
2009-02-23  6:24           ` Yuji Shimada
2009-02-23  6:55             ` Simon Horman
2009-02-23  8:39               ` Yuji Shimada
2009-02-23  9:33                 ` Simon Horman
2009-02-23 11:31               ` Keir Fraser
2009-02-23 22:18                 ` Simon Horman
2009-03-02  4:14                   ` Simon Horman
2009-03-02  8:44                     ` Keir Fraser
2009-03-02  9:53                       ` Simon Horman
2009-03-02 10:08                         ` Keir Fraser
2009-03-02 11:25                           ` Simon Horman
2009-03-02 11:33                             ` Keir Fraser
2009-03-03  5:57                               ` Yuji Shimada
2009-03-03  8:56                                 ` Keir Fraser
2009-03-04 22:26                                 ` Simon Horman
2009-03-04 22:32                                   ` Keir Fraser
2009-03-04 22:53                                     ` Simon Horman
2009-03-04 23:05                           ` Simon Horman
2009-03-05  8:34                             ` Keir Fraser
2009-03-05  9:05                               ` Simon Horman
2009-03-05  9:22                                 ` Keir Fraser
2009-03-05  9:42                                   ` Simon Horman
2009-03-06  1:29                                     ` Yuji Shimada
2009-03-06  2:46                                       ` Simon Horman
2009-03-06  6:55                                         ` Yuji Shimada
2009-03-06  8:19                                           ` Keir Fraser
2009-03-06  8:15                                       ` Keir Fraser
2009-03-05  9:26                                 ` Keir Fraser
2009-03-05  9:31                                   ` Jiang, Yunhong
2009-03-05  9:57                                     ` Simon Horman
2009-03-05 10:13                                       ` Simon Horman
2009-03-05 12:44                                         ` Keir Fraser
2009-03-05 14:47                                       ` Jiang, Yunhong
2009-03-05  9:41                                   ` Simon Horman
2009-02-24  1:29                 ` Ian Pratt
2009-02-24  1:50                   ` Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090217091545.975806387@vergenet.net \
    --to=horms@verge.net.au \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.