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

Commit 88369da4 authored by Stepan Moskovchenko's avatar Stepan Moskovchenko Committed by Stephen Boyd
Browse files

msm: cache_erp: Add device tree support



Add device tree bindings and driver support for the cache
error reporting devices on 8974. Remove leftover
opportunistic debug info from the L1 error handler, since
we can no longer get away with this on all targets.

Change-Id: Iac88915a6b40a40ec3157027048f4daf6369dc42
Signed-off-by: default avatarStepan Moskovchenko <stepanm@codeaurora.org>
parent 2e035f46
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
* Qualcomm Krait L1 / L2 cache error reporting driver

Required properties:
- compatible: Should be "qcom,cache_erp"
- interrupts: Should contain the L1/CPU error interrupt number and
  the L2 cache interrupt number
- interrupt-names: Should contain the interrupt names "l1_irq" and
  "l2_irq"

Example:
	qcom,cache_erp {
		compatible = "qcom,cache_erp";
		interrupts = <1 9 0>, <0 2 0>;
		interrupt-names = "l1_irq", "l2_irq";
	};
+6 −11
Original line number Diff line number Diff line
@@ -253,22 +253,11 @@ static irqreturn_t msm_l1_erp_irq(int irq, void *dev_id)
	int print_regs = cesr & CESR_PRINT_MASK;
	int log_event = cesr & CESR_LOG_EVENT_MASK;

	void *const saw_bases[] = {
		MSM_SAW0_BASE,
		MSM_SAW1_BASE,
		MSM_SAW2_BASE,
		MSM_SAW3_BASE,
	};

	if (print_regs) {
		pr_alert("L1 / TLB Error detected on CPU %d!\n", cpu);
		pr_alert("\tCESR      = 0x%08x\n", cesr);
		pr_alert("\tCPU speed = %lu\n", acpuclk_get_rate(cpu));
		pr_alert("\tMIDR      = 0x%08x\n", read_cpuid_id());
		pr_alert("\tPTE fuses = 0x%08x\n",
					readl_relaxed(MSM_QFPROM_BASE + 0xC0));
		pr_alert("\tPMIC_VREG = 0x%08x\n",
					readl_relaxed(saw_bases[cpu] + 0x14));
	}

	if (cesr & CESR_DCTPE) {
@@ -550,12 +539,18 @@ static int msm_cache_erp_remove(struct platform_device *pdev)
	return 0;
}

static struct of_device_id cache_erp_match_table[] = {
	{	.compatible = "qcom,cache_erp",	},
	{}
};

static struct platform_driver msm_cache_erp_driver = {
	.probe = msm_cache_erp_probe,
	.remove = msm_cache_erp_remove,
	.driver = {
		.name = MODULE_NAME,
		.owner = THIS_MODULE,
		.of_match_table = cache_erp_match_table,
	},
};