From: Rob Herring <hidden> Date: 2011-08-03 18:54:21
From: Rob Herring <redacted>
This adds devicetree binding support to the ARM pl061 driver removing the
platform_data dependency. When DT binding is used, the gpio numbering is
assigned dynamically. The interrupt assignment is converted to use the
irq_domain infrastructure.
Signed-off-by: Rob Herring <redacted>
Cc: Grant Likely <redacted>
---
drivers/gpio/gpio-pl061.c | 32 +++++++++++++++++++++++---------
1 files changed, 23 insertions(+), 9 deletions(-)
Hi Rob,
On Wed, Aug 03, 2011 at 01:54:21PM -0500, Rob Herring wrote:
From: Rob Herring <redacted>
This adds devicetree binding support to the ARM pl061 driver removing the
platform_data dependency. When DT binding is used, the gpio numbering is
assigned dynamically. The interrupt assignment is converted to use the
irq_domain infrastructure.
Signed-off-by: Rob Herring <redacted>
Cc: Grant Likely <redacted>
---
drivers/gpio/gpio-pl061.c | 32 +++++++++++++++++++++++---------
1 files changed, 23 insertions(+), 9 deletions(-)
[snip]
quoted hunk
@@ -283,7 +295,7 @@ static int pl061_probe(struct amba_device *dev, const
struct amba_id *id)
* irq_chip support
*/
- if (chip->irq_base == (unsigned) -1)
+ if (chip->irq_base == NO_IRQ)
Please update the comment at include/linux/amba/pl061.h as well.
From: Grant Likely <hidden> Date: 2011-08-03 22:22:54
On Wed, Aug 3, 2011 at 7:54 PM, Rob Herring [off-list ref] wrote:
quoted hunk
From: Rob Herring <redacted>
This adds devicetree binding support to the ARM pl061 driver removing the
platform_data dependency. When DT binding is used, the gpio numbering is
assigned dynamically. The interrupt assignment is converted to use the
irq_domain infrastructure.
Signed-off-by: Rob Herring <redacted>
Cc: Grant Likely <redacted>
---
?drivers/gpio/gpio-pl061.c | ? 32 +++++++++++++++++++++++---------
?1 files changed, 23 insertions(+), 9 deletions(-)
This looks wrong. intspec is always 0 here, when I would assume you
would want the value of the interrupts property from this device's
node. Is this the cascade irq number? Or is it supposed to be the
starting interrupt number for the gpios? If it is starting interrupt
number, then it should actually be dynamically assigned. If it is the
cascade, then platform_get_irq() should work.
g.
From: Rob Herring <hidden> Date: 2011-08-03 23:18:45
Grant,
On 08/03/2011 05:22 PM, Grant Likely wrote:
On Wed, Aug 3, 2011 at 7:54 PM, Rob Herring [off-list ref] wrote:
quoted
From: Rob Herring <redacted>
This adds devicetree binding support to the ARM pl061 driver removing the
platform_data dependency. When DT binding is used, the gpio numbering is
assigned dynamically. The interrupt assignment is converted to use the
irq_domain infrastructure.
Signed-off-by: Rob Herring <redacted>
Cc: Grant Likely <redacted>
---
drivers/gpio/gpio-pl061.c | 32 +++++++++++++++++++++++---------
1 files changed, 23 insertions(+), 9 deletions(-)
This looks wrong. intspec is always 0 here, when I would assume you
would want the value of the interrupts property from this device's
node. Is this the cascade irq number? Or is it supposed to be the
starting interrupt number for the gpios? If it is starting interrupt
number, then it should actually be dynamically assigned. If it is the
cascade, then platform_get_irq() should work.
It's the latter case that I need to retrieve. I have this platform code
assigning the linux irq numbers:
struct device_node *node;
int n = 0;
node = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-gic");
if (!node)
panic("missing gic devicetree node\n");
irq_domain_add_simple(node, 0);
for_each_compatible_node(node, NULL, "arm,pl061") {
irq_domain_add_simple(node, 160 + (8 * n));
n++;
}
In this case with simple translation, intspec is really a don't care.
irq_create_of_mapping just finds the domain that matches the gpio
ctrlr's node and returns the domain's irq_base (+ 0) as the translate
function will just return the intspec value for the hw_irq.
Have I missed something? There is not yet any dynamic assignment of
linux irq numbers?
Rob
From: Grant Likely <hidden> Date: 2011-10-24 22:26:18
On Wed, Aug 03, 2011 at 06:18:45PM -0500, Rob Herring wrote:
Grant,
On 08/03/2011 05:22 PM, Grant Likely wrote:
quoted
On Wed, Aug 3, 2011 at 7:54 PM, Rob Herring [off-list ref] wrote:
quoted
From: Rob Herring <redacted>
This adds devicetree binding support to the ARM pl061 driver removing the
platform_data dependency. When DT binding is used, the gpio numbering is
assigned dynamically. The interrupt assignment is converted to use the
irq_domain infrastructure.
Signed-off-by: Rob Herring <redacted>
Cc: Grant Likely <redacted>
---
drivers/gpio/gpio-pl061.c | 32 +++++++++++++++++++++++---------
1 files changed, 23 insertions(+), 9 deletions(-)
This looks wrong. intspec is always 0 here, when I would assume you
would want the value of the interrupts property from this device's
node. Is this the cascade irq number? Or is it supposed to be the
starting interrupt number for the gpios? If it is starting interrupt
number, then it should actually be dynamically assigned. If it is the
cascade, then platform_get_irq() should work.
It's the latter case that I need to retrieve. I have this platform code
assigning the linux irq numbers:
struct device_node *node;
int n = 0;
node = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-gic");
if (!node)
panic("missing gic devicetree node\n");
irq_domain_add_simple(node, 0);
for_each_compatible_node(node, NULL, "arm,pl061") {
irq_domain_add_simple(node, 160 + (8 * n));
n++;
}
In this case with simple translation, intspec is really a don't care.
irq_create_of_mapping just finds the domain that matches the gpio
ctrlr's node and returns the domain's irq_base (+ 0) as the translate
function will just return the intspec value for the hw_irq.
Have I missed something? There is not yet any dynamic assignment of
linux irq numbers?
Yes, the kernel does support dynamic irq number assignment, but the
interrupt controller still needs to manage it. I've not yet decided
what the best way to integrate it into irq_domain is.
g.
From: Rob Herring <hidden> Date: 2011-10-24 22:48:05
On 10/24/2011 05:26 PM, Grant Likely wrote:
On Wed, Aug 03, 2011 at 06:18:45PM -0500, Rob Herring wrote:
quoted
Grant,
On 08/03/2011 05:22 PM, Grant Likely wrote:
quoted
On Wed, Aug 3, 2011 at 7:54 PM, Rob Herring [off-list ref] wrote:
quoted
From: Rob Herring <redacted>
This adds devicetree binding support to the ARM pl061 driver removing the
platform_data dependency. When DT binding is used, the gpio numbering is
assigned dynamically. The interrupt assignment is converted to use the
irq_domain infrastructure.
Signed-off-by: Rob Herring <redacted>
Cc: Grant Likely <redacted>
---
drivers/gpio/gpio-pl061.c | 32 +++++++++++++++++++++++---------
1 files changed, 23 insertions(+), 9 deletions(-)
This looks wrong. intspec is always 0 here, when I would assume you
would want the value of the interrupts property from this device's
node. Is this the cascade irq number? Or is it supposed to be the
starting interrupt number for the gpios? If it is starting interrupt
number, then it should actually be dynamically assigned. If it is the
cascade, then platform_get_irq() should work.
It's the latter case that I need to retrieve. I have this platform code
assigning the linux irq numbers:
struct device_node *node;
int n = 0;
node = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-gic");
if (!node)
panic("missing gic devicetree node\n");
irq_domain_add_simple(node, 0);
for_each_compatible_node(node, NULL, "arm,pl061") {
irq_domain_add_simple(node, 160 + (8 * n));
n++;
}
In this case with simple translation, intspec is really a don't care.
irq_create_of_mapping just finds the domain that matches the gpio
ctrlr's node and returns the domain's irq_base (+ 0) as the translate
function will just return the intspec value for the hw_irq.
Have I missed something? There is not yet any dynamic assignment of
linux irq numbers?
Yes, the kernel does support dynamic irq number assignment, but the
interrupt controller still needs to manage it. I've not yet decided
what the best way to integrate it into irq_domain is.
I had since figured that out with the GIC series. We should discuss at
Connect. My plan here is to make generic-irq-chip use domains and
irq_alloc_descs, then convert pl061 to use generic-irq-chip.
Rob
From: Rob Herring <hidden> Date: 2011-08-10 21:31:46
From: Rob Herring <redacted>
This adds devicetree binding support to the ARM pl061 driver removing the
platform_data dependency. When DT binding is used, the gpio numbering is
assigned dynamically. For now, interrupts are not supported with DT until
irqdomains learn dynamic irq assignment.
Rather than add another case of -1, updating the driver to use NO_IRQ.
Signed-off-by: Rob Herring <redacted>
Cc: Grant Likely <redacted>
---
v2:
- Add other -1 to NO_IRQ conversions
- Drop DT irq support for now
drivers/gpio/gpio-pl061.c | 31 +++++++++++++++++++++----------
include/linux/amba/pl061.h | 3 +--
2 files changed, 22 insertions(+), 12 deletions(-)
@@ -7,8 +7,7 @@ struct pl061_platform_data {unsignedgpio_base;/* number of the first IRQ.-*IftheIRQfunctionalityinnotdesiredthismustbesetto-*(unsigned)-1.+*IftheIRQfunctionalityinnotdesiredthismustbesettoNO_IRQ.*/unsignedirq_base;
Hi Rob,
On Wed, Aug 10, 2011 at 04:31:46PM -0500, Rob Herring wrote:
From: Rob Herring <redacted>
This adds devicetree binding support to the ARM pl061 driver removing the
platform_data dependency. When DT binding is used, the gpio numbering is
assigned dynamically. For now, interrupts are not supported with DT until
irqdomains learn dynamic irq assignment.
Rather than add another case of -1, updating the driver to use NO_IRQ.
Signed-off-by: Rob Herring <redacted>
Cc: Grant Likely <redacted>
---
v2:
- Add other -1 to NO_IRQ conversions
Migrating existing pl061_platform_data users to NO_IRQ would be nice as well.
But this should probably be a separate patch.
FWIW:
Acked-by: Baruch Siach <baruch@tkos.co.il>
baruch
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
From: Rob Herring <hidden> Date: 2011-08-11 16:48:07
On 08/11/2011 01:36 AM, Baruch Siach wrote:
Hi Rob,
On Wed, Aug 10, 2011 at 04:31:46PM -0500, Rob Herring wrote:
quoted
From: Rob Herring <redacted>
This adds devicetree binding support to the ARM pl061 driver removing the
platform_data dependency. When DT binding is used, the gpio numbering is
assigned dynamically. For now, interrupts are not supported with DT until
irqdomains learn dynamic irq assignment.
Rather than add another case of -1, updating the driver to use NO_IRQ.
Signed-off-by: Rob Herring <redacted>
Cc: Grant Likely <redacted>
---
v2:
- Add other -1 to NO_IRQ conversions
Migrating existing pl061_platform_data users to NO_IRQ would be nice as well.
But this should probably be a separate patch.
Actually, I expect we can kill off the platform_data once all users are
converted over to device tree.
From: Rob Herring <hidden> Date: 2011-09-22 23:08:37
Grant,
On 08/10/2011 04:31 PM, Rob Herring wrote:
From: Rob Herring <redacted>
This adds devicetree binding support to the ARM pl061 driver removing the
platform_data dependency. When DT binding is used, the gpio numbering is
assigned dynamically. For now, interrupts are not supported with DT until
irqdomains learn dynamic irq assignment.
Rather than add another case of -1, updating the driver to use NO_IRQ.
Signed-off-by: Rob Herring <redacted>
Cc: Grant Likely <redacted>
---
Ping. Any comments on this?
Rob
quoted hunk
v2:
- Add other -1 to NO_IRQ conversions
- Drop DT irq support for now
drivers/gpio/gpio-pl061.c | 31 +++++++++++++++++++++----------
include/linux/amba/pl061.h | 3 +--
2 files changed, 22 insertions(+), 12 deletions(-)
@@ -7,8 +7,7 @@ struct pl061_platform_data {unsignedgpio_base;/* number of the first IRQ.-*IftheIRQfunctionalityinnotdesiredthismustbesetto-*(unsigned)-1.+*IftheIRQfunctionalityinnotdesiredthismustbesettoNO_IRQ.*/unsignedirq_base;
From: Rob Herring <hidden> Date: 2011-10-24 15:40:02
Grant,
On 09/22/2011 06:08 PM, Rob Herring wrote:
Grant,
On 08/10/2011 04:31 PM, Rob Herring wrote:
quoted
From: Rob Herring <redacted>
This adds devicetree binding support to the ARM pl061 driver removing the
platform_data dependency. When DT binding is used, the gpio numbering is
assigned dynamically. For now, interrupts are not supported with DT until
irqdomains learn dynamic irq assignment.
Rather than add another case of -1, updating the driver to use NO_IRQ.
Signed-off-by: Rob Herring <redacted>
Cc: Grant Likely <redacted>
---
Ping. Any comments on this?
Ping. Can you apply this for 3.2.
Rob
Rob
quoted
v2:
- Add other -1 to NO_IRQ conversions
- Drop DT irq support for now
drivers/gpio/gpio-pl061.c | 31 +++++++++++++++++++++----------
include/linux/amba/pl061.h | 3 +--
2 files changed, 22 insertions(+), 12 deletions(-)
@@ -7,8 +7,7 @@ struct pl061_platform_data {unsignedgpio_base;/* number of the first IRQ.-*IftheIRQfunctionalityinnotdesiredthismustbesetto-*(unsigned)-1.+*IftheIRQfunctionalityinnotdesiredthismustbesettoNO_IRQ.*/unsignedirq_base;
From: Grant Likely <hidden> Date: 2011-10-24 22:24:08
On Wed, Aug 10, 2011 at 04:31:46PM -0500, Rob Herring wrote:
From: Rob Herring <redacted>
This adds devicetree binding support to the ARM pl061 driver removing the
platform_data dependency. When DT binding is used, the gpio numbering is
assigned dynamically. For now, interrupts are not supported with DT until
irqdomains learn dynamic irq assignment.
Rather than add another case of -1, updating the driver to use NO_IRQ.
Signed-off-by: Rob Herring <redacted>
Cc: Grant Likely <redacted>
Applied, thanks.
g.
quoted hunk
---
v2:
- Add other -1 to NO_IRQ conversions
- Drop DT irq support for now
drivers/gpio/gpio-pl061.c | 31 +++++++++++++++++++++----------
include/linux/amba/pl061.h | 3 +--
2 files changed, 22 insertions(+), 12 deletions(-)
@@ -7,8 +7,7 @@ struct pl061_platform_data {unsignedgpio_base;/* number of the first IRQ.-*IftheIRQfunctionalityinnotdesiredthismustbesetto-*(unsigned)-1.+*IftheIRQfunctionalityinnotdesiredthismustbesettoNO_IRQ.*/unsignedirq_base;