Hi All,
This patch series aims to drop using platform_get_resource() for IRQ types
in preparation for removal of static setup of IRQ resource from DT core
code.
Dropping usage of platform_get_resource() was agreed based on
the discussion [0].
[0] https://patchwork.kernel.org/project/linux-renesas-soc/
patch/20211209001056.29774-1-prabhakar.mahadev-lad.rj@bp.renesas.com/
Cheers,
Prabhakar
Lad Prabhakar (3):
i2c: bcm2835: Use platform_get_irq() to get the interrupt
i2c: sh_mobile: Use platform_get_irq_optional() to get the interrupt
i2c: riic: Use platform_get_irq() to get the interrupt
drivers/i2c/busses/i2c-bcm2835.c | 11 ++++------
drivers/i2c/busses/i2c-riic.c | 10 ++++-----
drivers/i2c/busses/i2c-sh_mobile.c | 34 +++++++++++++++++++++++-------
3 files changed, 35 insertions(+), 20 deletions(-)
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.
In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* Dropped IRQ0 check
---
drivers/i2c/busses/i2c-bcm2835.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.
In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
From: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: 2022-01-03 09:19:04
On Tue, Dec 21, 2021 at 05:53:20PM +0000, Lad Prabhakar wrote:
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.
In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.
In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq_optional() for DT users only.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* Dropped IRQ0 check
* Simplified code
---
drivers/i2c/busses/i2c-sh_mobile.c | 34 +++++++++++++++++++++++-------
1 file changed, 26 insertions(+), 8 deletions(-)
On Tue, Dec 21, 2021 at 7:21 PM Lad Prabhakar
[off-list ref] wrote:
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.
In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq_optional() for DT users only.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: 2021-12-22 09:50:00
On Tue, Dec 21, 2021 at 05:53:21PM +0000, Lad Prabhakar wrote:
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.
In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq_optional() for DT users only.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Tested on a Renesas R-Car Gen3 SoC (M3-W) and IIC port still works and
no false positive printouts in the kernel log:
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
From: Andy Shevchenko <hidden> Date: 2021-12-25 17:49:26
On Wed, Dec 22, 2021 at 2:41 PM Lad Prabhakar
[off-list ref] wrote:
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.
In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq_optional() for DT users only.
...
+ if (np) {
Same comments as per your other patches, i.e.
Why is this check here?
+ int irq;
+
+ while ((irq = platform_get_irq_optional(dev, k)) != -ENXIO) {
-----Original Message-----
From: Andy Shevchenko <redacted>
Sent: 25 December 2021 17:49
To: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>; Ray Jui <rjui@broadcom.com>; Scott Branden
[off-list ref]; bcm-kernel-feedback-list [off-list ref]; Nicolas
Saenz Julienne [off-list ref]; Chris Brandt [off-list ref]; Wolfram Sang
[off-list ref]; linux-i2c [off-list ref]; linux-rpi-kernel <linux-
rpi-kernel@lists.infradead.org>; linux-arm Mailing List [off-list ref]; Linux-
Renesas [off-list ref]; Linux Kernel Mailing List [off-list ref];
Prabhakarprabhakar.csengg@gmail.com
Subject: Re: [PATCH v2 2/3] i2c: sh_mobile: Use platform_get_irq_optional() to get the interrupt
On Wed, Dec 22, 2021 at 2:41 PM Lad Prabhakar [off-list ref] wrote:
quoted
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue when
using hierarchical interrupt domains using "interrupts" property in
the node as this bypasses the hierarchical setup and messes up the irq
chaining.
In preparation for removal of static setup of IRQ resource from DT
core code use platform_get_irq_optional() for DT users only.
...
quoted
+ if (np) {
Same comments as per your other patches, i.e.
Why is this check here?
Because the interrupt resource has range of interrupts in one IRQ resource [0]. Let me know if there is any other alternative way to avoid such case.
quoted
+ int irq;
+
+ while ((irq = platform_get_irq_optional(dev, k)) !=
+ -ENXIO) {
On Sun, Dec 26, 2021 at 8:41 AM Andy Shevchenko
[off-list ref] wrote:
On Sun, Dec 26, 2021 at 1:45 AM Prabhakar Mahadev Lad
[off-list ref] wrote:
quoted
quoted
On Wed, Dec 22, 2021 at 2:41 PM Lad Prabhakar [off-list ref] wrote:
...
quoted
quoted
quoted
+ if (np) {
Same comments as per your other patches, i.e.
Why is this check here?
Because the interrupt resource has range of interrupts in one IRQ resource [0]. Let me know if there is any other alternative way to avoid such case.
Shouldn't be fixed in platform_get_irq_optional() to return IRQ by
index for all cases?
Sorry, I don't get you here. Wasn't your earlier comment for np check?
Cheers,
Prabhakar
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: 2022-01-03 09:19:09
On Tue, Dec 21, 2021 at 05:53:21PM +0000, Lad Prabhakar wrote:
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.
In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq_optional() for DT users only.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.
In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2
* Dropped IRQ0 check
---
drivers/i2c/busses/i2c-riic.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
From: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: 2021-12-22 09:52:53
On Tue, Dec 21, 2021 at 05:53:22PM +0000, Lad Prabhakar wrote:
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.
In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
On Tue, Dec 21, 2021 at 7:25 PM Lad Prabhakar
[off-list ref] wrote:
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.
In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: 2022-01-03 09:20:31
On Tue, Dec 21, 2021 at 05:53:22PM +0000, Lad Prabhakar wrote:
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.
In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>