Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1d6fab8 authored by Rishabh Bhatnagar's avatar Rishabh Bhatnagar Committed by Gerrit - the friendly Code Review server
Browse files

drivers: edac: Avoid configuring interrupt register in polling mode



Interrupt enable register configuration is only needed for
interrupt mode, So avoid interrupt configuration
in the polling mode.

Change-Id: I0cb9f50573deb580254aebceeee3883d98f6ff85
Signed-off-by: default avatarRishabh Bhatnagar <rishabhb@codeaurora.org>
parent 1265dc5a
Loading
Loading
Loading
Loading
+11 −11
Original line number Original line Diff line number Diff line
@@ -362,10 +362,6 @@ static int qcom_llcc_edac_probe(struct platform_device *pdev)
	int ecc_irq;
	int ecc_irq;
	int rc;
	int rc;


	rc = qcom_llcc_core_setup(llcc_driv_data->bcast_regmap);
	if (rc)
		return rc;

	/* Allocate edac control info */
	/* Allocate edac control info */
	edev_ctl = edac_device_alloc_ctl_info(0, "qcom-llcc", 1, "bank",
	edev_ctl = edac_device_alloc_ctl_info(0, "qcom-llcc", 1, "bank",
					      llcc_driv_data->num_banks, 1,
					      llcc_driv_data->num_banks, 1,
@@ -390,7 +386,17 @@ static int qcom_llcc_edac_probe(struct platform_device *pdev)
		edev_ctl->poll_msec = poll_msec;
		edev_ctl->poll_msec = poll_msec;
		edev_ctl->edac_check = qcom_llcc_poll_cache_errors;
		edev_ctl->edac_check = qcom_llcc_poll_cache_errors;
		edev_ctl->defer_work = 1;
		edev_ctl->defer_work = 1;
	} else {
	}

	rc = edac_device_add_device(edev_ctl);
	if (rc)
		goto out_mem;

	if (ecc_irq >= 0) {
		rc = qcom_llcc_core_setup(llcc_driv_data->bcast_regmap);
		if (rc)
			goto out_dev;

		rc = devm_request_irq(dev, ecc_irq, llcc_ecc_irq_handler,
		rc = devm_request_irq(dev, ecc_irq, llcc_ecc_irq_handler,
			      IRQF_SHARED | IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
			      IRQF_SHARED | IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
			      "llcc_ecc", edev_ctl);
			      "llcc_ecc", edev_ctl);
@@ -398,19 +404,13 @@ static int qcom_llcc_edac_probe(struct platform_device *pdev)
			goto out_dev;
			goto out_dev;
	}
	}


	rc = edac_device_add_device(edev_ctl);
	if (rc)
		goto out_mem;

	platform_set_drvdata(pdev, edev_ctl);
	platform_set_drvdata(pdev, edev_ctl);

	return rc;
	return rc;


out_dev:
out_dev:
	edac_device_del_device(edev_ctl->dev);
	edac_device_del_device(edev_ctl->dev);
out_mem:
out_mem:
	edac_device_free_ctl_info(edev_ctl);
	edac_device_free_ctl_info(edev_ctl);

	return rc;
	return rc;
}
}


+6 −8
Original line number Original line Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
// SPDX-License-Identifier: GPL-2.0
/*
/*
 * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 */
 */


#include <linux/bitmap.h>
#include <linux/bitmap.h>
@@ -384,13 +384,11 @@ int qcom_llcc_probe(struct platform_device *pdev,
		return ret;
		return ret;


	drv_data->ecc_irq = platform_get_irq(pdev, 0);
	drv_data->ecc_irq = platform_get_irq(pdev, 0);
	if (drv_data->ecc_irq >= 0) {
	llcc_edac = platform_device_register_data(&pdev->dev,
	llcc_edac = platform_device_register_data(&pdev->dev,
					"qcom_llcc_edac", -1, drv_data,
					"qcom_llcc_edac", -1, drv_data,
					sizeof(*drv_data));
					sizeof(*drv_data));
	if (IS_ERR(llcc_edac))
	if (IS_ERR(llcc_edac))
		dev_err(dev, "Failed to register llcc edac driver\n");
		dev_err(dev, "Failed to register llcc edac driver\n");
	}


	return ret;
	return ret;
}
}