diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-20 15:02:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-20 15:02:02 -0400 |
commit | d75e2c9ad97c40f6d2cdaf2e16381b2034d19a6f (patch) | |
tree | ac57cedfc4defbd82a65f9fe0e722397d898bc74 /arch/mips/pci | |
parent | 935173744abe86278074ad8f131c1932276b1ac1 (diff) | |
parent | 85a053fa5f2d67ae5b2968305b16e8d2fe4cdf4d (diff) |
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull late MIPS fixes from Ralf Baechle:
"This fixes a number of lose ends in the MIPS code and various bug
fixes.
Aside of dropping some patch that should not be in this pull request
everything has sat in -next for quite a while and there are no known
issues.
The biggest patch in this patch set moves the allocation of an array
that is aliased to a function (for runtime generated code) to
assembler code. This avoids an issue with certain toolchains when
building for microMIPS."
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (35 commits)
MIPS: PCI: Move fixups from __init to __devinit.
MIPS: Fix bug.h MIPS build regression
MIPS: sync-r4k: remove redundant irq operation
MIPS: smp: Warn on too early irq enable
MIPS: call set_cpu_online() on cpu being brought up with irq disabled
MIPS: call ->smp_finish() a little late
MIPS: Yosemite: delay irq enable to ->smp_finish()
MIPS: SMTC: delay irq enable to ->smp_finish()
MIPS: BMIPS: delay irq enable to ->smp_finish()
MIPS: Octeon: delay enable irq to ->smp_finish()
MIPS: Oprofile: Fix build as a module.
MIPS: BCM63XX: Fix BCM6368 IPSec clock bit
MIPS: perf: Fix build error caused by unused counters_per_cpu_to_total()
MIPS: Fix Magic SysRq L kernel crash.
MIPS: BMIPS: Fix duplicate header inclusion.
mips: mark const init data with __initconst instead of __initdata
MIPS: cmpxchg.h: Add missing include
MIPS: Malta may also be equipped with MIPS64 R2 processors.
MIPS: Fix typo multipy -> multiply
MIPS: Cavium: Fix duplicate ARCH_SPARSEMEM_ENABLE in kconfig.
...
Diffstat (limited to 'arch/mips/pci')
-rw-r--r-- | arch/mips/pci/fixup-fuloong2e.c | 12 | ||||
-rw-r--r-- | arch/mips/pci/fixup-lemote2f.c | 12 | ||||
-rw-r--r-- | arch/mips/pci/fixup-malta.c | 6 | ||||
-rw-r--r-- | arch/mips/pci/fixup-mpc30x.c | 4 | ||||
-rw-r--r-- | arch/mips/pci/fixup-sb1250.c | 6 | ||||
-rw-r--r-- | arch/mips/pci/ops-tx4927.c | 2 | ||||
-rw-r--r-- | arch/mips/pci/pci-ip27.c | 2 | ||||
-rw-r--r-- | arch/mips/pci/pci-xlr.c | 61 |
8 files changed, 73 insertions, 32 deletions
diff --git a/arch/mips/pci/fixup-fuloong2e.c b/arch/mips/pci/fixup-fuloong2e.c index d5d4c018fb04..0857ab8c3919 100644 --- a/arch/mips/pci/fixup-fuloong2e.c +++ b/arch/mips/pci/fixup-fuloong2e.c | |||
@@ -48,7 +48,7 @@ int pcibios_plat_dev_init(struct pci_dev *dev) | |||
48 | return 0; | 48 | return 0; |
49 | } | 49 | } |
50 | 50 | ||
51 | static void __init loongson2e_nec_fixup(struct pci_dev *pdev) | 51 | static void __devinit loongson2e_nec_fixup(struct pci_dev *pdev) |
52 | { | 52 | { |
53 | unsigned int val; | 53 | unsigned int val; |
54 | 54 | ||
@@ -60,7 +60,7 @@ static void __init loongson2e_nec_fixup(struct pci_dev *pdev) | |||
60 | pci_write_config_dword(pdev, 0xe4, 1 << 5); | 60 | pci_write_config_dword(pdev, 0xe4, 1 << 5); |
61 | } | 61 | } |
62 | 62 | ||
63 | static void __init loongson2e_686b_func0_fixup(struct pci_dev *pdev) | 63 | static void __devinit loongson2e_686b_func0_fixup(struct pci_dev *pdev) |
64 | { | 64 | { |
65 | unsigned char c; | 65 | unsigned char c; |
66 | 66 | ||
@@ -135,7 +135,7 @@ static void __init loongson2e_686b_func0_fixup(struct pci_dev *pdev) | |||
135 | printk(KERN_INFO"via686b fix: ISA bridge done\n"); | 135 | printk(KERN_INFO"via686b fix: ISA bridge done\n"); |
136 | } | 136 | } |
137 | 137 | ||
138 | static void __init loongson2e_686b_func1_fixup(struct pci_dev *pdev) | 138 | static void __devinit loongson2e_686b_func1_fixup(struct pci_dev *pdev) |
139 | { | 139 | { |
140 | printk(KERN_INFO"via686b fix: IDE\n"); | 140 | printk(KERN_INFO"via686b fix: IDE\n"); |
141 | 141 | ||
@@ -168,19 +168,19 @@ static void __init loongson2e_686b_func1_fixup(struct pci_dev *pdev) | |||
168 | printk(KERN_INFO"via686b fix: IDE done\n"); | 168 | printk(KERN_INFO"via686b fix: IDE done\n"); |
169 | } | 169 | } |
170 | 170 | ||
171 | static void __init loongson2e_686b_func2_fixup(struct pci_dev *pdev) | 171 | static void __devinit loongson2e_686b_func2_fixup(struct pci_dev *pdev) |
172 | { | 172 | { |
173 | /* irq routing */ | 173 | /* irq routing */ |
174 | pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 10); | 174 | pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 10); |
175 | } | 175 | } |
176 | 176 | ||
177 | static void __init loongson2e_686b_func3_fixup(struct pci_dev *pdev) | 177 | static void __devinit loongson2e_686b_func3_fixup(struct pci_dev *pdev) |
178 | { | 178 | { |
179 | /* irq routing */ | 179 | /* irq routing */ |
180 | pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 11); | 180 | pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 11); |
181 | } | 181 | } |
182 | 182 | ||
183 | static void __init loongson2e_686b_func5_fixup(struct pci_dev *pdev) | 183 | static void __devinit loongson2e_686b_func5_fixup(struct pci_dev *pdev) |
184 | { | 184 | { |
185 | unsigned int val; | 185 | unsigned int val; |
186 | unsigned char c; | 186 | unsigned char c; |
diff --git a/arch/mips/pci/fixup-lemote2f.c b/arch/mips/pci/fixup-lemote2f.c index 4b9768d5d729..a7b917dcf604 100644 --- a/arch/mips/pci/fixup-lemote2f.c +++ b/arch/mips/pci/fixup-lemote2f.c | |||
@@ -96,21 +96,21 @@ int pcibios_plat_dev_init(struct pci_dev *dev) | |||
96 | } | 96 | } |
97 | 97 | ||
98 | /* CS5536 SPEC. fixup */ | 98 | /* CS5536 SPEC. fixup */ |
99 | static void __init loongson_cs5536_isa_fixup(struct pci_dev *pdev) | 99 | static void __devinit loongson_cs5536_isa_fixup(struct pci_dev *pdev) |
100 | { | 100 | { |
101 | /* the uart1 and uart2 interrupt in PIC is enabled as default */ | 101 | /* the uart1 and uart2 interrupt in PIC is enabled as default */ |
102 | pci_write_config_dword(pdev, PCI_UART1_INT_REG, 1); | 102 | pci_write_config_dword(pdev, PCI_UART1_INT_REG, 1); |
103 | pci_write_config_dword(pdev, PCI_UART2_INT_REG, 1); | 103 | pci_write_config_dword(pdev, PCI_UART2_INT_REG, 1); |
104 | } | 104 | } |
105 | 105 | ||
106 | static void __init loongson_cs5536_ide_fixup(struct pci_dev *pdev) | 106 | static void __devinit loongson_cs5536_ide_fixup(struct pci_dev *pdev) |
107 | { | 107 | { |
108 | /* setting the mutex pin as IDE function */ | 108 | /* setting the mutex pin as IDE function */ |
109 | pci_write_config_dword(pdev, PCI_IDE_CFG_REG, | 109 | pci_write_config_dword(pdev, PCI_IDE_CFG_REG, |
110 | CS5536_IDE_FLASH_SIGNATURE); | 110 | CS5536_IDE_FLASH_SIGNATURE); |
111 | } | 111 | } |
112 | 112 | ||
113 | static void __init loongson_cs5536_acc_fixup(struct pci_dev *pdev) | 113 | static void __devinit loongson_cs5536_acc_fixup(struct pci_dev *pdev) |
114 | { | 114 | { |
115 | /* enable the AUDIO interrupt in PIC */ | 115 | /* enable the AUDIO interrupt in PIC */ |
116 | pci_write_config_dword(pdev, PCI_ACC_INT_REG, 1); | 116 | pci_write_config_dword(pdev, PCI_ACC_INT_REG, 1); |
@@ -118,14 +118,14 @@ static void __init loongson_cs5536_acc_fixup(struct pci_dev *pdev) | |||
118 | pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0xc0); | 118 | pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0xc0); |
119 | } | 119 | } |
120 | 120 | ||
121 | static void __init loongson_cs5536_ohci_fixup(struct pci_dev *pdev) | 121 | static void __devinit loongson_cs5536_ohci_fixup(struct pci_dev *pdev) |
122 | { | 122 | { |
123 | /* enable the OHCI interrupt in PIC */ | 123 | /* enable the OHCI interrupt in PIC */ |
124 | /* THE OHCI, EHCI, UDC, OTG are shared with interrupt in PIC */ | 124 | /* THE OHCI, EHCI, UDC, OTG are shared with interrupt in PIC */ |
125 | pci_write_config_dword(pdev, PCI_OHCI_INT_REG, 1); | 125 | pci_write_config_dword(pdev, PCI_OHCI_INT_REG, 1); |
126 | } | 126 | } |
127 | 127 | ||
128 | static void __init loongson_cs5536_ehci_fixup(struct pci_dev *pdev) | 128 | static void __devinit loongson_cs5536_ehci_fixup(struct pci_dev *pdev) |
129 | { | 129 | { |
130 | u32 hi, lo; | 130 | u32 hi, lo; |
131 | 131 | ||
@@ -137,7 +137,7 @@ static void __init loongson_cs5536_ehci_fixup(struct pci_dev *pdev) | |||
137 | pci_write_config_dword(pdev, PCI_EHCI_FLADJ_REG, 0x2000); | 137 | pci_write_config_dword(pdev, PCI_EHCI_FLADJ_REG, 0x2000); |
138 | } | 138 | } |
139 | 139 | ||
140 | static void __init loongson_nec_fixup(struct pci_dev *pdev) | 140 | static void __devinit loongson_nec_fixup(struct pci_dev *pdev) |
141 | { | 141 | { |
142 | unsigned int val; | 142 | unsigned int val; |
143 | 143 | ||
diff --git a/arch/mips/pci/fixup-malta.c b/arch/mips/pci/fixup-malta.c index 0f48498bc231..70073c98ed32 100644 --- a/arch/mips/pci/fixup-malta.c +++ b/arch/mips/pci/fixup-malta.c | |||
@@ -49,10 +49,10 @@ int pcibios_plat_dev_init(struct pci_dev *dev) | |||
49 | return 0; | 49 | return 0; |
50 | } | 50 | } |
51 | 51 | ||
52 | static void __init malta_piix_func0_fixup(struct pci_dev *pdev) | 52 | static void __devinit malta_piix_func0_fixup(struct pci_dev *pdev) |
53 | { | 53 | { |
54 | unsigned char reg_val; | 54 | unsigned char reg_val; |
55 | static int piixirqmap[16] __initdata = { /* PIIX PIRQC[A:D] irq mappings */ | 55 | static int piixirqmap[16] __devinitdata = { /* PIIX PIRQC[A:D] irq mappings */ |
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, |
@@ -83,7 +83,7 @@ static void __init malta_piix_func0_fixup(struct pci_dev *pdev) | |||
83 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_0, | 83 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_0, |
84 | malta_piix_func0_fixup); | 84 | malta_piix_func0_fixup); |
85 | 85 | ||
86 | static void __init malta_piix_func1_fixup(struct pci_dev *pdev) | 86 | static void __devinit malta_piix_func1_fixup(struct pci_dev *pdev) |
87 | { | 87 | { |
88 | unsigned char reg_val; | 88 | unsigned char reg_val; |
89 | 89 | ||
diff --git a/arch/mips/pci/fixup-mpc30x.c b/arch/mips/pci/fixup-mpc30x.c index e08f49cb6875..8e4f8288eca2 100644 --- a/arch/mips/pci/fixup-mpc30x.c +++ b/arch/mips/pci/fixup-mpc30x.c | |||
@@ -22,13 +22,13 @@ | |||
22 | 22 | ||
23 | #include <asm/vr41xx/mpc30x.h> | 23 | #include <asm/vr41xx/mpc30x.h> |
24 | 24 | ||
25 | static const int internal_func_irqs[] __initdata = { | 25 | static const int internal_func_irqs[] __initconst = { |
26 | VRC4173_CASCADE_IRQ, | 26 | VRC4173_CASCADE_IRQ, |
27 | VRC4173_AC97_IRQ, | 27 | VRC4173_AC97_IRQ, |
28 | VRC4173_USB_IRQ, | 28 | VRC4173_USB_IRQ, |
29 | }; | 29 | }; |
30 | 30 | ||
31 | static const int irq_tab_mpc30x[] __initdata = { | 31 | static const int irq_tab_mpc30x[] __initconst = { |
32 | [12] = VRC4173_PCMCIA1_IRQ, | 32 | [12] = VRC4173_PCMCIA1_IRQ, |
33 | [13] = VRC4173_PCMCIA2_IRQ, | 33 | [13] = VRC4173_PCMCIA2_IRQ, |
34 | [29] = MQ200_IRQ, | 34 | [29] = MQ200_IRQ, |
diff --git a/arch/mips/pci/fixup-sb1250.c b/arch/mips/pci/fixup-sb1250.c index f0bb9146e6c0..d02900a72916 100644 --- a/arch/mips/pci/fixup-sb1250.c +++ b/arch/mips/pci/fixup-sb1250.c | |||
@@ -15,7 +15,7 @@ | |||
15 | * Set the BCM1250, etc. PCI host bridge's TRDY timeout | 15 | * Set the BCM1250, etc. PCI host bridge's TRDY timeout |
16 | * to the finite max. | 16 | * to the finite max. |
17 | */ | 17 | */ |
18 | static void __init quirk_sb1250_pci(struct pci_dev *dev) | 18 | static void __devinit quirk_sb1250_pci(struct pci_dev *dev) |
19 | { | 19 | { |
20 | pci_write_config_byte(dev, 0x40, 0xff); | 20 | pci_write_config_byte(dev, 0x40, 0xff); |
21 | } | 21 | } |
@@ -25,7 +25,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SIBYTE, PCI_DEVICE_ID_BCM1250_PCI, | |||
25 | /* | 25 | /* |
26 | * The BCM1250, etc. PCI/HT bridge reports as a host bridge. | 26 | * The BCM1250, etc. PCI/HT bridge reports as a host bridge. |
27 | */ | 27 | */ |
28 | static void __init quirk_sb1250_ht(struct pci_dev *dev) | 28 | static void __devinit quirk_sb1250_ht(struct pci_dev *dev) |
29 | { | 29 | { |
30 | dev->class = PCI_CLASS_BRIDGE_PCI << 8; | 30 | dev->class = PCI_CLASS_BRIDGE_PCI << 8; |
31 | } | 31 | } |
@@ -35,7 +35,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SIBYTE, PCI_DEVICE_ID_BCM1250_HT, | |||
35 | /* | 35 | /* |
36 | * Set the SP1011 HT/PCI bridge's TRDY timeout to the finite max. | 36 | * Set the SP1011 HT/PCI bridge's TRDY timeout to the finite max. |
37 | */ | 37 | */ |
38 | static void __init quirk_sp1011(struct pci_dev *dev) | 38 | static void __devinit quirk_sp1011(struct pci_dev *dev) |
39 | { | 39 | { |
40 | pci_write_config_byte(dev, 0x64, 0xff); | 40 | pci_write_config_byte(dev, 0x64, 0xff); |
41 | } | 41 | } |
diff --git a/arch/mips/pci/ops-tx4927.c b/arch/mips/pci/ops-tx4927.c index a1e7e6d80c8c..bc13e29d2bb3 100644 --- a/arch/mips/pci/ops-tx4927.c +++ b/arch/mips/pci/ops-tx4927.c | |||
@@ -495,7 +495,7 @@ irqreturn_t tx4927_pcierr_interrupt(int irq, void *dev_id) | |||
495 | } | 495 | } |
496 | 496 | ||
497 | #ifdef CONFIG_TOSHIBA_FPCIB0 | 497 | #ifdef CONFIG_TOSHIBA_FPCIB0 |
498 | static void __init tx4927_quirk_slc90e66_bridge(struct pci_dev *dev) | 498 | static void __devinit tx4927_quirk_slc90e66_bridge(struct pci_dev *dev) |
499 | { | 499 | { |
500 | struct tx4927_pcic_reg __iomem *pcicptr = pci_bus_to_pcicptr(dev->bus); | 500 | struct tx4927_pcic_reg __iomem *pcicptr = pci_bus_to_pcicptr(dev->bus); |
501 | 501 | ||
diff --git a/arch/mips/pci/pci-ip27.c b/arch/mips/pci/pci-ip27.c index 0fbe4c0c170a..fdc24440294c 100644 --- a/arch/mips/pci/pci-ip27.c +++ b/arch/mips/pci/pci-ip27.c | |||
@@ -212,7 +212,7 @@ static inline void pci_enable_swapping(struct pci_dev *dev) | |||
212 | bridge->b_widget.w_tflush; /* Flush */ | 212 | bridge->b_widget.w_tflush; /* Flush */ |
213 | } | 213 | } |
214 | 214 | ||
215 | static void __init pci_fixup_ioc3(struct pci_dev *d) | 215 | static void __devinit pci_fixup_ioc3(struct pci_dev *d) |
216 | { | 216 | { |
217 | pci_disable_swapping(d); | 217 | pci_disable_swapping(d); |
218 | } | 218 | } |
diff --git a/arch/mips/pci/pci-xlr.c b/arch/mips/pci/pci-xlr.c index 1644805a6730..172af1cd5867 100644 --- a/arch/mips/pci/pci-xlr.c +++ b/arch/mips/pci/pci-xlr.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/irq.h> | 41 | #include <linux/irq.h> |
42 | #include <linux/irqdesc.h> | 42 | #include <linux/irqdesc.h> |
43 | #include <linux/console.h> | 43 | #include <linux/console.h> |
44 | #include <linux/pci_regs.h> | ||
44 | 45 | ||
45 | #include <asm/io.h> | 46 | #include <asm/io.h> |
46 | 47 | ||
@@ -156,35 +157,55 @@ struct pci_controller nlm_pci_controller = { | |||
156 | .io_offset = 0x00000000UL, | 157 | .io_offset = 0x00000000UL, |
157 | }; | 158 | }; |
158 | 159 | ||
160 | /* | ||
161 | * The top level PCIe links on the XLS PCIe controller appear as | ||
162 | * bridges. Given a device, this function finds which link it is | ||
163 | * on. | ||
164 | */ | ||
165 | static struct pci_dev *xls_get_pcie_link(const struct pci_dev *dev) | ||
166 | { | ||
167 | struct pci_bus *bus, *p; | ||
168 | |||
169 | /* Find the bridge on bus 0 */ | ||
170 | bus = dev->bus; | ||
171 | for (p = bus->parent; p && p->number != 0; p = p->parent) | ||
172 | bus = p; | ||
173 | |||
174 | return p ? bus->self : NULL; | ||
175 | } | ||
176 | |||
159 | static int get_irq_vector(const struct pci_dev *dev) | 177 | static int get_irq_vector(const struct pci_dev *dev) |
160 | { | 178 | { |
179 | struct pci_dev *lnk; | ||
180 | |||
161 | if (!nlm_chip_is_xls()) | 181 | if (!nlm_chip_is_xls()) |
162 | return PIC_PCIX_IRQ; /* for XLR just one IRQ*/ | 182 | return PIC_PCIX_IRQ; /* for XLR just one IRQ */ |
163 | 183 | ||
164 | /* | 184 | /* |
165 | * For XLS PCIe, there is an IRQ per Link, find out which | 185 | * For XLS PCIe, there is an IRQ per Link, find out which |
166 | * link the device is on to assign interrupts | 186 | * link the device is on to assign interrupts |
167 | */ | 187 | */ |
168 | if (dev->bus->self == NULL) | 188 | lnk = xls_get_pcie_link(dev); |
189 | if (lnk == NULL) | ||
169 | return 0; | 190 | return 0; |
170 | 191 | ||
171 | switch (dev->bus->self->devfn) { | 192 | switch (PCI_SLOT(lnk->devfn)) { |
172 | case 0x0: | 193 | case 0: |
173 | return PIC_PCIE_LINK0_IRQ; | 194 | return PIC_PCIE_LINK0_IRQ; |
174 | case 0x8: | 195 | case 1: |
175 | return PIC_PCIE_LINK1_IRQ; | 196 | return PIC_PCIE_LINK1_IRQ; |
176 | case 0x10: | 197 | case 2: |
177 | if (nlm_chip_is_xls_b()) | 198 | if (nlm_chip_is_xls_b()) |
178 | return PIC_PCIE_XLSB0_LINK2_IRQ; | 199 | return PIC_PCIE_XLSB0_LINK2_IRQ; |
179 | else | 200 | else |
180 | return PIC_PCIE_LINK2_IRQ; | 201 | return PIC_PCIE_LINK2_IRQ; |
181 | case 0x18: | 202 | case 3: |
182 | if (nlm_chip_is_xls_b()) | 203 | if (nlm_chip_is_xls_b()) |
183 | return PIC_PCIE_XLSB0_LINK3_IRQ; | 204 | return PIC_PCIE_XLSB0_LINK3_IRQ; |
184 | else | 205 | else |
185 | return PIC_PCIE_LINK3_IRQ; | 206 | return PIC_PCIE_LINK3_IRQ; |
186 | } | 207 | } |
187 | WARN(1, "Unexpected devfn %d\n", dev->bus->self->devfn); | 208 | WARN(1, "Unexpected devfn %d\n", lnk->devfn); |
188 | return 0; | 209 | return 0; |
189 | } | 210 | } |
190 | 211 | ||
@@ -202,7 +223,27 @@ void arch_teardown_msi_irq(unsigned int irq) | |||
202 | int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) | 223 | int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) |
203 | { | 224 | { |
204 | struct msi_msg msg; | 225 | struct msi_msg msg; |
226 | struct pci_dev *lnk; | ||
205 | int irq, ret; | 227 | int irq, ret; |
228 | u16 val; | ||
229 | |||
230 | /* MSI not supported on XLR */ | ||
231 | if (!nlm_chip_is_xls()) | ||
232 | return 1; | ||
233 | |||
234 | /* | ||
235 | * Enable MSI on the XLS PCIe controller bridge which was disabled | ||
236 | * at enumeration, the bridge MSI capability is at 0x50 | ||
237 | */ | ||
238 | lnk = xls_get_pcie_link(dev); | ||
239 | if (lnk == NULL) | ||
240 | return 1; | ||
241 | |||
242 | pci_read_config_word(lnk, 0x50 + PCI_MSI_FLAGS, &val); | ||
243 | if ((val & PCI_MSI_FLAGS_ENABLE) == 0) { | ||
244 | val |= PCI_MSI_FLAGS_ENABLE; | ||
245 | pci_write_config_word(lnk, 0x50 + PCI_MSI_FLAGS, val); | ||
246 | } | ||
206 | 247 | ||
207 | irq = get_irq_vector(dev); | 248 | irq = get_irq_vector(dev); |
208 | if (irq <= 0) | 249 | if (irq <= 0) |
@@ -327,7 +368,7 @@ static int __init pcibios_init(void) | |||
327 | } | 368 | } |
328 | } else { | 369 | } else { |
329 | /* XLR PCI controller ACK */ | 370 | /* XLR PCI controller ACK */ |
330 | irq_set_handler_data(PIC_PCIE_XLSB0_LINK3_IRQ, xlr_pci_ack); | 371 | irq_set_handler_data(PIC_PCIX_IRQ, xlr_pci_ack); |
331 | } | 372 | } |
332 | 373 | ||
333 | return 0; | 374 | return 0; |