mirror of https://github.com/thesofproject/sof.git
dw-dma: add method to retrieve lli from memory
Implements new platform specific method, which allows for retrieving linked list item from memory. The best example are cAVS platforms, which need read it through uncached memory region. Rest of the platforms currently don't need the implementation, since they don't support hardware linked list. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit is contained in:
parent
e74ed8dc56
commit
9e4d1aae90
|
@ -816,7 +816,7 @@ static void dw_dma_verify_transfer(struct dma_chan_data *channel,
|
|||
{
|
||||
struct dw_dma_chan_data *dw_chan = dma_chan_get_data(channel);
|
||||
#if CONFIG_HW_LLI
|
||||
struct dw_lli *ll_uncached = cache_to_uncache(dw_chan->lli_current);
|
||||
struct dw_lli *lli = platform_dw_dma_lli_get(dw_chan->lli_current);
|
||||
|
||||
switch (next->status) {
|
||||
case DMA_CB_STATUS_END:
|
||||
|
@ -825,11 +825,11 @@ static void dw_dma_verify_transfer(struct dma_chan_data *channel,
|
|||
DW_CHAN_MASK(channel->index));
|
||||
/* fallthrough */
|
||||
default:
|
||||
while (ll_uncached->ctrl_hi & DW_CTLH_DONE(1)) {
|
||||
ll_uncached->ctrl_hi &= ~DW_CTLH_DONE(1);
|
||||
while (lli->ctrl_hi & DW_CTLH_DONE(1)) {
|
||||
lli->ctrl_hi &= ~DW_CTLH_DONE(1);
|
||||
dw_chan->lli_current =
|
||||
(struct dw_lli *)dw_chan->lli_current->llp;
|
||||
ll_uncached = cache_to_uncache(dw_chan->lli_current);
|
||||
lli = platform_dw_dma_lli_get(dw_chan->lli_current);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -85,6 +85,11 @@ static inline void platform_dw_dma_llp_disable(struct dma *dma,
|
|||
shim_read(DW_CHLLPC(dma, chan)) & ~SHIM_GPDMA_CHLLPC_EN);
|
||||
}
|
||||
|
||||
static inline struct dw_lli *platform_dw_dma_lli_get(struct dw_lli *lli)
|
||||
{
|
||||
return cache_to_uncache(lli);
|
||||
}
|
||||
|
||||
#endif /* __CAVS_LIB_DW_DMA_H__ */
|
||||
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue