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

Commit a88f6d99 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "dcc_v2: Add dcc region to minidump table"

parents 07193ff8 4a633c41
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
#include <linux/uaccess.h>
#include <soc/qcom/memory_dump.h>
#include <soc/qcom/scm.h>
#include <soc/qcom/minidump.h>
#include <dt-bindings/soc/qcom,dcc_v2.h>

#define TIMEOUT_US		(100)
@@ -1793,6 +1794,7 @@ static int dcc_probe(struct platform_device *pdev)
	struct device *dev = &pdev->dev;
	struct dcc_drvdata *drvdata;
	struct resource *res;
	struct md_region md_entry;

	drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
	if (!drvdata)
@@ -1885,6 +1887,14 @@ static int dcc_probe(struct platform_device *pdev)

	dcc_configure_list(drvdata, pdev->dev.of_node);

	/* Add dcc info to minidump table */
	strlcpy(md_entry.name, "KDCCDATA", sizeof(md_entry.name));
	md_entry.virt_addr = (uintptr_t)drvdata->ram_base;
	md_entry.phys_addr = res->start;
	md_entry.size = drvdata->ram_size;
	if (msm_minidump_add_region(&md_entry))
		dev_err(drvdata->dev, "Failed to add DCC data in Minidump\n");

	return 0;
err:
	return ret;