coreboot/src/device
Mike Loptien 0f5cf5e45b PCI IRQs: Swizzle PCI IRQs for PCI bridges
The PCI Specification states that devices that implement
a bridge and a secondary bus must swizzle (rotate) the
interrupt pins according to the table below:
	Child Dev #     Child PIN       Parent PIN
	0,4,8,12...     A/B/C/D         A/B/C/D
	1,5,9,13...     A/B/C/D         B/C/D/A
	2,6,10,14..     A/B/C/D         C/D/A/B
	3,7,11,15..     A/B/C/D         D/A/B/C

Which is also described by this equation:
	PIN_parent = (Pin_child + Dev_child) % 4

When a device is found and its bus number is greater than 0,
it is on a bridge and needs to be swizzled.  Following the
string of parents up to the root bus and swizzling as we go
gives us the desired swizzling result.  When BIOS_SPEW is
defined, it will print out each step of the swizzling process.

Change-Id: Icafeadd01983282c86e25f560c831c9482c74e68
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: http://review.coreboot.org/5734
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Reviewed-by: Mike Loptien <mike.loptien@se-eng.com>
2014-05-29 23:24:28 +02:00
..
dram device/dram/ddr3: Move CRC calculation in a separate function 2013-12-17 19:59:22 +01:00
oprom device/oprom/yabel/vbe.c: Avoid unused func warn 2014-05-18 18:05:43 +02:00
agp_device.c GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
azalia_device.c Add a generic Intel HD audio (Azalia) module azalia_device.c 2013-08-13 10:12:52 +02:00
cardbus_device.c GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
cpu_device.c GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
device.c PCI: Guard pci.h with CONFIG_PCI 2014-02-12 21:56:30 +01:00
device_romstage.c device_romstage: Add a way to move to the next device 2014-05-21 22:38:33 +02:00
device_util.c PCI: Guard pci.h with CONFIG_PCI 2014-02-12 21:56:30 +01:00
hypertransport.c device: Fix spelling 2013-07-10 20:17:25 +02:00
Kconfig device: provide option to always load PCI option roms 2014-05-01 15:38:11 +02:00
Makefile.inc Introduce stage-specific architecture for coreboot 2014-05-06 20:23:31 +02:00
pci_device.c PCI IRQs: Swizzle PCI IRQs for PCI bridges 2014-05-29 23:24:28 +02:00
pci_early.c OxPCIe uart: Split PCI bridge control 2014-04-09 11:29:45 +02:00
pci_ops.c Redefine pci_bus_default_ops as function 2013-07-25 11:35:58 +02:00
pci_rom.c GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
pciexp_device.c GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
pcix_device.c GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
pnp_device.c pnp: Implement common handling for PnP config modes 2013-06-17 21:39:40 +02:00
root_device.c GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
smbus_ops.c smbus: Add guards to avoid calling NULL. 2014-02-01 18:38:32 +01:00