devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Subject: L2x0 OF properties do not include interrupt #
@ 2011-08-10 12:48 Mark Rutland
  0 siblings, 0 replies; 18+ messages in thread
From: Mark Rutland @ 2011-08-10 12:48 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ, Will Deacon,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, workgroup.linux-kQvG35nSl+M,
	weizeng.he-kQvG35nSl+M, tglx-hfZtesqFncYOwBW4kG4KsQ,
	'Rob Herring'

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.

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?

Thanks,
Mark

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Subject: L2x0 OF properties do not include interrupt #
@ 2011-08-10 12:48 Mark Rutland
  0 siblings, 0 replies; 18+ messages in thread
From: Mark Rutland @ 2011-08-10 12:48 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux, 'Arnd Bergmann', Will Deacon, devicetree-discuss,
	'Barry Song', linux-kernel, workgroup.linux,
	'Grant Likely', weizeng.he, 'Olof Johansson',
	tglx, 'Rob Herring'

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.

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?

Thanks,
Mark

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2011-08-12  9:02 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <000201cc575b$c1229010$4367b030$@rutland@arm.com>
2011-08-10 13:59 ` Subject: L2x0 OF properties do not include interrupt # Rob Herring
2011-08-10 14:10   ` 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

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).