freebsd-nq/sys/sparc64
Thomas Moestl c944338750 Fix interrupt assignment for non-builtin PCI devices on e450s.
This machine uses a non-standard scheme to specify the interrupts to
be assigned for devices in PCI slots; instead of giving the INO
or full interrupt number (which is done for the other devices in this
box), the firmware interrupt properties contain intpin numbers, which
have to be swizzled as usual on PCI-PCI bridges; however, the PCI host
bridge nodes have no interrupt map, so we need to guess the
correct INO by slot number of the device or the closest PCI-PCI
bridge leading to it, and the intpin.

To do this, this fix makes the following changes:
- Add a newbus method for sparc64 PCI host bridges to guess
  the INO, and glue code in ofw_pci_orb_callback() to invoke it based
  on a new quirk entry. The guessing is only done for interrupt numbers
  too low to contain any IGN found on e450s.
- Create another new quirk entry was created to prevent mapping of EBus
  interrupts  at PCI level; the e450 has full INOs in the interrupt
  properties of EBus devices, so trying to remap them could cause
  problems.
- Set both quirk entries for e450s; remove the no-swizzle entry.
- Determine the psycho half (bus A or B) a driver instance manages
  in psycho_attach()
- Implement the new guessing method for psycho, using the slot number,
  psycho half and property value (intpin).

Thanks go to the testers, especially Brian Denehy, who tested many kernels
for me until I had found the right workaround.

Tested by:	Brian Denehy <B.Denehy@90east.com>, jake, fenner,
		Marius Strobl <marius@alchemy.franken.de>,
		Marian Dobre <mari@onix.ro>
Approved by:	re (scottl)
2003-05-30 20:48:05 +00:00
..
central Use M_WAITOK. 2003-02-19 17:25:58 +00:00
compile Obrien created this directory, but I didn't cvs add cvsignore 2001-07-01 23:37:03 +00:00
conf Remove some debug options that are no longer needed. 2003-04-27 01:52:32 +00:00
ebus Fix interrupt assignment for non-builtin PCI devices on e450s. 2003-05-30 20:48:05 +00:00
fhc Fix definite panic when releasing interrupt resources. 2003-02-19 19:40:40 +00:00
include Fix interrupt assignment for non-builtin PCI devices on e450s. 2003-05-30 20:48:05 +00:00
isa Fix interrupt assignment for non-builtin PCI devices on e450s. 2003-05-30 20:48:05 +00:00
pci Fix interrupt assignment for non-builtin PCI devices on e450s. 2003-05-30 20:48:05 +00:00
sbus Bring back bus_dmasync_op_t. It is now a typedef to an int, though the 2003-05-27 04:59:59 +00:00
sparc64 Fix interrupt assignment for non-builtin PCI devices on e450s. 2003-05-30 20:48:05 +00:00