Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Jun 02, 2021
  2. Jun 01, 2021
  3. May 28, 2021
    • Suman Anna's avatar
      HACK: irqchip/irq-pruss-intc: Fix processing of IEP interrupts · bbe0ff82
      Suman Anna authored
      
      It was discovered that IEP capture/compare IRQs (event #7 on all SoCs
      and event #56 on K3 SoCs) are always triggered twice when PPS is
      generated and CMP hit event detected by IEP.
      
      An example of the problem is:
        pruss_intc_irq_handler
         generic_handle_irq
          handle_level_irq
            mask_ack_irq -> IRQ 7 masked and asked in INTC,
                            but it's not yet cleared on HW level
            handle_irq_event()
              <threaded on RT>
                 icss_iep_cap_cmp_handler() -> IRQ 7 is actually processed in HW
              irq_finalize_oneshot()
               unmask_irq()
                 pruss_intc_irq_unmask() -> IRQ 7 status is still observed as set
      
      The solution is to actually ack these IRQs from pruss_intc_irq_unmask()
      after the IRQ source is cleared in HW.
      
      NOTE:
      1. The current solution provides a decent generic framework to scale
         for any additional events that might be discovered in the future.
      2. The solution can be reworked using soc_device_attributes() if a
         per-SoC solution is desired. The current solution applies to all
         SoCs accounting for single IEP on non-K3 SoCs and for 2 IEPs on
         all K3 SoCs.
      
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: default avatarSuman Anna <s-anna@ti.com>
      bbe0ff82