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

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

Merge "qseecom: set 64bit dma mask" into msm-4.14

parents 17dd1721 56a7d920
Loading
Loading
Loading
Loading
+21 −9
Original line number Diff line number Diff line
@@ -3565,12 +3565,14 @@ static int __qseecom_update_cmd_buf(void *msg, bool cleanup,
			}
		}
		/* Deallocate the kbuf */
		if (!IS_ERR(sg_ptr))
		qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf);
		sg_ptr = NULL;
		dmabuf = NULL;
		attach = NULL;
	}
	return ret;
err:
	if (!IS_ERR(sg_ptr))
	if (!IS_ERR_OR_NULL(sg_ptr))
		qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf);
	return -ENOMEM;
}
@@ -3794,8 +3796,10 @@ static int __qseecom_update_cmd_buf_64(void *msg, bool cleanup,
			}
		}
		/* unmap the dmabuf */
		if (!IS_ERR(sg_ptr))
		qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf);
		sg_ptr = NULL;
		dmabuf = NULL;
		attach = NULL;
	}
	return ret;
err:
@@ -3806,7 +3810,7 @@ static int __qseecom_update_cmd_buf_64(void *msg, bool cleanup,
				data->client.sec_buf_fd[i].size,
				data->client.sec_buf_fd[i].vbase,
				data->client.sec_buf_fd[i].pbase);
	if (!IS_ERR(sg_ptr))
	if (!IS_ERR_OR_NULL(sg_ptr))
		qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf);
	return -ENOMEM;
}
@@ -6560,12 +6564,14 @@ static int __qseecom_update_qteec_req_buf(struct qseecom_qteec_modfd_req *req,
			data->sglist_cnt = i + 1;
		}
		/* unmap the dmabuf */
		if (!IS_ERR(sg_ptr))
		qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf);
		sg_ptr = NULL;
		dmabuf = NULL;
		attach = NULL;
	}
	return ret;
err:
	if (!IS_ERR(sg_ptr))
	if (!IS_ERR_OR_NULL(sg_ptr))
		qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf);
	return -ENOMEM;
}
@@ -8558,6 +8564,12 @@ static int qseecom_probe(struct platform_device *pdev)
	qseecom.pdev = class_dev;
	qseecom.dev = &pdev->dev;

	rc = dma_set_mask(qseecom.dev, DMA_BIT_MASK(64));
	if (rc) {
		pr_err("qseecom failed to set dma mask\n", rc);
		goto exit_del_cdev;
	}

	/* register client for bus scaling */
	if (pdev->dev.of_node) {
		qseecom.pdev->of_node = pdev->dev.of_node;