diff options
author | Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> | 2021-12-24 14:29:16 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-12-30 13:26:49 +0100 |
commit | e3b27e2f56a5337d2ecdbe3feddc7c75e2205d59 (patch) | |
tree | ae2b4fea76da6258ae2ae5dadce2dd97722546ef /drivers/tty/serial | |
parent | fc67c913298c97bf5c1aac419ff260b7845613f5 (diff) | |
download | linux-e3b27e2f56a5337d2ecdbe3feddc7c75e2205d59.tar.gz linux-e3b27e2f56a5337d2ecdbe3feddc7c75e2205d59.tar.bz2 linux-e3b27e2f56a5337d2ecdbe3feddc7c75e2205d59.zip |
serial: pmac_zilog: Use platform_get_irq() to get the interrupt
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>
Link: https://lore.kernel.org/r/20211224142917.6966-11-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/pmac_zilog.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c index 12ce150b0ad4..5359236b32d6 100644 --- a/drivers/tty/serial/pmac_zilog.c +++ b/drivers/tty/serial/pmac_zilog.c @@ -1702,17 +1702,21 @@ extern struct platform_device scc_a_pdev, scc_b_pdev; static int __init pmz_init_port(struct uart_pmac_port *uap) { - struct resource *r_ports, *r_irq; + struct resource *r_ports; + int irq; r_ports = platform_get_resource(uap->pdev, IORESOURCE_MEM, 0); - r_irq = platform_get_resource(uap->pdev, IORESOURCE_IRQ, 0); - if (!r_ports || !r_irq) + if (!r_ports) return -ENODEV; + irq = platform_get_irq(uap->pdev, 0); + if (irq < 0) + return irq; + uap->port.mapbase = r_ports->start; uap->port.membase = (unsigned char __iomem *) r_ports->start; uap->port.iotype = UPIO_MEM; - uap->port.irq = r_irq->start; + uap->port.irq = irq; uap->port.uartclk = ZS_CLOCK; uap->port.fifosize = 1; uap->port.ops = &pmz_pops; |