diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-14 16:05:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-14 16:05:21 -0500 |
commit | 4964e0664c80680fa6b28ef91381c076a5b25c2c (patch) | |
tree | 62099c5aaeee7274bcc66bcfba35d479affa97cf /arch/mips/pci/pci.c | |
parent | 0a80939b3e6af4b0dc93bf88ec02fd7e90a16f1b (diff) | |
parent | 7bf6612e8a9d6a0b3b82e8e2611942be1258b307 (diff) |
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (119 commits)
MIPS: Delete unused function add_temporary_entry.
MIPS: Set default pci cache line size.
MIPS: Flush huge TLB
MIPS: Octeon: Remove SYS_SUPPORTS_HIGHMEM.
MIPS: Octeon: Add support for OCTEON II PCIe
MIPS: Octeon: Update PCI Latency timer and enable more error reporting.
MIPS: Alchemy: Update cpu-feature-overrides
MIPS: Alchemy: db1200: Improve PB1200 detection.
MIPS: Alchemy: merge Au1000 and Au1300-style IRQ controller code.
MIPS: Alchemy: chain IRQ controllers to MIPS IRQ controller
MIPS: Alchemy: irq: register pm at irq init time
MIPS: Alchemy: Touchscreen support on DB1100
MIPS: Alchemy: Hook up IrDA on DB1000/DB1100
net/irda: convert au1k_ir to platform driver.
MIPS: Alchemy: remove unused board headers
MTD: nand: make au1550nd.c a platform_driver
MIPS: Netlogic: Mark Netlogic chips as SMT capable
MIPS: Netlogic: Add support for XLP 3XX cores
MIPS: Netlogic: Merge some of XLR/XLP wakup code
MIPS: Netlogic: Add default XLP config.
...
Fix up trivial conflicts in arch/mips/kernel/{perf_event_mipsxx.c,
traps.c} and drivers/tty/serial/Makefile
Diffstat (limited to 'arch/mips/pci/pci.c')
-rw-r--r-- | arch/mips/pci/pci.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index fa8e378413b1..aec2b111d35b 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 | * |
@@ -157,10 +162,32 @@ out: | |||
157 | "Skipping PCI bus scan due to resource conflict\n"); | 162 | "Skipping PCI bus scan due to resource conflict\n"); |
158 | } | 163 | } |
159 | 164 | ||
165 | static void __init pcibios_set_cache_line_size(void) | ||
166 | { | ||
167 | struct cpuinfo_mips *c = ¤t_cpu_data; | ||
168 | unsigned int lsize; | ||
169 | |||
170 | /* | ||
171 | * Set PCI cacheline size to that of the highest level in the | ||
172 | * cache hierarchy. | ||
173 | */ | ||
174 | lsize = c->dcache.linesz; | ||
175 | lsize = c->scache.linesz ? : lsize; | ||
176 | lsize = c->tcache.linesz ? : lsize; | ||
177 | |||
178 | BUG_ON(!lsize); | ||
179 | |||
180 | pci_dfl_cache_line_size = lsize >> 2; | ||
181 | |||
182 | pr_debug("PCI: pci_cache_line_size set to %d bytes\n", lsize); | ||
183 | } | ||
184 | |||
160 | static int __init pcibios_init(void) | 185 | static int __init pcibios_init(void) |
161 | { | 186 | { |
162 | struct pci_controller *hose; | 187 | struct pci_controller *hose; |
163 | 188 | ||
189 | pcibios_set_cache_line_size(); | ||
190 | |||
164 | /* Scan all of the recorded PCI controllers. */ | 191 | /* Scan all of the recorded PCI controllers. */ |
165 | for (hose = hose_head; hose; hose = hose->next) | 192 | for (hose = hose_head; hose; hose = hose->next) |
166 | pcibios_scanbus(hose); | 193 | pcibios_scanbus(hose); |