* [DT] API to determine if interrupt is PPI or SPI ? @ 2012-07-26 19:18 rvaswani [not found] ` <53a41d02c4c4c24bdab47667183891bf.squirrel-mMfbam+mt9083fI46fginR2eb7JE58TQ@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: rvaswani @ 2012-07-26 19:18 UTC (permalink / raw) To: devicetree-discuss, davidb, grant.likely; +Cc: linux-arm-kernel 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 -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum. -- ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <53a41d02c4c4c24bdab47667183891bf.squirrel-mMfbam+mt9083fI46fginR2eb7JE58TQ@public.gmane.org>]
* Re: [DT] API to determine if interrupt is PPI or SPI ? [not found] ` <53a41d02c4c4c24bdab47667183891bf.squirrel-mMfbam+mt9083fI46fginR2eb7JE58TQ@public.gmane.org> @ 2012-07-27 12:33 ` Rob Herring [not found] ` <50128AA0.8040409-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Rob Herring @ 2012-07-27 12:33 UTC (permalink / raw) To: rvaswani-sgV2jX0FEOL9JmXXK+q4OQ Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, davidb-sgV2jX0FEOL9JmXXK+q4OQ, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On 07/26/2012 02:18 PM, rvaswani-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org wrote: > 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 ? 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <50128AA0.8040409-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [DT] API to determine if interrupt is PPI or SPI ? [not found] ` <50128AA0.8040409-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2012-07-27 13:09 ` Will Deacon 2012-07-27 20:00 ` rvaswani 0 siblings, 1 reply; 4+ messages in thread From: Will Deacon @ 2012-07-27 13:09 UTC (permalink / raw) To: Rob Herring Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, rvaswani-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, davidb-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org On Fri, Jul 27, 2012 at 01:33:36PM +0100, Rob Herring wrote: > On 07/26/2012 02:18 PM, rvaswani-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org wrote: > > 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 ? > > 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [DT] API to determine if interrupt is PPI or SPI ? 2012-07-27 13:09 ` Will Deacon @ 2012-07-27 20:00 ` rvaswani 0 siblings, 0 replies; 4+ messages in thread From: rvaswani @ 2012-07-27 20:00 UTC (permalink / raw) To: Will Deacon Cc: devicetree-discuss@lists.ozlabs.org, rvaswani@codeaurora.org, grant.likely@secretlab.ca, davidb@codeaurora.org, linux-arm-kernel@lists.infradead.org > On Fri, Jul 27, 2012 at 01:33:36PM +0100, Rob Herring wrote: >> On 07/26/2012 02:18 PM, rvaswani@codeaurora.org wrote: >> > 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 ? >> >> 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 -- Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-07-27 20:00 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-07-26 19:18 [DT] API to determine if interrupt is PPI or SPI ? rvaswani [not found] ` <53a41d02c4c4c24bdab47667183891bf.squirrel-mMfbam+mt9083fI46fginR2eb7JE58TQ@public.gmane.org> 2012-07-27 12:33 ` Rob Herring [not found] ` <50128AA0.8040409-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2012-07-27 13:09 ` Will Deacon 2012-07-27 20:00 ` rvaswani
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).