mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
nvadsp: Use platform_get_irq to get IRQ num
Use platform_get_irq() instead of platform_get_resource() to read IRQ num from DT, as platform_get_resource() is not recommended to read IRQ early in the boot. Bug 4164138 Bug 3682950 Change-Id: I117e608e6ae798aa2932a3a41f7942a741d3ff9c Signed-off-by: Viswanath L <viswanathl@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2983098 Reviewed-by: Sharad Gupta <sharadg@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
21a60d1ca1
commit
ffdc1ff5c6
@@ -347,10 +347,9 @@ static int __init nvadsp_probe(struct platform_device *pdev)
|
||||
void __iomem *base = NULL;
|
||||
uint32_t aram_addr;
|
||||
uint32_t aram_size;
|
||||
int dram_iter;
|
||||
int irq_iter;
|
||||
int dram_iter, irq_iter, iter;
|
||||
int irq_num;
|
||||
int ret = 0;
|
||||
int iter;
|
||||
|
||||
dev_info(dev, "in probe()...\n");
|
||||
|
||||
@@ -441,14 +440,14 @@ static int __init nvadsp_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
for (irq_iter = 0; irq_iter < NVADSP_VIRQ_MAX; irq_iter++) {
|
||||
res = platform_get_resource(pdev, IORESOURCE_IRQ, irq_iter);
|
||||
if (!res) {
|
||||
irq_num = platform_get_irq(pdev, irq_iter);
|
||||
if (irq_num < 0) {
|
||||
dev_err(dev, "Failed to get irq number for index %d\n",
|
||||
irq_iter);
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
drv_data->agic_irqs[irq_iter] = res->start;
|
||||
drv_data->agic_irqs[irq_iter] = irq_num;
|
||||
}
|
||||
|
||||
nvadsp_drv_data = drv_data;
|
||||
|
||||
Reference in New Issue
Block a user