From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> To: linux-serial@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jiri Slaby <jirislaby@kernel.org>, Florian Fainelli <f.fainelli@gmail.com>, bcm-kernel-feedback-list@broadcom.com Cc: Rob Herring <robh+dt@kernel.org>, linux-kernel@vger.kernel.org, Prabhakar <prabhakar.csengg@gmail.com>, Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>, linux-arm-kernel@lists.infradead.org Subject: [PATCH 09/10] serial: bcm63xx: Use platform_get_irq() to get the interrupt Date: Fri, 24 Dec 2021 14:29:15 +0000 [thread overview] Message-ID: <20211224142917.6966-10-prabhakar.mahadev-lad.rj@bp.renesas.com> (raw) In-Reply-To: <20211224142917.6966-1-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> --- drivers/tty/serial/bcm63xx_uart.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c index 5fb0e84f7fd1..6471a54b616b 100644 --- a/drivers/tty/serial/bcm63xx_uart.c +++ b/drivers/tty/serial/bcm63xx_uart.c @@ -804,7 +804,7 @@ static struct uart_driver bcm_uart_driver = { */ static int bcm_uart_probe(struct platform_device *pdev) { - struct resource *res_mem, *res_irq; + struct resource *res_mem; struct uart_port *port; struct clk *clk; int ret; @@ -833,9 +833,10 @@ static int bcm_uart_probe(struct platform_device *pdev) if (IS_ERR(port->membase)) return PTR_ERR(port->membase); - res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!res_irq) - return -ENODEV; + ret = platform_get_irq(pdev, 0); + if (ret < 0) + return ret; + port->irq = ret; clk = clk_get(&pdev->dev, "refclk"); if (IS_ERR(clk) && pdev->dev.of_node) @@ -845,7 +846,6 @@ static int bcm_uart_probe(struct platform_device *pdev) return -ENODEV; port->iotype = UPIO_MEM; - port->irq = res_irq->start; port->ops = &bcm_uart_ops; port->flags = UPF_BOOT_AUTOCONF; port->dev = &pdev->dev; -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> To: linux-serial@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jiri Slaby <jirislaby@kernel.org>, Florian Fainelli <f.fainelli@gmail.com>, bcm-kernel-feedback-list@broadcom.com Cc: Rob Herring <robh+dt@kernel.org>, linux-kernel@vger.kernel.org, Prabhakar <prabhakar.csengg@gmail.com>, Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>, linux-arm-kernel@lists.infradead.org Subject: [PATCH 09/10] serial: bcm63xx: Use platform_get_irq() to get the interrupt Date: Fri, 24 Dec 2021 14:29:15 +0000 [thread overview] Message-ID: <20211224142917.6966-10-prabhakar.mahadev-lad.rj@bp.renesas.com> (raw) In-Reply-To: <20211224142917.6966-1-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> --- drivers/tty/serial/bcm63xx_uart.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c index 5fb0e84f7fd1..6471a54b616b 100644 --- a/drivers/tty/serial/bcm63xx_uart.c +++ b/drivers/tty/serial/bcm63xx_uart.c @@ -804,7 +804,7 @@ static struct uart_driver bcm_uart_driver = { */ static int bcm_uart_probe(struct platform_device *pdev) { - struct resource *res_mem, *res_irq; + struct resource *res_mem; struct uart_port *port; struct clk *clk; int ret; @@ -833,9 +833,10 @@ static int bcm_uart_probe(struct platform_device *pdev) if (IS_ERR(port->membase)) return PTR_ERR(port->membase); - res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!res_irq) - return -ENODEV; + ret = platform_get_irq(pdev, 0); + if (ret < 0) + return ret; + port->irq = ret; clk = clk_get(&pdev->dev, "refclk"); if (IS_ERR(clk) && pdev->dev.of_node) @@ -845,7 +846,6 @@ static int bcm_uart_probe(struct platform_device *pdev) return -ENODEV; port->iotype = UPIO_MEM; - port->irq = res_irq->start; port->ops = &bcm_uart_ops; port->flags = UPF_BOOT_AUTOCONF; port->dev = &pdev->dev; -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-12-24 14:30 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-24 14:29 [PATCH 00/10] serial: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar 2021-12-24 14:29 ` [PATCH 01/10] serial: altera: Use platform_get_irq_optional() to get the interrupt Lad Prabhakar 2021-12-24 14:29 ` [PATCH 02/10] serial: 8250_bcm7271: Use platform_get_irq() " Lad Prabhakar 2021-12-24 22:10 ` Florian Fainelli 2021-12-24 14:29 ` [PATCH 03/10] serial: 8250_bcm7271: Propagate error codes from brcmuart_probe() Lad Prabhakar 2021-12-24 22:11 ` Florian Fainelli [not found] ` <CAHp75VdC+JifneoYRS3yoXoAhio+TXQzca3pku7ug=A_ewWrsg@mail.gmail.com> 2021-12-25 12:20 ` Lad, Prabhakar 2021-12-30 12:27 ` Greg Kroah-Hartman 2021-12-24 14:29 ` [PATCH 04/10] serial: meson: Use platform_get_irq() to get the interrupt Lad Prabhakar 2021-12-24 14:29 ` Lad Prabhakar 2021-12-24 14:29 ` Lad Prabhakar 2021-12-24 14:29 ` [PATCH 05/10] serial: pxa: " Lad Prabhakar 2021-12-24 14:29 ` [PATCH 06/10] serial: altera_jtaguart: Use platform_get_irq_optional() " Lad Prabhakar 2021-12-24 14:29 ` [PATCH 07/10] serial: vt8500: Use platform_get_irq() " Lad Prabhakar 2021-12-24 14:29 ` Lad Prabhakar 2021-12-24 14:29 ` [PATCH 08/10] serial: ar933x: " Lad Prabhakar 2021-12-24 14:29 ` Lad Prabhakar [this message] 2021-12-24 14:29 ` [PATCH 09/10] serial: bcm63xx: " Lad Prabhakar 2021-12-24 17:05 ` Florian Fainelli 2021-12-24 17:05 ` Florian Fainelli 2021-12-24 14:29 ` [PATCH 10/10] serial: pmac_zilog: " Lad Prabhakar 2021-12-24 14:29 ` Lad Prabhakar
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=20211224142917.6966-10-prabhakar.mahadev-lad.rj@bp.renesas.com \ --to=prabhakar.mahadev-lad.rj@bp.renesas.com \ --cc=bcm-kernel-feedback-list@broadcom.com \ --cc=f.fainelli@gmail.com \ --cc=gregkh@linuxfoundation.org \ --cc=jirislaby@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-serial@vger.kernel.org \ --cc=prabhakar.csengg@gmail.com \ --cc=robh+dt@kernel.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.