• Mathias Nyman's avatar
    xhci: Refactor interrupter code for initial multi interrupter support. · b17a57f8
    Mathias Nyman authored
    xHC supports several interrupters, each with its own mmio register set,
    event ring and MSI/MSI-X vector. Transfers can be assigned different
    interrupters when queued. See xhci 4.17 for details.
    Current driver only supports one interrupter.
    
    Create a xhci_interrupter structure containing an event ring, pointer to
    mmio registers for this interrupter, variables to store registers over s3
    suspend, erst, etc. Add functions to create and free an interrupter, and
    pass an interrupter pointer to functions that deal with events.
    
    Secondary interrupters are also useful without having an interrupt vector.
    One use case is the xHCI audio sideband offloading where a DSP can take
    care of specific audio endpoints.
    
    When all transfer events of an offloaded endpoint can be mapped to a
    separate interrupter event ring the DSP can poll this ring, and we can mask
    these events preventing waking up the CPU.
    
    Only minor functional changes such as clearing some of the interrupter
    registers when freeing the interrupter.
    
    Still create only one primary interrupter.
    Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
    Link: https://lore.kernel.org/r/20230202150505.618915-4-mathias.nyman@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    b17a57f8
xhci-ring.c 130 KB