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

Commit 79064250 authored by Sagar Dharia's avatar Sagar Dharia Committed by Banajit Goswami
Browse files

slim_msm: Rectify physical address type



Make sure physical address type is of correct type as per LPAE
specifications

Change-Id: I9ec7a846e0fc14efd3627d141bb2228c8e56b2cc
Signed-off-by: default avatarSagar Dharia <sdharia@codeaurora.org>
parent 76784e6b
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -392,7 +392,7 @@ static int msm_slim_post_tx_msgq(struct msm_slim_ctrl *dev, u8 *buf, int len)
	struct sps_pipe *pipe = endpoint->sps;
	int ix = (buf - (u8 *)mem->base) / SLIM_MSGQ_BUF_LEN;

	u32 phys_addr = mem->phys_base + (SLIM_MSGQ_BUF_LEN * ix);
	phys_addr_t phys_addr = mem->phys_base + (SLIM_MSGQ_BUF_LEN * ix);

	for (ret = 0; ret < ((len + 3) >> 2); ret++)
		pr_debug("BAM TX buf[%d]:0x%x", ret, ((u32 *)buf)[ret]);
@@ -425,7 +425,7 @@ static u32 *msm_slim_tx_msgq_return(struct msm_slim_ctrl *dev)
	}

	/* Calculate buffer index */
	dev->tx_idx = (iovec.addr - mem->phys_base) / SLIM_MSGQ_BUF_LEN;
	dev->tx_idx = ((int)(iovec.addr - mem->phys_base)) / SLIM_MSGQ_BUF_LEN;

	return (u32 *)((u8 *)mem->base + (dev->tx_idx * SLIM_MSGQ_BUF_LEN));
}
@@ -500,9 +500,9 @@ static int msm_slim_post_rx_msgq(struct msm_slim_ctrl *dev, int ix)

	/* Rx message queue buffers are 4 bytes in length */
	u8 *virt_addr = mem->base + (4 * ix);
	u32 phys_addr = mem->phys_base + (4 * ix);
	phys_addr_t phys_addr = mem->phys_base + (4 * ix);

	pr_debug("index:%d, phys:0x%x, virt:0x%p\n", ix, phys_addr, virt_addr);
	pr_debug("index:%d, virt:0x%p\n", ix, virt_addr);

	ret = sps_transfer_one(pipe, phys_addr, 4, virt_addr, flags);
	if (ret)