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

Commit c5265904 authored by Karthikeyan Ramasubramanian's avatar Karthikeyan Ramasubramanian Committed by Gerrit - the friendly Code Review server
Browse files

slimbus: Use appropriate Pipe Number Offset Mask



Pipe Number Offset field for BAM Pipes to be used by Slimbus is configured
in Slimbus NGD Status register from bit field 2 to bit field 9. Currently
the mask is taking only the bit fields 2 to 7.

Update the Pipe Number Offset Mask to include the bit fields 2 to 9.

CRs-Fixed: 2009626
Change-Id: I727330b42c49cc788b8bfd090ad94eb0587bd119
Signed-off-by: default avatarKarthikeyan Ramasubramanian <kramasub@codeaurora.org>
parent b5d07ee5
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -18,6 +18,9 @@
#include <linux/gcd.h>
#include "slim-msm.h"

/* Pipe Number Offset Mask */
#define P_OFF_MASK 0x3FC

int msm_slim_rx_enqueue(struct msm_slim_ctrl *dev, u32 *buf, u8 len)
{
	spin_lock(&dev->rx_lock);
@@ -899,7 +902,7 @@ static int msm_slim_init_rx_msgq(struct msm_slim_ctrl *dev, u32 pipe_reg)
	}

	/* Get the pipe indices for the message queues */
	pipe_offset = (readl_relaxed(dev->base + pipe_reg) & 0xfc) >> 2;
	pipe_offset = (readl_relaxed(dev->base + pipe_reg) & P_OFF_MASK) >> 2;
	dev_dbg(dev->dev, "Message queue pipe offset %d\n", pipe_offset);

	config->mode = SPS_MODE_SRC;
@@ -959,7 +962,7 @@ static int msm_slim_init_tx_msgq(struct msm_slim_ctrl *dev, u32 pipe_reg)
	}

	/* Get the pipe indices for the message queues */
	pipe_offset = (readl_relaxed(dev->base + pipe_reg) & 0xfc) >> 2;
	pipe_offset = (readl_relaxed(dev->base + pipe_reg) & P_OFF_MASK) >> 2;
	pipe_offset += 1;
	dev_dbg(dev->dev, "TX Message queue pipe offset %d\n", pipe_offset);