aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/pci_psycho.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/pci_psycho.c')
-rw-r--r--arch/sparc64/kernel/pci_psycho.c33
1 files changed, 3 insertions, 30 deletions
diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c
index 897334680657..dfb3ec892987 100644
--- a/arch/sparc64/kernel/pci_psycho.c
+++ b/arch/sparc64/kernel/pci_psycho.c
@@ -52,33 +52,6 @@
52#define PSYCHO_PCICTRL_RESV4 0x00000000000000c0UL /* Reserved */ 52#define PSYCHO_PCICTRL_RESV4 0x00000000000000c0UL /* Reserved */
53#define PSYCHO_PCICTRL_AEN 0x000000000000003fUL /* PCI DVMA Arbitration Enable */ 53#define PSYCHO_PCICTRL_AEN 0x000000000000003fUL /* PCI DVMA Arbitration Enable */
54 54
55/* U2P Programmer's Manual, page 13-55, configuration space
56 * address format:
57 *
58 * 32 24 23 16 15 11 10 8 7 2 1 0
59 * ---------------------------------------------------------
60 * |0 0 0 0 0 0 0 0 1| bus | device | function | reg | 0 0 |
61 * ---------------------------------------------------------
62 */
63#define PSYCHO_CONFIG_BASE(PBM) \
64 ((PBM)->config_space | (1UL << 24))
65#define PSYCHO_CONFIG_ENCODE(BUS, DEVFN, REG) \
66 (((unsigned long)(BUS) << 16) | \
67 ((unsigned long)(DEVFN) << 8) | \
68 ((unsigned long)(REG)))
69
70static void *psycho_pci_config_mkaddr(struct pci_pbm_info *pbm,
71 unsigned char bus,
72 unsigned int devfn,
73 int where)
74{
75 if (!pbm)
76 return NULL;
77 return (void *)
78 (PSYCHO_CONFIG_BASE(pbm) |
79 PSYCHO_CONFIG_ENCODE(bus, devfn, where));
80}
81
82/* PSYCHO error handling support. */ 55/* PSYCHO error handling support. */
83 56
84/* Helper function of IOMMU error checking, which checks out 57/* Helper function of IOMMU error checking, which checks out
@@ -339,16 +312,16 @@ static void psycho_register_error_handlers(struct pci_pbm_info *pbm)
339 * the second will just error out since we do not pass in 312 * the second will just error out since we do not pass in
340 * IRQF_SHARED. 313 * IRQF_SHARED.
341 */ 314 */
342 err = request_irq(op->irqs[1], psycho_ue_intr, 0, 315 err = request_irq(op->irqs[1], psycho_ue_intr, IRQF_SHARED,
343 "PSYCHO_UE", pbm); 316 "PSYCHO_UE", pbm);
344 err = request_irq(op->irqs[2], psycho_ce_intr, 0, 317 err = request_irq(op->irqs[2], psycho_ce_intr, IRQF_SHARED,
345 "PSYCHO_CE", pbm); 318 "PSYCHO_CE", pbm);
346 319
347 /* This one, however, ought not to fail. We can just warn 320 /* This one, however, ought not to fail. We can just warn
348 * about it since the system can still operate properly even 321 * about it since the system can still operate properly even
349 * if this fails. 322 * if this fails.
350 */ 323 */
351 err = request_irq(op->irqs[0], psycho_pcierr_intr, 0, 324 err = request_irq(op->irqs[0], psycho_pcierr_intr, IRQF_SHARED,
352 "PSYCHO_PCIERR", pbm); 325 "PSYCHO_PCIERR", pbm);
353 if (err) 326 if (err)
354 printk(KERN_WARNING "%s: Could not register PCIERR, " 327 printk(KERN_WARNING "%s: Could not register PCIERR, "