Commit 782935d1 authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 'qcom-drivers-for-5.2' of...

Merge tag 'qcom-drivers-for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into arm/drivers

Qualcomm ARM Based Driver Updates for v5.2

* Update MAINTAINERS for Andy Gross's new email address
* Add support for mmap in RMTFS
* Fixup for QMI to change txn wait to non-interruptible
* Fixup for error code in probe of cmd-db
* Fixup for slot number check in RMPH-RSC

* tag 'qcom-drivers-for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux

:
  MAINTAINERS: Update email for Qualcomm SoC maintainer
  drivers: soc: qcom: rpmh-rsc: Correct check for slot number
  soc: qcom: cmd-db: Fix an error code in cmd_db_dev_probe()
  soc: qcom: qmi: Change txn wait to non-interruptible
  soc: qcom: rmtfs: Add support for mmap functionality

Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents 524feb79 2616b3de
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1984,7 +1984,7 @@ W: http://www.armlinux.org.uk/
S:	Maintained

ARM/QUALCOMM SUPPORT
M:	Andy Gross <andy.gross@linaro.org>
M:	Andy Gross <agross@kernel.org>
M:	David Brown <david.brown@linaro.org>
L:	linux-arm-msm@vger.kernel.org
S:	Maintained
+2 −2
Original line number Diff line number Diff line
@@ -248,8 +248,8 @@ static int cmd_db_dev_probe(struct platform_device *pdev)
	}

	cmd_db_header = memremap(rmem->base, rmem->size, MEMREMAP_WB);
	if (IS_ERR_OR_NULL(cmd_db_header)) {
		ret = PTR_ERR(cmd_db_header);
	if (!cmd_db_header) {
		ret = -ENOMEM;
		cmd_db_header = NULL;
		return ret;
	}
+2 −5
Original line number Diff line number Diff line
@@ -345,8 +345,7 @@ int qmi_txn_wait(struct qmi_txn *txn, unsigned long timeout)
	struct qmi_handle *qmi = txn->qmi;
	int ret;

	ret = wait_for_completion_interruptible_timeout(&txn->completion,
							timeout);
	ret = wait_for_completion_timeout(&txn->completion, timeout);

	mutex_lock(&qmi->txn_lock);
	mutex_lock(&txn->lock);
@@ -354,9 +353,7 @@ int qmi_txn_wait(struct qmi_txn *txn, unsigned long timeout)
	mutex_unlock(&txn->lock);
	mutex_unlock(&qmi->txn_lock);

	if (ret < 0)
		return ret;
	else if (ret == 0)
	if (ret == 0)
		return -ETIMEDOUT;
	else
		return txn->result;
+21 −0
Original line number Diff line number Diff line
@@ -137,6 +137,26 @@ static struct class rmtfs_class = {
	.name           = "rmtfs",
};

static int qcom_rmtfs_mem_mmap(struct file *filep, struct vm_area_struct *vma)
{
	struct qcom_rmtfs_mem *rmtfs_mem = filep->private_data;

	if (vma->vm_end - vma->vm_start > rmtfs_mem->size) {
		dev_dbg(&rmtfs_mem->dev,
			"vm_end[%lu] - vm_start[%lu] [%lu] > mem->size[%pa]\n",
			vma->vm_end, vma->vm_start,
			(vma->vm_end - vma->vm_start), &rmtfs_mem->size);
		return -EINVAL;
	}

	vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
	return remap_pfn_range(vma,
			       vma->vm_start,
			       rmtfs_mem->addr >> PAGE_SHIFT,
			       vma->vm_end - vma->vm_start,
			       vma->vm_page_prot);
}

static const struct file_operations qcom_rmtfs_mem_fops = {
	.owner = THIS_MODULE,
	.open = qcom_rmtfs_mem_open,
@@ -144,6 +164,7 @@ static const struct file_operations qcom_rmtfs_mem_fops = {
	.write = qcom_rmtfs_mem_write,
	.release = qcom_rmtfs_mem_release,
	.llseek = default_llseek,
	.mmap = qcom_rmtfs_mem_mmap,
};

static void qcom_rmtfs_mem_release_device(struct device *dev)
+1 −1
Original line number Diff line number Diff line
@@ -459,7 +459,7 @@ static int find_slots(struct tcs_group *tcs, const struct tcs_request *msg,
	do {
		slot = bitmap_find_next_zero_area(tcs->slots, MAX_TCS_SLOTS,
						  i, msg->num_cmds, 0);
		if (slot == tcs->num_tcs * tcs->ncpt)
		if (slot >= tcs->num_tcs * tcs->ncpt)
			return -ENOMEM;
		i += tcs->ncpt;
	} while (slot + msg->num_cmds - 1 >= i);