Re: [RFC PATCH 1/2] irqchip: ti-tsir: Add support for Timesync Interrupt Router
From: Vankar, Chintan <hidden>
Date: 2025-02-13 18:46:02
Also in:
lkml
On 2/11/2025 1:33 AM, Thomas Gleixner wrote:
Chintan! On Sun, Feb 09 2025 at 14:06, Vankar, Chintan wrote:quoted
On 2/7/2025 2:58 AM, Thomas Gleixner wrote:quoted
On Wed, Feb 05 2025 at 21:31, Chintan Vankar wrote:quoted
+static struct irq_chip ts_intr_irq_chip = { + .name = "TIMESYNC_INTRTR", +};How is this interrupt chip supposed to work? All it implements is a name.Timesync INTR can be used to map input sources with the corresponding output, so that we can configure specific functionality for the device that is using this output sources either as an interrupt source or to synchronize the time. To implement above Timesync INTR's functionality, I have implemented ts_intr_irq_domain_alloc() and ts_intr_irq_domain_free() ops which are sufficient. Let me know if they are fine.quoted
quoted
+ + tsr_data.domain = irq_domain_create_tree(&node->fwnode, &ts_intr_irq_domain_ops, &tsr_data);So this instantiates a interrupt domain which is completely disconnected from the rest of the world. > How is the output side of this supposed to handle an interrupt which is routed to it?________________________ | Timesync INTR +---->dma_local_events | | Device sync events-----> +---->pcie_cpts_hw_push | | cpts_genf-----> +---->cpts_hw_push |________________________| No it is connected, it is being used to configure the output for Timesync INTR as mentioned above. As seen in the diagram, Timesync INTR has multiple output interfaces and we can configure those to map them with the corresponding input as required by peripherals which receives the signal. In context of this series, CPTS module is utilizing the output signal of cpts_genf as Hardware timestamp push event to generate timestamps at 1 secondsIf I understand this correctly, then the interrupt number you need to allocate for this is never going to be requested. If it would be requested it just would do nothing and the handler would never be invoked, right? The allocation just establishes the routing of a signal between two arbitrary IP blocks in the SoC. So the question is what has this to do with interrupts in the first place?
Hello Thomas, Your understanding is correct about the Timesync INTR. As I mentioned Timesync INTR is an instance of Interrupt Router which has multiple output and not all the output lines are acting as interrupt lines unlike other Interrupt Routers. Timesync INTR can have devices on both the sides, we can provide input to Timesync INTR that can be consumed by some other device from the output line. As an instance, One of the input of Timesync INTR is an output from the CPTS module which can be consumed by other device and that does not need to handle/allocate Linux irq number. Let me know if implementing this driver for this specific use-case would be feasible.
Thanks,
tglx