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

Commit ed681044 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "soc: qcom: dcc: update xpu probe logic to fix failure"

parents 4dc869b1 f5da0e24
Loading
Loading
Loading
Loading
+14 −12
Original line number Diff line number Diff line
@@ -1251,19 +1251,21 @@ static int dcc_probe(struct platform_device *pdev)

	INIT_LIST_HEAD(&drvdata->config_head);
	drvdata->nr_config = 0;

	if (scm_is_call_available(SCM_SVC_MP, SCM_SVC_DISABLE_XPU) >  0)
		drvdata->xpu_scm_avail = 1;
	else
	drvdata->xpu_scm_avail = 0;

	if (drvdata->xpu_scm_avail) {
	res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
					   "dcc-xpu-base");
		if (!res)
			return -ENODEV;

	if (res) {
		if (scm_is_call_available(SCM_SVC_MP,
					  SCM_SVC_DISABLE_XPU) > 0) {
			drvdata->xpu_scm_avail = 1;
			drvdata->xpu_addr = res->start;
		} else {
			dev_err(dev, "scm call is not available\n");
			return -EINVAL;
		}
	} else {
		dev_info(dev, "DCC XPU is not specified\n");
	}

	ret = dcc_xpu_unlock(drvdata);