mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
Make DMA interface chip independent
The common DMA interface should not include chip dependent stuff. Otherwise we cannot share DMA interface across chips. BUG=None TEST=make buildall BRANCH=None Change-Id: I9e0d0c0637520c613747110d6c65d3b800e01704 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/205066 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
a5e93651fb
commit
09db229f21
@@ -1130,6 +1130,9 @@ struct stm32_dma_chan {
|
||||
/* Always use stm32_dma_chan_t so volatile keyword is included! */
|
||||
typedef volatile struct stm32_dma_chan stm32_dma_chan_t;
|
||||
|
||||
/* Common code and header file must use this */
|
||||
typedef stm32_dma_chan_t dma_chan_t;
|
||||
|
||||
/* Registers for the DMA controller */
|
||||
struct stm32_dma_regs {
|
||||
uint32_t isr;
|
||||
|
||||
@@ -30,7 +30,7 @@ struct dma_option {
|
||||
* @param channel Channel to read
|
||||
* @return pointer to DMA channel registers
|
||||
*/
|
||||
stm32_dma_chan_t *dma_get_channel(enum dma_channel channel);
|
||||
dma_chan_t *dma_get_channel(enum dma_channel channel);
|
||||
|
||||
/**
|
||||
* Prepare a DMA transfer to transmit data from memory to a peripheral
|
||||
@@ -76,14 +76,14 @@ void dma_disable(enum dma_channel channel);
|
||||
* @return number of bytes completed on a channel, or 0 if this channel is
|
||||
* not enabled
|
||||
*/
|
||||
int dma_bytes_done(stm32_dma_chan_t *chan, int orig_count);
|
||||
int dma_bytes_done(dma_chan_t *chan, int orig_count);
|
||||
|
||||
/**
|
||||
* Start a previously-prepared dma channel
|
||||
*
|
||||
* @param chan Channel to start, from dma_get_channel()
|
||||
*/
|
||||
void dma_go(stm32_dma_chan_t *chan);
|
||||
void dma_go(dma_chan_t *chan);
|
||||
|
||||
#ifdef CONFIG_DMA_HELP
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user