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

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

Merge "ARM: dts: msm: Update mdsprpc apps CMA region in 8953"

parents d8fc723e f5a376e5
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
Qualcomm Technologies, Inc. FastRPC MDSP CMA Heap

The MSM MDSPRPC memory device allocates CMA memory, for sharing memory
of FastRPC buffers to remote processor(MDSP).

Required properties:
-compatible: Must be "qcom,msm-mdsprpc-mem-region"
-memory-region: A phandle that points to a memory heap where the
heap memory is allocated

Example:
	qcom,mdsprpc-mem {
		compatible = "qcom,msm-mdsprpc-mem-region";
		memory-region = <&mdsp_mem>;
	};
+7 −1
Original line number Diff line number Diff line
/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -37,5 +37,11 @@
			memory-region = <&qseecom_mem>;
			qcom,ion-heap-type = "DMA";
		};

		qcom,ion-heap@22 { /* MODEM HEAP */
			reg = <22>;
			memory-region = <&mdsp_mem>;
			qcom,ion-heap-type = "DMA";
		};
	};
};
+11 −0
Original line number Diff line number Diff line
@@ -83,6 +83,12 @@
			size = <0 0x400000>;
		};

		mdsp_mem: mdsp_region@0 {
			compatible = "shared-dma-pool";
			reusable;
			size = <0 0x6400000>;
		};

		dfps_data_mem: dfps_data_mem@90000000 {
		       reg = <0 0x90000000 0 0x1000>;
		       label = "dfps_data_mem";
@@ -1656,6 +1662,11 @@
		memory-region = <&adsp_mem>;
	};

	qcom,mdsprpc-mem {
		compatible = "qcom,msm-mdsprpc-mem-region";
		memory-region = <&mdsp_mem>;
	};

	qcom,adsprpc_domains {
		compatible = "qcom,msm-fastrpc-legacy-compute-cb";
		qcom,msm_fastrpc_compute_cb {
+19 −2
Original line number Diff line number Diff line
@@ -212,6 +212,7 @@ struct fastrpc_apps {
	spinlock_t hlock;
	struct ion_client *client;
	struct device *dev;
	struct device *modem_cma_dev;
	bool glink;
};

@@ -1723,17 +1724,26 @@ static int fastrpc_session_alloc(struct fastrpc_channel_ctx *chan, int *session)
	struct fastrpc_apps *me = &gfa;
	int idx = 0, err = 0;

	if (chan->sesscount) {
	switch (chan->channel) {
	case SMD_APPS_QDSP:
		idx = ffz(chan->bitmap);
		VERIFY(err, idx < chan->sesscount);
		if (err)
			goto bail;
		set_bit(idx, &chan->bitmap);
	} else {
		break;
	case SMD_APPS_DSPS:
		VERIFY(err, me->dev != NULL);
		if (err)
			goto bail;
		chan->session[0].dev = me->dev;
		break;
	case SMD_APPS_MODEM:
		VERIFY(err, me->dev != NULL);
		if (err)
			goto bail;
		chan->session[0].dev = me->modem_cma_dev;
		break;
	}

	chan->session[idx].smmu.faults = 0;
@@ -2149,6 +2159,7 @@ static struct of_device_id fastrpc_match_table[] = {
	{ .compatible = "qcom,msm-fastrpc-compute-cb", },
	{ .compatible = "qcom,msm-fastrpc-legacy-compute-cb", },
	{ .compatible = "qcom,msm-adsprpc-mem-region", },
	{ .compatible = "qcom,msm-mdsprpc-mem-region", },
	{}
};

@@ -2321,6 +2332,12 @@ static int fastrpc_probe(struct platform_device *pdev)
		return 0;
	}

	if (of_device_is_compatible(dev->of_node,
					"qcom,msm-mdsprpc-mem-region")) {
		me->modem_cma_dev = dev;
		return 0;
	}

	me->glink = of_property_read_bool(dev->of_node, "qcom,fastrpc-glink");
	pr_info("adsprpc: channel link type: %d\n", me->glink);