Maciej W. Rozycki 1ce849c755 x86/PCI: Add support for the ALi M1487 (IBC) PIRQ router
The ALi M1487 ISA Bus Controller (IBC), a part of the ALi FinALi 486 
chipset, implements PCI interrupt steering with a PIRQ router[1] in the 
form of four 4-bit mappings, spread across two PCI INTx Routing Table 
Mapping Registers, available in the port I/O space accessible indirectly 
via the index/data register pair at 0x22/0x23, located at indices 0x42 
and 0x43 for the INT1/INT2 and INT3/INT4 lines respectively.

Additionally there is a separate PCI INTx Sensitivity Register at index 
0x44 in the same port I/O space, whose bits 3:0 select the trigger mode 
for INT[4:1] lines respectively[2].  Manufacturer's documentation says 
that this register has to be set consistently with the relevant ELCR 
register[3].  Add a router-specific hook then and use it to handle this 
register.

Accesses to the port I/O space concerned here need to be unlocked by 
writing the value of 0xc5 to the Lock Register at index 0x03 
beforehand[4].  Do so then and then lock access after use for safety.

The IBC is implemented as a peer bridge on the host bus rather than a 
southbridge on PCI and therefore it does not itself appear in the PCI 
configuration space.  It is complemented by the M1489 Cache-Memory PCI 
Controller (CMP) host-to-PCI bridge, so use that device's identification 
for determining the presence of the IBC.

References:

[1] "M1489/M1487: 486 PCI Chip Set", Version 1.2, Acer Laboratories 
    Inc., July 1997, Section 4: "Configuration Registers", pp. 76-77

[2] same, p. 77

[3] same, Section 5: "M1489/M1487 Software Programming Guide", pp. 
    99-100

[4] same, Section 4: "Configuration Registers", p. 37

Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/alpine.DEB.2.21.2107191702020.9461@angie.orcam.me.uk
2021-08-10 23:31:43 +02:00
..
2021-07-30 10:56:47 -07:00
2021-07-10 11:01:38 -07:00
2021-08-03 17:05:36 +02:00
2021-08-06 11:41:12 -07:00
2021-07-10 11:01:38 -07:00
2021-07-30 10:56:47 -07:00
2021-07-10 11:01:38 -07:00
2021-07-30 10:56:47 -07:00
2021-07-30 10:56:47 -07:00
2021-07-10 11:01:38 -07:00
2021-08-08 10:23:13 -07:00
2021-07-21 15:51:37 +02:00
2021-07-10 11:01:38 -07:00
2021-07-10 11:01:38 -07:00
2021-07-30 10:56:47 -07:00
2021-08-01 12:18:44 -07:00
2021-08-07 10:15:04 -07:00
2021-08-05 11:46:24 -07:00
2021-07-30 10:56:47 -07:00
2021-07-10 11:01:38 -07:00
2021-07-30 10:56:47 -07:00