]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sh: pci: Consolidate pcibios_setup() in pci-lib.
authorPaul Mundt <lethal@linux-sh.org>
Mon, 20 Apr 2009 10:48:48 +0000 (19:48 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 20 Apr 2009 10:48:48 +0000 (19:48 +0900)
This wasn't really being used for anything useful, so just stub it in
pci-lib.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/drivers/pci/ops-dreamcast.c
arch/sh/drivers/pci/ops-sh4.c
arch/sh/drivers/pci/ops-sh5.c
arch/sh/drivers/pci/pci-lib.c

index 5bc81d5b660a3a786f35d1d5842903f308eecf0a..529aa4f27a8993ff70760f7dc42df87f6436de47 100644 (file)
@@ -154,12 +154,6 @@ static int __init gapspci_init(struct pci_channel *chan)
        return 0;
 }
 
-/* Haven't done anything here as yet */
-char * __devinit pcibios_setup(char *str)
-{
-       return str;
-}
-
 struct pci_channel board_pci_channels[] = {
        { gapspci_init, &gapspci_pci_ops, &gapspci_io_resource,
          &gapspci_mem_resource, 0, 1 },
index 2a7f7b50ff0a3878db41e53d7aa5c226d2f4b104..7cc1fccf1c5248e0a30e7432c9e2abbe44c5b5c3 100644 (file)
@@ -106,30 +106,27 @@ struct pci_ops sh4_pci_ops = {
  * Not really related to pci_ops, but it's common and not worth shoving
  * somewhere else for now..
  */
-static unsigned int pci_probe = PCI_PROBE_CONF1;
-
 int __init sh4_pci_check_direct(struct pci_channel *chan)
 {
        /*
         * Check if configuration works.
         */
-       if (pci_probe & PCI_PROBE_CONF1) {
-               unsigned int tmp = pci_read_reg(chan, SH4_PCIPAR);
-
-               pci_write_reg(chan, P1SEG, SH4_PCIPAR);
+       unsigned int tmp = pci_read_reg(chan, SH4_PCIPAR);
 
-               if (pci_read_reg(chan, SH4_PCIPAR) == P1SEG) {
-                       pci_write_reg(chan, tmp, SH4_PCIPAR);
-                       printk(KERN_INFO "PCI: Using configuration type 1\n");
-                       request_region(chan->reg_base + SH4_PCIPAR, 8,
-                                      "PCI conf1");
-                       return 0;
-               }
+       pci_write_reg(chan, P1SEG, SH4_PCIPAR);
 
+       if (pci_read_reg(chan, SH4_PCIPAR) == P1SEG) {
                pci_write_reg(chan, tmp, SH4_PCIPAR);
+               printk(KERN_INFO "PCI: Using configuration type 1\n");
+               request_region(chan->reg_base + SH4_PCIPAR, 8,
+                              "PCI conf1");
+               return 0;
        }
 
-       pr_debug("PCI: pci_check_direct failed\n");
+       pci_write_reg(chan, tmp, SH4_PCIPAR);
+
+       printk(KERN_ERR "PCI: %s failed\n", __func__);
+
        return -EINVAL;
 }
 
@@ -155,16 +152,6 @@ static void __init pci_fixup_ide_bases(struct pci_dev *d)
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases);
 
-char * __devinit pcibios_setup(char *str)
-{
-       if (!strcmp(str, "off")) {
-               pci_probe = 0;
-               return NULL;
-       }
-
-       return str;
-}
-
 int __attribute__((weak)) pci_fixup_pcic(struct pci_channel *chan)
 {
        /* Nothing to do. */
index 729e38a6fe071c810a42baf9d65ce4e5fdc98cb8..b10e2d5f4251c5428b58914dbd61535ee5f42d4b 100644 (file)
@@ -42,11 +42,6 @@ static void __init pci_fixup_ide_bases(struct pci_dev *d)
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases);
 
-char * __devinit pcibios_setup(char *str)
-{
-       return str;
-}
-
 static int sh5pci_read(struct pci_bus *bus, unsigned int devfn, int where,
                        int size, u32 *val)
 {
index ea83629458491f845a79e347cf3ff1fda6c11f87..f072acafce6c6f6e5014dc174bf675bf3fbf4400 100644 (file)
@@ -134,6 +134,11 @@ void __init pcibios_update_irq(struct pci_dev *dev, int irq)
        pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq);
 }
 
+char * __devinit pcibios_setup(char *str)
+{
+       return str;
+}
+
 int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
                        enum pci_mmap_state mmap_state, int write_combine)
 {