aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/drivers
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-01-29 11:41:21 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-01-29 11:41:21 -0500
commit396c56a9c69ebb0baf9171a6365ac9fda322728d (patch)
treead501a9148d96c10cf45a79ca9c6c188a03da627 /arch/sh/drivers
parent320e68da59353fe6ad51b81f6865c4b674ad66ea (diff)
sh: Kill off broken type 1 PCI config access checks.
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>
Diffstat (limited to 'arch/sh/drivers')
-rw-r--r--arch/sh/drivers/pci/ops-sh4.c28
-rw-r--r--arch/sh/drivers/pci/pci-sh4.h1
-rw-r--r--arch/sh/drivers/pci/pci-sh7751.c4
-rw-r--r--arch/sh/drivers/pci/pci-sh7780.c4
4 files changed, 0 insertions, 37 deletions
diff --git a/arch/sh/drivers/pci/ops-sh4.c b/arch/sh/drivers/pci/ops-sh4.c
index 78bebebdc99c..e55e81a71727 100644
--- a/arch/sh/drivers/pci/ops-sh4.c
+++ b/arch/sh/drivers/pci/ops-sh4.c
@@ -102,34 +102,6 @@ struct pci_ops sh4_pci_ops = {
102 .write = sh4_pci_write, 102 .write = sh4_pci_write,
103}; 103};
104 104
105/*
106 * Not really related to pci_ops, but it's common and not worth shoving
107 * somewhere else for now..
108 */
109int __init sh4_pci_check_direct(struct pci_channel *chan)
110{
111 /*
112 * Check if configuration works.
113 */
114 unsigned int tmp = pci_read_reg(chan, SH4_PCIPAR);
115
116 pci_write_reg(chan, P1SEG, SH4_PCIPAR);
117
118 if (pci_read_reg(chan, SH4_PCIPAR) == P1SEG) {
119 pci_write_reg(chan, tmp, SH4_PCIPAR);
120 printk(KERN_INFO "PCI: Using configuration type 1\n");
121 request_region(chan->reg_base + SH4_PCIPAR, 8,
122 "PCI conf1");
123 return 0;
124 }
125
126 pci_write_reg(chan, tmp, SH4_PCIPAR);
127
128 printk(KERN_ERR "PCI: %s failed\n", __func__);
129
130 return -EINVAL;
131}
132
133int __attribute__((weak)) pci_fixup_pcic(struct pci_channel *chan) 105int __attribute__((weak)) pci_fixup_pcic(struct pci_channel *chan)
134{ 106{
135 /* Nothing to do. */ 107 /* Nothing to do. */
diff --git a/arch/sh/drivers/pci/pci-sh4.h b/arch/sh/drivers/pci/pci-sh4.h
index 43dddd827561..cbf763b3015e 100644
--- a/arch/sh/drivers/pci/pci-sh4.h
+++ b/arch/sh/drivers/pci/pci-sh4.h
@@ -162,7 +162,6 @@
162 162
163/* arch/sh/kernel/drivers/pci/ops-sh4.c */ 163/* arch/sh/kernel/drivers/pci/ops-sh4.c */
164extern struct pci_ops sh4_pci_ops; 164extern struct pci_ops sh4_pci_ops;
165int sh4_pci_check_direct(struct pci_channel *chan);
166int pci_fixup_pcic(struct pci_channel *chan); 165int pci_fixup_pcic(struct pci_channel *chan);
167 166
168struct sh4_pci_address_space { 167struct sh4_pci_address_space {
diff --git a/arch/sh/drivers/pci/pci-sh7751.c b/arch/sh/drivers/pci/pci-sh7751.c
index 2455cf32db5a..02306ddb4011 100644
--- a/arch/sh/drivers/pci/pci-sh7751.c
+++ b/arch/sh/drivers/pci/pci-sh7751.c
@@ -79,7 +79,6 @@ static int __init sh7751_pci_init(void)
79 struct pci_channel *chan = &sh7751_pci_controller; 79 struct pci_channel *chan = &sh7751_pci_controller;
80 unsigned int id; 80 unsigned int id;
81 u32 word, reg; 81 u32 word, reg;
82 int ret;
83 82
84 printk(KERN_NOTICE "PCI: Starting intialization.\n"); 83 printk(KERN_NOTICE "PCI: Starting intialization.\n");
85 84
@@ -93,9 +92,6 @@ static int __init sh7751_pci_init(void)
93 return -ENODEV; 92 return -ENODEV;
94 } 93 }
95 94
96 if ((ret = sh4_pci_check_direct(chan)) != 0)
97 return ret;
98
99 /* Set the BCR's to enable PCI access */ 95 /* Set the BCR's to enable PCI access */
100 reg = __raw_readl(SH7751_BCR1); 96 reg = __raw_readl(SH7751_BCR1);
101 reg |= 0x80000; 97 reg |= 0x80000;
diff --git a/arch/sh/drivers/pci/pci-sh7780.c b/arch/sh/drivers/pci/pci-sh7780.c
index 019e1afcd0a3..40531cd367b7 100644
--- a/arch/sh/drivers/pci/pci-sh7780.c
+++ b/arch/sh/drivers/pci/pci-sh7780.c
@@ -47,7 +47,6 @@ static int __init sh7780_pci_init(void)
47 size_t memsize; 47 size_t memsize;
48 unsigned int id; 48 unsigned int id;
49 const char *type; 49 const char *type;
50 int ret;
51 50
52 printk(KERN_NOTICE "PCI: Starting intialization.\n"); 51 printk(KERN_NOTICE "PCI: Starting intialization.\n");
53 52
@@ -85,9 +84,6 @@ static int __init sh7780_pci_init(void)
85 "controller, revision %d.\n", type, 84 "controller, revision %d.\n", type,
86 __raw_readb(chan->reg_base + PCI_REVISION_ID)); 85 __raw_readb(chan->reg_base + PCI_REVISION_ID));
87 86
88 if ((ret = sh4_pci_check_direct(chan)) != 0)
89 return ret;
90
91 /* 87 /*
92 * Now throw it in to register initialization mode and 88 * Now throw it in to register initialization mode and
93 * start the real work. 89 * start the real work.