memory: tegra: Setup interrupts mask before requesting IRQ

This avoids unwanted interrupt during MC driver probe.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
Dmitry Osipenko 2018-04-09 22:28:28 +03:00 коммит произвёл Thierry Reding
Родитель bf3fbdfbec
Коммит db4a9c1935
1 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -407,14 +407,6 @@ static int tegra_mc_probe(struct platform_device *pdev)
return mc->irq;
}
err = devm_request_irq(&pdev->dev, mc->irq, tegra_mc_irq, IRQF_SHARED,
dev_name(&pdev->dev), mc);
if (err < 0) {
dev_err(&pdev->dev, "failed to request IRQ#%u: %d\n", mc->irq,
err);
return err;
}
WARN(!mc->soc->client_id_mask, "Missing client ID mask for this SoC\n");
value = MC_INT_DECERR_MTS | MC_INT_SECERR_SEC | MC_INT_DECERR_VPR |
@ -423,6 +415,14 @@ static int tegra_mc_probe(struct platform_device *pdev)
mc_writel(mc, value, MC_INTMASK);
err = devm_request_irq(&pdev->dev, mc->irq, tegra_mc_irq, IRQF_SHARED,
dev_name(&pdev->dev), mc);
if (err < 0) {
dev_err(&pdev->dev, "failed to request IRQ#%u: %d\n", mc->irq,
err);
return err;
}
return 0;
}