aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Dias <joaodias@google.com>2018-08-09 15:44:28 -0700
committerJohn Dias <joaodias@google.com>2018-08-09 15:44:28 -0700
commita3ced9894032cd3de6f0f0fabb0144fb355e46d0 (patch)
tree42de06070c6fa4e74806b205b31aa1c600d34a6e
parent161b7a2b755fc3303179f35f079843c3a38ab45e (diff)
Revert "msm: ADSPRPC: Assign memory to VMID_SSC_Q6"android-9.0.0_r0.14android-9.0.0_r0.13android-9.0.0_r0.10
This reverts commit 6568e2639e3481020fdfb4ee159b83d58ac84f87. Bug: 112247868 Signed-off-by: John Dias <joaodias@google.com>
-rw-r--r--Documentation/devicetree/bindings/qdsp/msm-mdsprpc-mem.txt24
-rw-r--r--arch/arm/boot/dts/qcom/msm8996.dtsi7
-rw-r--r--drivers/char/adsprpc.c47
3 files changed, 2 insertions, 76 deletions
diff --git a/Documentation/devicetree/bindings/qdsp/msm-mdsprpc-mem.txt b/Documentation/devicetree/bindings/qdsp/msm-mdsprpc-mem.txt
deleted file mode 100644
index 2a5fc0ff17de..000000000000
--- a/Documentation/devicetree/bindings/qdsp/msm-mdsprpc-mem.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-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>;
- };
-
-Ion Heap:
-
-Ion heap allows for sharing of buffers between different processors
-and between user space and kernel space.
-(see Documentation/devicetree/bindings/arm/msm/msm_ion.txt).
-
-Required properties for Ion heap:
-- compatible : "qcom,msm-ion"
diff --git a/arch/arm/boot/dts/qcom/msm8996.dtsi b/arch/arm/boot/dts/qcom/msm8996.dtsi
index cd4401c638d4..acb7aad8eb84 100644
--- a/arch/arm/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm/boot/dts/qcom/msm8996.dtsi
@@ -294,7 +294,7 @@
compatible = "shared-dma-pool";
alloc-ranges = <0 0x00000000 0 0xffffffff>;
reusable;
- alignment = <0 0x400000>;
+ alignment = <0 0x100000>;
size = <0 0x400000>;
};
@@ -3588,11 +3588,6 @@
memory-region = <&adsp_mem>;
};
- qcom,msm-mdsprpc-mem {
- compatible = "qcom,msm-mdsprpc-mem-region";
- memory-region = <&adsp_mem>;
- };
-
qcom,msm_fastrpc {
compatible = "qcom,msm-fastrpc-adsp";
diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c
index 7c8a8918b511..9cb1a60b53a0 100644
--- a/drivers/char/adsprpc.c
+++ b/drivers/char/adsprpc.c
@@ -58,7 +58,6 @@
#define ADSP_MMAP_HEAP_ADDR 4
#define FASTRPC_ENOSUCH 39
#define VMID_SSC_Q6 5
-#define VMID_ADSP_Q6 6
#define RPC_TIMEOUT (5 * HZ)
#define BALIGN 128
@@ -218,7 +217,6 @@ struct fastrpc_apps {
spinlock_t hlock;
struct ion_client *client;
struct device *dev;
- struct device *modem_cma_dev;
bool glink;
spinlock_t ctxlock;
struct smq_invoke_ctx *ctxtable[FASTRPC_CTX_MAX];
@@ -272,6 +270,7 @@ static struct fastrpc_channel_ctx gcinfo[NUM_CHANNELS] = {
.subsys = "dsps",
.channel = SMD_APPS_DSPS,
.edge = "dsps",
+ .vmid = VMID_SSC_Q6,
},
};
@@ -2268,7 +2267,6 @@ 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", },
{}
};
@@ -2421,11 +2419,6 @@ static int fastrpc_probe(struct platform_device *pdev)
int err = 0;
struct fastrpc_apps *me = &gfa;
struct device *dev = &pdev->dev;
- struct smq_phy_page range;
- struct device_node *ion_node, *node;
- struct platform_device *ion_pdev;
- struct cma *cma;
- uint32_t val;
if (of_device_is_compatible(dev->of_node,
"qcom,msm-fastrpc-compute-cb"))
@@ -2447,44 +2440,6 @@ 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;
- range.addr = 0;
- ion_node = of_find_compatible_node(NULL, NULL, "qcom,msm-ion");
- if (ion_node) {
- for_each_available_child_of_node(ion_node, node) {
- if (of_property_read_u32(node, "reg", &val))
- continue;
- if (val != ION_ADSP_HEAP_ID)
- continue;
- ion_pdev = of_find_device_by_node(node);
- if (!ion_pdev)
- break;
- cma = dev_get_cma_area(&ion_pdev->dev);
- if (cma) {
- range.addr = cma_get_base(cma);
- range.size = (size_t)cma_get_size(cma);
- }
- break;
- }
- }
- if (range.addr) {
- int srcVM[1] = {VMID_HLOS};
- int destVM[3] = {VMID_HLOS, VMID_SSC_Q6,
- VMID_ADSP_Q6};
- int destVMperm[3] = {PERM_READ | PERM_WRITE | PERM_EXEC,
- PERM_READ | PERM_WRITE | PERM_EXEC,
- PERM_READ | PERM_WRITE | PERM_EXEC,
- };
- VERIFY(err, !hyp_assign_phys(range.addr, range.size,
- srcVM, 1, destVM, destVMperm, 3));
- if (err)
- goto bail;
- }
- return 0;
- }
-
me->glink = of_property_read_bool(dev->of_node, "qcom,fastrpc-glink");
pr_info("adsprpc: channel link type: %d\n", me->glink);