• M
    x86/PCI: Add support for the ALi M1487 (IBC) PIRQ router · 1ce849c7
    Maciej W. Rozycki 提交于
    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: NMaciej W. Rozycki <macro@orcam.me.uk>
    Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
    Link: https://lore.kernel.org/r/alpine.DEB.2.21.2107191702020.9461@angie.orcam.me.uk
    1ce849c7
irq.c 37.4 KB