devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robherring2@gmail.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: linux@arm.linux.org.uk, 'Arnd Bergmann' <arnd@arndb.de>,
	Will Deacon <Will.Deacon@arm.com>,
	devicetree-discuss@lists.ozlabs.org,
	'Barry Song' <21cnbao@gmail.com>,
	linux-kernel@vger.kernel.org, workgroup.linux@csr.com,
	'Grant Likely' <grant.likely@secretlab.ca>,
	weizeng.he@csr.com, 'Olof Johansson' <olof@lixom.net>,
	tglx@linutronix.de, linux-arm-kernel@lists.infradead.org
Subject: Re: Subject: L2x0 OF properties do not include interrupt #
Date: Wed, 10 Aug 2011 08:59:12 -0500	[thread overview]
Message-ID: <4E428EB0.1080204@gmail.com> (raw)
In-Reply-To: <000201cc575b$c1229010$4367b030$@rutland@arm.com>

Mark,

On 08/10/2011 07:48 AM, Mark Rutland wrote:
> Hi all,
> 
> I'm working on a driver for the PMU found in L220/PL310 L2 Cache Controllers
> (as an extension to the existing L2x0 code).
> 
> I've taken a look into what BSP support would be required and mocked up some
> platform_device support, though I notice that Rob Herring has provided
> devicetree bindings for the L2x0 ("l2x0: Add OF based initialization") which
> should probably be used to initialize the PMU (if present) from devicetree.
> 
> The L2x0 hardware supports a combined interrupt line, which is present on the
> Vexpress A9x4, EB11MPcore, PB1176, etc. This can be used to signal errors on
> read/write, parity checks, etc. The PMU also fires an interrupt on this line
> when any of its counters saturate.
> 
> Unfortunately the L2x0 OF bindings introduced by the patch don't include an
> (optional) interrupt property, which means the PMU driver won't be able to be
> initialised via devicetree. As we want to get as much as possible dynamically
> configured via devicetree, this is problematic.
> 
> I realise I'm a bit late to the party here, but I'd like to propose adding an
> optional interrupt parameter to the binding. I'm not aware of any
> implementations which use separate interrupts, but given the binding
> seems to be generic across L2CC implementations (and is not limited simply to
> the L2x0), having a list rather than a single interrupt may be appropriate for
> someone.

Good thing the party never ends...

> This would boil down to (for the moment) a Documentation change along the lines of:
> 
>> diff --git a/Documentation/devicetree/bindings/arm/l2cc.txt b/Documentation/devicetree/bindings/arm/l2cc.txt
>> index f50e021..d4b387b 100644
>> --- a/Documentation/devicetree/bindings/arm/l2cc.txt
>> +++ b/Documentation/devicetree/bindings/arm/l2cc.txt
>> @@ -28,6 +28,7 @@ Optional properties:
>>  - arm,filter-ranges : <start length> Starting address and length of window to
>>    filter. Addresses in the filter window are directed to the M1 port. Other
>>    addresses will go to the M0 port.
>> +- interrupt : A combined interrupt.
>>  
>>  Example:
>>  
>> @@ -39,4 +40,5 @@ L2: cache-controller {
>>          arm,filter-latency = <0x80000000 0x8000000>;
>>          cache-unified;
>>          cache-level = <2>;
>> +        interrupt = <45>;
>>  };
> 
> Any thoughts?

I think you should allow for either the single irq or individual irqs.
You can specify that the event counter interrupt must be first, then the
pmu driver could work either way ignoring the rest. The driver probably
needs to mark the handler as shared if there is only the combined
interrupt unless you expect all interrupts to be handled by 1 driver.

Rob

> 
> Thanks,
> Mark
> 
> 

       reply	other threads:[~2011-08-10 13:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <000201cc575b$c1229010$4367b030$@rutland@arm.com>
2011-08-10 13:59 ` Rob Herring [this message]
2011-08-10 14:10   ` Subject: L2x0 OF properties do not include interrupt # Will Deacon
     [not found]     ` <20110810141048.GK10121-SGELLbQ0bobZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2011-08-10 14:24       ` Arnd Bergmann
     [not found]         ` <201108101624.27881.arnd-r2nGTMty4D4@public.gmane.org>
2011-08-10 14:28           ` Will Deacon
     [not found]             ` <20110810142808.GL10121-SGELLbQ0bobZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2011-08-11 13:05               ` Arnd Bergmann
     [not found]                 ` <201108111505.11887.arnd-r2nGTMty4D4@public.gmane.org>
2011-08-11 13:09                   ` Will Deacon
2011-08-11 15:32                     ` Rob Herring
2011-08-11 15:38                       ` Will Deacon
     [not found]                         ` <20110811153800.GC5154-SGELLbQ0bobZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2011-08-11 16:06                           ` Rob Herring
2011-08-11 16:34                             ` Will Deacon
     [not found]                             ` <4E43FDFF.1080401-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-08-12  9:02                               ` Russell King - ARM Linux
2011-08-10 14:37     ` Rob Herring
     [not found]       ` <4E4297A6.6050101-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-08-10 14:39         ` Will Deacon
2011-08-10 14:09 ` Arnd Bergmann
2011-08-10 14:31   ` Rob Herring
     [not found]     ` <4E42965A.9010500-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
2011-08-10 15:12       ` Will Deacon
2011-08-10 12:48 Mark Rutland
  -- strict thread matches above, loose matches on Subject: below --
2011-08-10 12:48 Mark Rutland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E428EB0.1080204@gmail.com \
    --to=robherring2@gmail.com \
    --cc=21cnbao@gmail.com \
    --cc=Will.Deacon@arm.com \
    --cc=arnd@arndb.de \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=olof@lixom.net \
    --cc=tglx@linutronix.de \
    --cc=weizeng.he@csr.com \
    --cc=workgroup.linux@csr.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).