mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
dma: Add stub of dma_memcpy and dma_get_device
Add stub for dma_memcpy() and dma_get_device when CONFIG_DMA is disabled. This avoids ifdefs in driver code using DMA APIs Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
74326a320a
commit
1e373301dc
1 changed files with 11 additions and 0 deletions
|
@ -304,6 +304,7 @@ int dma_send(struct dma *dma, void *src, size_t len, void *metadata);
|
|||
int dma_get_cfg(struct dma *dma, u32 cfg_id, void **cfg_data);
|
||||
#endif /* CONFIG_DMA_CHANNELS */
|
||||
|
||||
#if CONFIG_IS_ENABLED(DMA)
|
||||
/*
|
||||
* dma_get_device - get a DMA device which supports transfer
|
||||
* type of transfer_type
|
||||
|
@ -327,5 +328,15 @@ int dma_get_device(u32 transfer_type, struct udevice **devp);
|
|||
transferred and on failure return error code.
|
||||
*/
|
||||
int dma_memcpy(void *dst, void *src, size_t len);
|
||||
#else
|
||||
static inline int dma_get_device(u32 transfer_type, struct udevice **devp)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline int dma_memcpy(void *dst, void *src, size_t len)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
#endif /* CONFIG_DMA */
|
||||
#endif /* _DMA_H_ */
|
||||
|
|
Loading…
Reference in a new issue