API to determine if interrupt is PPI or SPI ?
Hello,
We can specify the interrupt information in the device tree using the arm gic convention.
Is there an API to read directly the 1st cell and determine if an interrupt is a PPI or a SPI ? This information is directly relevant to the driver because it needs to call request_irq or request_percpu_irq based on this data.
How should this be done ideally ?
Thanks,
Rohit
Signature · 3 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum. --
Quoted 10 lines · rvaswani at codeaurora.org
Hello,
We can specify the interrupt information in the device tree using the arm gic convention.
Is there an API to read directly the 1st cell and determine if an interrupt is a PPI or a SPI ? This information is directly relevant to the driver because it needs to callrequest_irqorrequest_percpu_irqbased on this data.How should this be done ideally ?
Seems a bit strange to me that you would have a h/w block that can be connected either way...
Perhaps the irq resource should have a flag for percpu irq.
Rob
Quoted 10 lines · Rob Herring
Quoted 9 lines · rvaswani at codeaurora.org
Hello,
We can specify the interrupt information in the device tree using the arm gic convention.
Is there an API to read directly the 1st cell and determine if an interrupt is a PPI or a SPI ? This information is directly relevant to the driver because it needs to callrequest_irqorrequest_percpu_irqbased on this data.
Quoted 4 lines
Quoted 1 line
How should this be done ideally ?
Seems a bit strange to me that you would have a h/w block that can be connected either way...
The CPU PMU can be wired as either SPI or PPI. The latter makes more sense to me but usually (although not exclusively) it's wired using the former.
Will
Quoted 16 lines · Rob Herring
Quoted 15 lines · rvaswani at codeaurora.org
Quoted 3 lines
Hello,
We can specify the interrupt information in the device tree using the
arm
Quoted 3 lines
gic convention.
Is there an API to read directly the 1st cell and determine if an interrupt is a PPI or a SPI ? This information is directly relevant tothe
Quoted 1 line
driver because it needs to call
request_irqorrequest_percpu_irqbased on
Quoted 3 lines
this data.
How should this be done ideally ?
Quoted 9 lines
Quoted 2 lines
Seems a bit strange to me that you would have a h/w block that can be connected either way...
The CPU PMU can be wired as either SPI or PPI. The latter makes more sense to
me but usually (although not exclusively) it's wired using the former.Will
We have the same driver for a hardware for different chipsets and unfortunately the hardware team decided to connect this GIC interrupt differently across these chipsets. This leaves us with a software choice to make.
We could add another property to the device tree (like irq-is-percpu, irq-is-not-percpu), but that seems redundant.
We were hoping to have an API to tell us the SPI/PPI difference since this information is already encoded in the interrupt-cells in the device tree for this device.
Would that be the right way to go or there is something better that can be done ?
Thanks,
Rohit
Signature · 2 lines
Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.