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

Commit 13d9d336 authored by Channagoud Kadabi's avatar Channagoud Kadabi
Browse files

drivers: edac: Make ecc polling configurable



ECC can work both in polling and interrupt mode. Add config option to
enable polling mode.

Change-Id: I99668a143ecbd70a3a4f713f89268df64bfca2da
Signed-off-by: default avatarChannagoud Kadabi <ckadabi@codeaurora.org>
parent fa403c81
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -514,6 +514,17 @@ config EDAC_QCOM_LLCC
	  For debugging issues having to do with stability and overall system
	  health, you should probably say 'Y' here.

config EDAC_LLCC_POLL
	depends on EDAC_QCOM_LLCC
	bool "Poll on LLCC ECC registers - LLCC"
	help
	   This option chooses whether or not you want to poll on the LLCC
	   ECC registers. When this is enabled, the polling rate can be set as
	   a module parameter. By default, it will call the polling function
	   every second.
	   This option should only be used if the associated interrupt lines
	   are not enabled.

config EDAC_QCOM_LLCC_PANIC_ON_CE
	depends on EDAC_QCOM_LLCC
	bool "panic on correctable errors - qcom llcc"
+7 −1
Original line number Diff line number Diff line
@@ -78,10 +78,12 @@
#define DRP_TRP_INT_CLEAR	0x3
#define DRP_TRP_CNT_CLEAR	0x3

#ifdef CONFIG_EDAC_LLCC_POLL
static int poll_msec = 5000;
module_param(poll_msec, int, 0444);
#endif

static int interrupt_mode;
static int interrupt_mode = 1;
module_param(interrupt_mode, int, 0444);
MODULE_PARM_DESC(interrupt_mode,
		 "Controls whether to use interrupt or poll mode");
@@ -331,10 +333,12 @@ static void qcom_llcc_check_cache_errors
	}
}

#ifdef CONFIG_EDAC_LLCC_POLL
static void qcom_llcc_poll_cache_errors(struct edac_device_ctl_info *edev_ctl)
{
	qcom_llcc_check_cache_errors(edev_ctl);
}
#endif

static irqreturn_t llcc_ecc_irq_handler
			(int irq, void *edev_ctl)
@@ -360,9 +364,11 @@ static int qcom_llcc_erp_probe(struct platform_device *pdev)
	edev_ctl->mod_name = dev_name(dev);
	edev_ctl->dev_name = dev_name(dev);
	edev_ctl->ctl_name = "llcc";
#ifdef CONFIG_EDAC_LLCC_POLL
	edev_ctl->poll_msec = poll_msec;
	edev_ctl->edac_check = qcom_llcc_poll_cache_errors;
	edev_ctl->defer_work = 1;
#endif
	edev_ctl->panic_on_ce = LLCC_ERP_PANIC_ON_CE;
	edev_ctl->panic_on_ue = LLCC_ERP_PANIC_ON_UE;