aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/pci
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2012-01-11 09:41:47 -0500
committerRalf Baechle <ralf@linux-mips.org>2012-01-11 09:41:47 -0500
commit39b741431af7f6f46b2e0e7f7f13ea2351fb4a5f (patch)
tree89355f4ae7bbb874537bb65f71ba0d19b3d468e1 /arch/mips/pci
parent5b0ec2efb7d373faa7b1a7632c459b93895d45cd (diff)
parentd7a887a73dec6c387b02a966a71aac767bbd9ce6 (diff)
Merge branch 'next/generic' into mips-for-linux-next
Diffstat (limited to 'arch/mips/pci')
-rw-r--r--arch/mips/pci/ops-pmcmsp.c2
-rw-r--r--arch/mips/pci/ops-tx3927.c2
-rw-r--r--arch/mips/pci/pci-tx4927.c2
-rw-r--r--arch/mips/pci/pci-tx4938.c2
-rw-r--r--arch/mips/pci/pci-tx4939.c2
-rw-r--r--arch/mips/pci/pci.c29
6 files changed, 33 insertions, 6 deletions
diff --git a/arch/mips/pci/ops-pmcmsp.c b/arch/mips/pci/ops-pmcmsp.c
index 8fbfbf2b931c..389bf669d56e 100644
--- a/arch/mips/pci/ops-pmcmsp.c
+++ b/arch/mips/pci/ops-pmcmsp.c
@@ -405,7 +405,7 @@ int msp_pcibios_config_access(unsigned char access_type,
405 if (pciirqflag == 0) { 405 if (pciirqflag == 0) {
406 ret = request_irq(MSP_INT_PCI,/* Hardcoded internal MSP7120 wiring */ 406 ret = request_irq(MSP_INT_PCI,/* Hardcoded internal MSP7120 wiring */
407 bpci_interrupt, 407 bpci_interrupt,
408 IRQF_SHARED | IRQF_DISABLED, 408 IRQF_SHARED,
409 "PMC MSP PCI Host", 409 "PMC MSP PCI Host",
410 preg); 410 preg);
411 if (ret != 0) 411 if (ret != 0)
diff --git a/arch/mips/pci/ops-tx3927.c b/arch/mips/pci/ops-tx3927.c
index 6a3bdb5ffa80..02d64f77e967 100644
--- a/arch/mips/pci/ops-tx3927.c
+++ b/arch/mips/pci/ops-tx3927.c
@@ -225,7 +225,7 @@ void __init tx3927_setup_pcierr_irq(void)
225{ 225{
226 if (request_irq(TXX9_IRQ_BASE + TX3927_IR_PCI, 226 if (request_irq(TXX9_IRQ_BASE + TX3927_IR_PCI,
227 tx3927_pcierr_interrupt, 227 tx3927_pcierr_interrupt,
228 IRQF_DISABLED, "PCI error", 228 0, "PCI error",
229 (void *)TX3927_PCIC_REG)) 229 (void *)TX3927_PCIC_REG))
230 printk(KERN_WARNING "Failed to request irq for PCIERR\n"); 230 printk(KERN_WARNING "Failed to request irq for PCIERR\n");
231} 231}
diff --git a/arch/mips/pci/pci-tx4927.c b/arch/mips/pci/pci-tx4927.c
index a5807406a7f1..a032ae0a533d 100644
--- a/arch/mips/pci/pci-tx4927.c
+++ b/arch/mips/pci/pci-tx4927.c
@@ -85,7 +85,7 @@ void __init tx4927_setup_pcierr_irq(void)
85{ 85{
86 if (request_irq(TXX9_IRQ_BASE + TX4927_IR_PCIERR, 86 if (request_irq(TXX9_IRQ_BASE + TX4927_IR_PCIERR,
87 tx4927_pcierr_interrupt, 87 tx4927_pcierr_interrupt,
88 IRQF_DISABLED, "PCI error", 88 0, "PCI error",
89 (void *)TX4927_PCIC_REG)) 89 (void *)TX4927_PCIC_REG))
90 printk(KERN_WARNING "Failed to request irq for PCIERR\n"); 90 printk(KERN_WARNING "Failed to request irq for PCIERR\n");
91} 91}
diff --git a/arch/mips/pci/pci-tx4938.c b/arch/mips/pci/pci-tx4938.c
index 20e45f30b2ef..141bba562488 100644
--- a/arch/mips/pci/pci-tx4938.c
+++ b/arch/mips/pci/pci-tx4938.c
@@ -136,7 +136,7 @@ void __init tx4938_setup_pcierr_irq(void)
136{ 136{
137 if (request_irq(TXX9_IRQ_BASE + TX4938_IR_PCIERR, 137 if (request_irq(TXX9_IRQ_BASE + TX4938_IR_PCIERR,
138 tx4927_pcierr_interrupt, 138 tx4927_pcierr_interrupt,
139 IRQF_DISABLED, "PCI error", 139 0, "PCI error",
140 (void *)TX4927_PCIC_REG)) 140 (void *)TX4927_PCIC_REG))
141 printk(KERN_WARNING "Failed to request irq for PCIERR\n"); 141 printk(KERN_WARNING "Failed to request irq for PCIERR\n");
142} 142}
diff --git a/arch/mips/pci/pci-tx4939.c b/arch/mips/pci/pci-tx4939.c
index 9ef840693baf..c10fbf2a19dc 100644
--- a/arch/mips/pci/pci-tx4939.c
+++ b/arch/mips/pci/pci-tx4939.c
@@ -101,7 +101,7 @@ void __init tx4939_setup_pcierr_irq(void)
101{ 101{
102 if (request_irq(TXX9_IRQ_BASE + TX4939_IR_PCIERR, 102 if (request_irq(TXX9_IRQ_BASE + TX4939_IR_PCIERR,
103 tx4927_pcierr_interrupt, 103 tx4927_pcierr_interrupt,
104 IRQF_DISABLED, "PCI error", 104 0, "PCI error",
105 (void *)TX4939_PCIC_REG)) 105 (void *)TX4939_PCIC_REG))
106 pr_warning("Failed to request irq for PCIERR\n"); 106 pr_warning("Failed to request irq for PCIERR\n");
107} 107}
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index 41af7fa2887b..8ac0d4841852 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -4,8 +4,11 @@
4 * Free Software Foundation; either version 2 of the License, or (at your 4 * Free Software Foundation; either version 2 of the License, or (at your
5 * option) any later version. 5 * option) any later version.
6 * 6 *
7 * Copyright (C) 2003, 04 Ralf Baechle (ralf@linux-mips.org) 7 * Copyright (C) 2003, 04, 11 Ralf Baechle (ralf@linux-mips.org)
8 * Copyright (C) 2011 Wind River Systems,
9 * written by Ralf Baechle (ralf@linux-mips.org)
8 */ 10 */
11#include <linux/bug.h>
9#include <linux/kernel.h> 12#include <linux/kernel.h>
10#include <linux/mm.h> 13#include <linux/mm.h>
11#include <linux/bootmem.h> 14#include <linux/bootmem.h>
@@ -14,6 +17,8 @@
14#include <linux/types.h> 17#include <linux/types.h>
15#include <linux/pci.h> 18#include <linux/pci.h>
16 19
20#include <asm/cpu-info.h>
21
17/* 22/*
18 * Indicate whether we respect the PCI setup left by the firmware. 23 * Indicate whether we respect the PCI setup left by the firmware.
19 * 24 *
@@ -150,10 +155,32 @@ out:
150 "Skipping PCI bus scan due to resource conflict\n"); 155 "Skipping PCI bus scan due to resource conflict\n");
151} 156}
152 157
158static void __init pcibios_set_cache_line_size(void)
159{
160 struct cpuinfo_mips *c = &current_cpu_data;
161 unsigned int lsize;
162
163 /*
164 * Set PCI cacheline size to that of the highest level in the
165 * cache hierarchy.
166 */
167 lsize = c->dcache.linesz;
168 lsize = c->scache.linesz ? : lsize;
169 lsize = c->tcache.linesz ? : lsize;
170
171 BUG_ON(!lsize);
172
173 pci_dfl_cache_line_size = lsize >> 2;
174
175 pr_debug("PCI: pci_cache_line_size set to %d bytes\n", lsize);
176}
177
153static int __init pcibios_init(void) 178static int __init pcibios_init(void)
154{ 179{
155 struct pci_controller *hose; 180 struct pci_controller *hose;
156 181
182 pcibios_set_cache_line_size();
183
157 /* Scan all of the recorded PCI controllers. */ 184 /* Scan all of the recorded PCI controllers. */
158 for (hose = hose_head; hose; hose = hose->next) 185 for (hose = hose_head; hose; hose = hose->next)
159 pcibios_scanbus(hose); 186 pcibios_scanbus(hose);