1
0
Fork 0

MLK-15995 imx: mlb: only use irq_ahb1 for imx6

Due to IP integration difference, there are 2 ahb irqs
for imx6 and only 1 ahb irq for imx8. This patch makes
mlb driver compatible with irq difference.

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
5.4-rM2-2.2.x-imx-squashed
Gao Pan 2017-07-17 16:57:48 +08:00 committed by Dong Aisheng
parent 2c45f980f3
commit a7aaf46bb9
1 changed files with 9 additions and 9 deletions

View File

@ -1561,12 +1561,14 @@ static void mxc_mlb150_irq_enable(struct mlb_data *drvdata, u8 enable)
{
if (enable) {
enable_irq(drvdata->irq_ahb0);
enable_irq(drvdata->irq_ahb1);
enable_irq(drvdata->irq_mlb);
if (drvdata->irq_ahb1 > 0)
enable_irq(drvdata->irq_ahb1);
} else {
disable_irq(drvdata->irq_ahb0);
disable_irq(drvdata->irq_ahb1);
disable_irq(drvdata->irq_mlb);
if (drvdata->irq_ahb1 > 0)
disable_irq(drvdata->irq_ahb1);
}
}
@ -2610,15 +2612,13 @@ static int mxc_mlb150_probe(struct platform_device *pdev)
/* ahb1 irq */
drvdata->irq_ahb1 = platform_get_irq(pdev, 2);
if (drvdata->irq_ahb1 < 0) {
dev_err(&pdev->dev, "No ahb1 irq line provided\n");
goto err_dev;
}
dev_dbg(&pdev->dev, "ahb1_irq: %d\n", drvdata->irq_ahb1);
if (devm_request_irq(&pdev->dev, drvdata->irq_ahb1, mlb_ahb_isr,
if (drvdata->irq_ahb1 > 0) {
if (devm_request_irq(&pdev->dev, drvdata->irq_ahb1, mlb_ahb_isr,
0, "mlb_ahb1", NULL)) {
dev_err(&pdev->dev, "can't claim irq %d\n", drvdata->irq_ahb1);
goto err_dev;
dev_err(&pdev->dev, "can't claim irq %d\n", drvdata->irq_ahb1);
goto err_dev;
}
}
/* mlb irq */