sh: Kill off broken type 1 PCI config access checks.
authorPaul Mundt <lethal@linux-sh.org>
Fri, 29 Jan 2010 16:41:21 +0000 (01:41 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Fri, 29 Jan 2010 16:41:21 +0000 (01:41 +0900)
The host controllers only support type 1, so there's not much else to
test for. Some of the older controllers also supported type 2 accesses,
but we've never supported those, and likely never will. Beyond that, the
P1SEG test is meaningless for 32-bit mode, so rather than refactoring it,
just kill the type 1 test off completely.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/drivers/pci/ops-sh4.c
arch/sh/drivers/pci/pci-sh4.h
arch/sh/drivers/pci/pci-sh7751.c
arch/sh/drivers/pci/pci-sh7780.c

index 78bebebdc99c33aa3fd1970a3a533f25f0180d81..e55e81a71727cb9cc33b61aa03b872db2a13251a 100644 (file)
@@ -102,34 +102,6 @@ struct pci_ops sh4_pci_ops = {
        .write          = sh4_pci_write,
 };
 
-/*
- * Not really related to pci_ops, but it's common and not worth shoving
- * somewhere else for now..
- */
-int __init sh4_pci_check_direct(struct pci_channel *chan)
-{
-       /*
-        * Check if configuration works.
-        */
-       unsigned int tmp = pci_read_reg(chan, SH4_PCIPAR);
-
-       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;
-       }
-
-       pci_write_reg(chan, tmp, SH4_PCIPAR);
-
-       printk(KERN_ERR "PCI: %s failed\n", __func__);
-
-       return -EINVAL;
-}
-
 int __attribute__((weak)) pci_fixup_pcic(struct pci_channel *chan)
 {
        /* Nothing to do. */
index 43dddd82756167f5ee43525bffd3bb7225e0487c..cbf763b3015eb6ccb50608f5f53efc909ed60570 100644 (file)
 
 /* arch/sh/kernel/drivers/pci/ops-sh4.c */
 extern struct pci_ops sh4_pci_ops;
-int sh4_pci_check_direct(struct pci_channel *chan);
 int pci_fixup_pcic(struct pci_channel *chan);
 
 struct sh4_pci_address_space {
index 2455cf32db5a305717d6fa5cc39dff683d0bef70..02306ddb4011124749cdf8989a7f051261c5e919 100644 (file)
@@ -79,7 +79,6 @@ static int __init sh7751_pci_init(void)
        struct pci_channel *chan = &sh7751_pci_controller;
        unsigned int id;
        u32 word, reg;
-       int ret;
 
        printk(KERN_NOTICE "PCI: Starting intialization.\n");
 
@@ -93,9 +92,6 @@ static int __init sh7751_pci_init(void)
                return -ENODEV;
        }
 
-       if ((ret = sh4_pci_check_direct(chan)) != 0)
-               return ret;
-
        /* Set the BCR's to enable PCI access */
        reg = __raw_readl(SH7751_BCR1);
        reg |= 0x80000;
index 019e1afcd0a390c7c501b6d037389920d3f26afa..40531cd367b7edb6cb0acff2b975a25cf5c1d7cf 100644 (file)
@@ -47,7 +47,6 @@ static int __init sh7780_pci_init(void)
        size_t memsize;
        unsigned int id;
        const char *type;
-       int ret;
 
        printk(KERN_NOTICE "PCI: Starting intialization.\n");
 
@@ -85,9 +84,6 @@ static int __init sh7780_pci_init(void)
               "controller, revision %d.\n", type,
               __raw_readb(chan->reg_base + PCI_REVISION_ID));
 
-       if ((ret = sh4_pci_check_direct(chan)) != 0)
-               return ret;
-
        /*
         * Now throw it in to register initialization mode and
         * start the real work.
This page took 0.026518 seconds and 5 git commands to generate.