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

Commit 108ec67a authored by Yan He's avatar Yan He
Browse files

msm: sps: add stubs for BAM DMA APIs



BAM DMA may not exist on some chipsets and the driver may not be
compiled. Thus, add the stubs for BAM DMA APIs.

Change-Id: I01cb62fe432dd9fff5b6fcf9a3f141f17ca25658
Signed-off-by: default avatarYan He <yanhe@codeaurora.org>
parent f2291a76
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -1169,6 +1169,7 @@ int sps_set_config(struct sps_pipe *h, struct sps_connect *config);
int sps_set_owner(struct sps_pipe *h, enum sps_owner owner,
		  struct sps_satellite *connect);

#ifdef CONFIG_SPS_SUPPORT_BAMDMA
/**
 * Allocate a BAM DMA channel
 *
@@ -1216,7 +1217,27 @@ unsigned long sps_dma_get_bam_handle(void);
 *
 */
void sps_dma_free_bam_handle(unsigned long h);
#else
static inline int sps_alloc_dma_chan(const struct sps_alloc_dma_chan *alloc,
		       struct sps_dma_chan *chan)
{
	return -EPERM;
}

static inline int sps_free_dma_chan(struct sps_dma_chan *chan)
{
	return -EPERM;
}

static inline unsigned long sps_dma_get_bam_handle(void)
{
	return 0;
}

static inline void sps_dma_free_bam_handle(unsigned long h)
{
}
#endif

/**
 * Get number of free transfer entries for an SPS connection end point