aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/pci
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/pci')
-rw-r--r--arch/mips/pci/fixup-ddb5074.c2
-rw-r--r--arch/mips/pci/fixup-ddb5477.c2
-rw-r--r--arch/mips/pci/fixup-malta.c2
-rw-r--r--arch/mips/pci/fixup-rbtx4927.c2
-rw-r--r--arch/mips/pci/fixup-sni.c2
-rw-r--r--arch/mips/pci/fixup-tb0219.c15
-rw-r--r--arch/mips/pci/ops-ddb5477.c4
-rw-r--r--arch/mips/pci/ops-tx4927.c6
-rw-r--r--arch/mips/pci/pci-ddb5477.c8
-rw-r--r--arch/mips/pci/pci-ip32.c2
-rw-r--r--arch/mips/pci/pci.c21
11 files changed, 34 insertions, 32 deletions
diff --git a/arch/mips/pci/fixup-ddb5074.c b/arch/mips/pci/fixup-ddb5074.c
index b345e528a53c..5a4a7c239c42 100644
--- a/arch/mips/pci/fixup-ddb5074.c
+++ b/arch/mips/pci/fixup-ddb5074.c
@@ -5,7 +5,7 @@ static void ddb5074_fixup(struct pci_dev *dev)
5{ 5{
6 extern struct pci_dev *pci_pmu; 6 extern struct pci_dev *pci_pmu;
7 u8 t8; 7 u8 t8;
8 8
9 pci_pmu = dev; /* for LEDs D2 and D3 */ 9 pci_pmu = dev; /* for LEDs D2 and D3 */
10 /* Program the lines for LEDs D2 and D3 to output */ 10 /* Program the lines for LEDs D2 and D3 to output */
11 pci_read_config_byte(dev, 0x7d, &t8); 11 pci_read_config_byte(dev, 0x7d, &t8);
diff --git a/arch/mips/pci/fixup-ddb5477.c b/arch/mips/pci/fixup-ddb5477.c
index 6abdc88bab1e..2f1444e60654 100644
--- a/arch/mips/pci/fixup-ddb5477.c
+++ b/arch/mips/pci/fixup-ddb5477.c
@@ -65,7 +65,7 @@ static void ddb5477_amd_lance_fixup(struct pci_dev *dev)
65 ioaddr = pci_resource_start(dev, 0); 65 ioaddr = pci_resource_start(dev, 0);
66 66
67 inw(ioaddr + PCNET32_WIO_RESET); /* reset chip */ 67 inw(ioaddr + PCNET32_WIO_RESET); /* reset chip */
68 68
69 /* bcr_18 |= 0x0800 */ 69 /* bcr_18 |= 0x0800 */
70 outw(18, ioaddr + PCNET32_WIO_RAP); 70 outw(18, ioaddr + PCNET32_WIO_RAP);
71 temp = inw(ioaddr + PCNET32_WIO_BDP); 71 temp = inw(ioaddr + PCNET32_WIO_BDP);
diff --git a/arch/mips/pci/fixup-malta.c b/arch/mips/pci/fixup-malta.c
index b9296d9942b3..bf2c41d1e9c5 100644
--- a/arch/mips/pci/fixup-malta.c
+++ b/arch/mips/pci/fixup-malta.c
@@ -56,7 +56,7 @@ static void __init malta_piix_func0_fixup(struct pci_dev *pdev)
56 0, 0, 0, 3, 56 0, 0, 0, 3,
57 4, 5, 6, 7, 57 4, 5, 6, 7,
58 0, 9, 10, 11, 58 0, 9, 10, 11,
59 12, 0, 14, 15 59 12, 0, 14, 15
60 }; 60 };
61 int i; 61 int i;
62 62
diff --git a/arch/mips/pci/fixup-rbtx4927.c b/arch/mips/pci/fixup-rbtx4927.c
index de4e443da208..ceeb1860895a 100644
--- a/arch/mips/pci/fixup-rbtx4927.c
+++ b/arch/mips/pci/fixup-rbtx4927.c
@@ -7,7 +7,7 @@
7 * Author: MontaVista Software, Inc. 7 * Author: MontaVista Software, Inc.
8 * ppopov@mvista.com or source@mvista.com 8 * ppopov@mvista.com or source@mvista.com
9 * 9 *
10 * Copyright (C) 2000-2001 Toshiba Corporation 10 * Copyright (C) 2000-2001 Toshiba Corporation
11 * 11 *
12 * Copyright (C) 2004 MontaVista Software Inc. 12 * Copyright (C) 2004 MontaVista Software Inc.
13 * Author: Manish Lachwani (mlachwani@mvista.com) 13 * Author: Manish Lachwani (mlachwani@mvista.com)
diff --git a/arch/mips/pci/fixup-sni.c b/arch/mips/pci/fixup-sni.c
index c8ef01a017cc..a176f2ca8656 100644
--- a/arch/mips/pci/fixup-sni.c
+++ b/arch/mips/pci/fixup-sni.c
@@ -32,7 +32,7 @@
32 * Device 4: Unused 32 * Device 4: Unused
33 * Device 5: Slot 2 33 * Device 5: Slot 2
34 * Device 6: Slot 3 34 * Device 6: Slot 3
35 * Device 7: Slot 4 35 * Device 7: Slot 4
36 * 36 *
37 * Documentation says the VGA is device 5 and device 3 is unused but that 37 * Documentation says the VGA is device 5 and device 3 is unused but that
38 * seem to be a documentation error. At least on my RM200C the Cirrus 38 * seem to be a documentation error. At least on my RM200C the Cirrus
diff --git a/arch/mips/pci/fixup-tb0219.c b/arch/mips/pci/fixup-tb0219.c
index 850a900f0eb4..bc55b06e1904 100644
--- a/arch/mips/pci/fixup-tb0219.c
+++ b/arch/mips/pci/fixup-tb0219.c
@@ -29,27 +29,12 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
29 29
30 switch (slot) { 30 switch (slot) {
31 case 12: 31 case 12:
32 vr41xx_set_irq_trigger(TB0219_PCI_SLOT1_PIN,
33 TRIGGER_LEVEL,
34 SIGNAL_THROUGH);
35 vr41xx_set_irq_level(TB0219_PCI_SLOT1_PIN,
36 LEVEL_LOW);
37 irq = TB0219_PCI_SLOT1_IRQ; 32 irq = TB0219_PCI_SLOT1_IRQ;
38 break; 33 break;
39 case 13: 34 case 13:
40 vr41xx_set_irq_trigger(TB0219_PCI_SLOT2_PIN,
41 TRIGGER_LEVEL,
42 SIGNAL_THROUGH);
43 vr41xx_set_irq_level(TB0219_PCI_SLOT2_PIN,
44 LEVEL_LOW);
45 irq = TB0219_PCI_SLOT2_IRQ; 35 irq = TB0219_PCI_SLOT2_IRQ;
46 break; 36 break;
47 case 14: 37 case 14:
48 vr41xx_set_irq_trigger(TB0219_PCI_SLOT3_PIN,
49 TRIGGER_LEVEL,
50 SIGNAL_THROUGH);
51 vr41xx_set_irq_level(TB0219_PCI_SLOT3_PIN,
52 LEVEL_LOW);
53 irq = TB0219_PCI_SLOT3_IRQ; 38 irq = TB0219_PCI_SLOT3_IRQ;
54 break; 39 break;
55 default: 40 default:
diff --git a/arch/mips/pci/ops-ddb5477.c b/arch/mips/pci/ops-ddb5477.c
index e955443fedf9..0406b50a37d8 100644
--- a/arch/mips/pci/ops-ddb5477.c
+++ b/arch/mips/pci/ops-ddb5477.c
@@ -127,7 +127,7 @@ static inline void ddb_close_config_base(struct pci_config_swap *swap)
127} 127}
128 128
129static int read_config_dword(struct pci_config_swap *swap, 129static int read_config_dword(struct pci_config_swap *swap,
130 struct pci_bus *bus, u32 devfn, u32 where, 130 struct pci_bus *bus, u32 devfn, u32 where,
131 u32 * val) 131 u32 * val)
132{ 132{
133 u32 bus_num, slot_num, func_num; 133 u32 bus_num, slot_num, func_num;
@@ -153,7 +153,7 @@ static int read_config_dword(struct pci_config_swap *swap,
153} 153}
154 154
155static int read_config_word(struct pci_config_swap *swap, 155static int read_config_word(struct pci_config_swap *swap,
156 struct pci_bus *bus, u32 devfn, u32 where, 156 struct pci_bus *bus, u32 devfn, u32 where,
157 u16 * val) 157 u16 * val)
158{ 158{
159 int status; 159 int status;
diff --git a/arch/mips/pci/ops-tx4927.c b/arch/mips/pci/ops-tx4927.c
index 2a9d7227fe87..7688b7711329 100644
--- a/arch/mips/pci/ops-tx4927.c
+++ b/arch/mips/pci/ops-tx4927.c
@@ -1,16 +1,16 @@
1/* 1/*
2 * Copyright 2001 MontaVista Software Inc. 2 * Copyright 2001 MontaVista Software Inc.
3 * Author: MontaVista Software, Inc. 3 * Author: MontaVista Software, Inc.
4 * ahennessy@mvista.com 4 * ahennessy@mvista.com
5 * 5 *
6 * Copyright (C) 2000-2001 Toshiba Corporation 6 * Copyright (C) 2000-2001 Toshiba Corporation
7 * Copyright (C) 2004 by Ralf Baechle (ralf@linux-mips.org) 7 * Copyright (C) 2004 by Ralf Baechle (ralf@linux-mips.org)
8 * 8 *
9 * Based on arch/mips/ddb5xxx/ddb5477/pci_ops.c 9 * Based on arch/mips/ddb5xxx/ddb5477/pci_ops.c
10 * 10 *
11 * Define the pci_ops for the Toshiba rbtx4927 11 * Define the pci_ops for the Toshiba rbtx4927
12 * 12 *
13 * Much of the code is derived from the original DDB5074 port by 13 * Much of the code is derived from the original DDB5074 port by
14 * Geert Uytterhoeven <geert@sonycom.com> 14 * Geert Uytterhoeven <geert@sonycom.com>
15 * 15 *
16 * Copyright 2004 MontaVista Software Inc. 16 * Copyright 2004 MontaVista Software Inc.
diff --git a/arch/mips/pci/pci-ddb5477.c b/arch/mips/pci/pci-ddb5477.c
index 4ddd53eaf656..826d653184e5 100644
--- a/arch/mips/pci/pci-ddb5477.c
+++ b/arch/mips/pci/pci-ddb5477.c
@@ -76,7 +76,7 @@ struct pci_controller ddb5477_io_controller = {
76 */ 76 */
77 77
78/* 78/*
79 * irq mapping : device -> pci int # -> vrc4377 irq# , 79 * irq mapping : device -> pci int # -> vrc4377 irq# ,
80 * ddb5477 board manual page 4 and vrc5477 manual page 46 80 * ddb5477 board manual page 4 and vrc5477 manual page 46
81 */ 81 */
82 82
@@ -137,9 +137,9 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
137 unsigned char *slot_irq_map; 137 unsigned char *slot_irq_map;
138 unsigned char irq; 138 unsigned char irq;
139 139
140 /* 140 /*
141 * We ignore the swizzled slot and pin values. The original 141 * We ignore the swizzled slot and pin values. The original
142 * pci_fixup_irq() codes largely base irq number on the dev slot 142 * pci_fixup_irq() codes largely base irq number on the dev slot
143 * numbers because except for one case they are unique even 143 * numbers because except for one case they are unique even
144 * though there are multiple pci buses. 144 * though there are multiple pci buses.
145 */ 145 */
@@ -160,7 +160,7 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
160 160
161 if (mips_machtype == MACH_NEC_ROCKHOPPERII) { 161 if (mips_machtype == MACH_NEC_ROCKHOPPERII) {
162 /* hack to distinquish overlapping slot 20s, one 162 /* hack to distinquish overlapping slot 20s, one
163 * on bus 0 (ALI USB on the M1535 on the backplane), 163 * on bus 0 (ALI USB on the M1535 on the backplane),
164 * and one on bus 2 (NEC USB controller on the CPU board) 164 * and one on bus 2 (NEC USB controller on the CPU board)
165 * Make the M1535 USB - ISA IRQ number 9. 165 * Make the M1535 USB - ISA IRQ number 9.
166 */ 166 */
diff --git a/arch/mips/pci/pci-ip32.c b/arch/mips/pci/pci-ip32.c
index 1faeb034f06e..000dc6af6cd3 100644
--- a/arch/mips/pci/pci-ip32.c
+++ b/arch/mips/pci/pci-ip32.c
@@ -84,7 +84,7 @@ static irqreturn_t macepci_error(int irq, void *dev, struct pt_regs *regs)
84 84
85 85
86extern struct pci_ops mace_pci_ops; 86extern struct pci_ops mace_pci_ops;
87#ifdef CONFIG_MIPS64 87#ifdef CONFIG_64BIT
88static struct resource mace_pci_mem_resource = { 88static struct resource mace_pci_mem_resource = {
89 .name = "SGI O2 PCI MEM", 89 .name = "SGI O2 PCI MEM",
90 .start = MACEPCI_HI_MEMORY, 90 .start = MACEPCI_HI_MEMORY,
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index 8141dffac241..a8d499b0a36f 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -132,7 +132,7 @@ static int __init pcibios_init(void)
132 hose->need_domain_info = need_domain_info; 132 hose->need_domain_info = need_domain_info;
133 next_busno = bus->subordinate + 1; 133 next_busno = bus->subordinate + 1;
134 /* Don't allow 8-bit bus number overflow inside the hose - 134 /* Don't allow 8-bit bus number overflow inside the hose -
135 reserve some space for bridges. */ 135 reserve some space for bridges. */
136 if (next_busno > 224) { 136 if (next_busno > 224) {
137 next_busno = 0; 137 next_busno = 0;
138 need_domain_info = 1; 138 need_domain_info = 1;
@@ -260,7 +260,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
260 (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) { 260 (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) {
261 pci_read_bridge_bases(bus); 261 pci_read_bridge_bases(bus);
262 pcibios_fixup_device_resources(dev, bus); 262 pcibios_fixup_device_resources(dev, bus);
263 } 263 }
264 264
265 for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) { 265 for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) {
266 struct pci_dev *dev = pci_dev_b(ln); 266 struct pci_dev *dev = pci_dev_b(ln);
@@ -292,8 +292,25 @@ pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
292 region->end = res->end - offset; 292 region->end = res->end - offset;
293} 293}
294 294
295void __devinit
296pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
297 struct pci_bus_region *region)
298{
299 struct pci_controller *hose = (struct pci_controller *)dev->sysdata;
300 unsigned long offset = 0;
301
302 if (res->flags & IORESOURCE_IO)
303 offset = hose->io_offset;
304 else if (res->flags & IORESOURCE_MEM)
305 offset = hose->mem_offset;
306
307 res->start = region->start + offset;
308 res->end = region->end + offset;
309}
310
295#ifdef CONFIG_HOTPLUG 311#ifdef CONFIG_HOTPLUG
296EXPORT_SYMBOL(pcibios_resource_to_bus); 312EXPORT_SYMBOL(pcibios_resource_to_bus);
313EXPORT_SYMBOL(pcibios_bus_to_resource);
297EXPORT_SYMBOL(PCIBIOS_MIN_IO); 314EXPORT_SYMBOL(PCIBIOS_MIN_IO);
298EXPORT_SYMBOL(PCIBIOS_MIN_MEM); 315EXPORT_SYMBOL(PCIBIOS_MIN_MEM);
299#endif 316#endif