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

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

Merge "soc: qcom: pil: get crypto cell-id through device tree"

parents aff7335b 3af8f855
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -1064,7 +1064,8 @@ static int pil_tz_driver_probe(struct platform_device *pdev)
{
	struct pil_tz_data *d;
	struct resource *res;
	u32 proxy_timeout;
	struct device_node *crypto_node;
	u32 proxy_timeout, crypto_id;
	int len, rc;
	char md_node[20];

@@ -1121,7 +1122,16 @@ static int pil_tz_driver_probe(struct platform_device *pdev)
									rc);
			goto err_deregister_bus;
		}
		scm_pas_init(MSM_BUS_MASTER_CRYPTO_CORE_0);

		crypto_id = MSM_BUS_MASTER_CRYPTO_CORE_0;
		crypto_node = of_parse_phandle(pdev->dev.of_node,
						"qcom,mas-crypto", 0);
		if (!IS_ERR_OR_NULL(crypto_node)) {
			of_property_read_u32(crypto_node, "cell-id",
				&crypto_id);
		}
		of_node_put(crypto_node);
		scm_pas_init((int)crypto_id);
	}

	rc = pil_desc_init(&d->desc);