Commit d17efe4f authored by Lad Prabhakar's avatar Lad Prabhakar Committed by Kalle Valo

wcn36xx: Use platform_get_irq_byname() to get the interrupt

platform_get_resource_byname(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_byname().
Signed-off-by: default avatarLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20211224192626.15843-7-prabhakar.mahadev-lad.rj@bp.renesas.com
parent 76d7b996
...@@ -1446,25 +1446,20 @@ static int wcn36xx_platform_get_resources(struct wcn36xx *wcn, ...@@ -1446,25 +1446,20 @@ static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,
{ {
struct device_node *mmio_node; struct device_node *mmio_node;
struct device_node *iris_node; struct device_node *iris_node;
struct resource *res;
int index; int index;
int ret; int ret;
/* Set TX IRQ */ /* Set TX IRQ */
res = platform_get_resource_byname(pdev, IORESOURCE_IRQ, "tx"); ret = platform_get_irq_byname(pdev, "tx");
if (!res) { if (ret < 0)
wcn36xx_err("failed to get tx_irq\n"); return ret;
return -ENOENT; wcn->tx_irq = ret;
}
wcn->tx_irq = res->start;
/* Set RX IRQ */ /* Set RX IRQ */
res = platform_get_resource_byname(pdev, IORESOURCE_IRQ, "rx"); ret = platform_get_irq_byname(pdev, "rx");
if (!res) { if (ret < 0)
wcn36xx_err("failed to get rx_irq\n"); return ret;
return -ENOENT; wcn->rx_irq = ret;
}
wcn->rx_irq = res->start;
/* Acquire SMSM tx enable handle */ /* Acquire SMSM tx enable handle */
wcn->tx_enable_state = qcom_smem_state_get(&pdev->dev, wcn->tx_enable_state = qcom_smem_state_get(&pdev->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment