-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Closed
Labels
EnhancementChanges/Updates/Additions to existing featuresChanges/Updates/Additions to existing featuresarea: APIChanges to public APIsChanges to public APIsarea: DMADirect Memory AccessDirect Memory Accessarea: Drivers
Description
Currently, DMA driver has 3 APIs, namely, config, start and stop.
Data buffers for DMA transfers are provided in one or more DMA blocks as part of the config API. This method works well when using fixed set of buffers that are provided during configuration and the DMA driver recycles the buffers internally.
However, when the application manages the buffers and wants to provide new buffers for future transactions, only way to accomplish this is to use the config API. config API does many things including configuring the hardware, so IMO it is not a desirable mechanism for just reloading new buffers.
A new API reload maybe a better approach
typedef int (*dma_api_reload)(struct device *dev, u32_t channel, u32_t src, u32_t dst, size_t size);
struct dma_driver_api {
dma_api_config config;
dma_api_reload reload; /* NEW */
dma_api_start start;
dma_api_stop stop;
};
Comments?
Metadata
Metadata
Assignees
Labels
EnhancementChanges/Updates/Additions to existing featuresChanges/Updates/Additions to existing featuresarea: APIChanges to public APIsChanges to public APIsarea: DMADirect Memory AccessDirect Memory Accessarea: Drivers