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

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

Merge "msm: sps: add the support to halt a pipe"

parents 30a44bfb 81949eff
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1462,6 +1462,15 @@ u32 bam_pipe_timer_get_count(void *base, u32 pipe)
	return bam_read_reg(base, P_TIMER, pipe);
}

/* halt and un-halt a pipe */
void bam_pipe_halt(void *base, u32 pipe, bool halt)
{
	if (halt)
		bam_write_reg_field(base, P_HALT, pipe, P_HALT_P_HALT, 1);
	else
		bam_write_reg_field(base, P_HALT, pipe, P_HALT_P_HALT, 0);
}

/* output the content of BAM-level registers */
void print_bam_reg(void *virt_addr)
{
+6 −6
Original line number Diff line number Diff line
@@ -1478,7 +1478,7 @@ int sps_flow_on(struct sps_pipe *h)
{
	struct sps_pipe *pipe = h;
	struct sps_bam *bam;
	int result;
	int result = 0;

	SPS_DBG2("sps:%s.", __func__);

@@ -1491,8 +1491,8 @@ int sps_flow_on(struct sps_pipe *h)
	if (bam == NULL)
		return SPS_ERROR;

	/* Enable the pipe data flow */
	result = sps_rm_state_change(pipe, SPS_STATE_ENABLE);
	bam_pipe_halt(bam->base, pipe->pipe_index, false);

	sps_bam_unlock(bam);

	return result;
@@ -1507,7 +1507,7 @@ int sps_flow_off(struct sps_pipe *h, enum sps_flow_off mode)
{
	struct sps_pipe *pipe = h;
	struct sps_bam *bam;
	int result;
	int result = 0;

	SPS_DBG2("sps:%s.", __func__);

@@ -1520,8 +1520,8 @@ int sps_flow_off(struct sps_pipe *h, enum sps_flow_off mode)
	if (bam == NULL)
		return SPS_ERROR;

	/* Disable the pipe data flow */
	result = sps_rm_state_change(pipe, SPS_STATE_DISABLE);
	bam_pipe_halt(bam->base, pipe->pipe_index, true);

	sps_bam_unlock(bam);

	return result;
+3 −0
Original line number Diff line number Diff line
@@ -226,6 +226,9 @@ void print_bam_pipe_desc_fifo(void *, u32, u32);
/* output BAM_TEST_BUS_REG */
void print_bam_test_bus_reg(void *, u32);

/* halt and un-halt a pipe */
void bam_pipe_halt(void *, u32, bool);

/**
 * Translate physical to virtual address
 *