aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2015-10-14 07:42:49 -0400
committerVinod Koul <vinod.koul@intel.com>2015-10-14 10:27:11 -0400
commitca304fa9bb762f091e851d48de43f623c975d47a (patch)
treec772e271becb06e49be494e8701fe2d6c8a7d9fd /include/linux/platform_data
parent700c371913072fc891650a6dafacfd147ce805a7 (diff)
ARM/dmaengine: edma: Public API to use private struct pointer
Instead of relying on indexes pointing to edma private date in the global pointer array, pass the private data pointer via the public API. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r--include/linux/platform_data/edma.h38
1 files changed, 22 insertions, 16 deletions
diff --git a/include/linux/platform_data/edma.h b/include/linux/platform_data/edma.h
index c1862423b356..466021c03169 100644
--- a/include/linux/platform_data/edma.h
+++ b/include/linux/platform_data/edma.h
@@ -92,32 +92,40 @@ enum dma_event_q {
92 92
93#define EDMA_MAX_CC 2 93#define EDMA_MAX_CC 2
94 94
95struct edma;
96
97struct edma *edma_get_data(struct device *edma_dev);
98
95/* alloc/free DMA channels and their dedicated parameter RAM slots */ 99/* alloc/free DMA channels and their dedicated parameter RAM slots */
96int edma_alloc_channel(int channel, 100int edma_alloc_channel(struct edma *cc, int channel,
97 void (*callback)(unsigned channel, u16 ch_status, void *data), 101 void (*callback)(unsigned channel, u16 ch_status, void *data),
98 void *data, enum dma_event_q); 102 void *data, enum dma_event_q);
99void edma_free_channel(unsigned channel); 103void edma_free_channel(struct edma *cc, unsigned channel);
100 104
101/* alloc/free parameter RAM slots */ 105/* alloc/free parameter RAM slots */
102int edma_alloc_slot(unsigned ctlr, int slot); 106int edma_alloc_slot(struct edma *cc, int slot);
103void edma_free_slot(unsigned slot); 107void edma_free_slot(struct edma *cc, unsigned slot);
104 108
105/* calls that operate on part of a parameter RAM slot */ 109/* calls that operate on part of a parameter RAM slot */
106dma_addr_t edma_get_position(unsigned slot, bool dst); 110dma_addr_t edma_get_position(struct edma *cc, unsigned slot, bool dst);
107void edma_link(unsigned from, unsigned to); 111void edma_link(struct edma *cc, unsigned from, unsigned to);
108 112
109/* calls that operate on an entire parameter RAM slot */ 113/* calls that operate on an entire parameter RAM slot */
110void edma_write_slot(unsigned slot, const struct edmacc_param *params); 114void edma_write_slot(struct edma *cc, unsigned slot,
111void edma_read_slot(unsigned slot, struct edmacc_param *params); 115 const struct edmacc_param *params);
116void edma_read_slot(struct edma *cc, unsigned slot,
117 struct edmacc_param *params);
112 118
113/* channel control operations */ 119/* channel control operations */
114int edma_start(unsigned channel); 120int edma_start(struct edma *cc, unsigned channel);
115void edma_stop(unsigned channel); 121void edma_stop(struct edma *cc, unsigned channel);
116void edma_clean_channel(unsigned channel); 122void edma_clean_channel(struct edma *cc, unsigned channel);
117void edma_pause(unsigned channel); 123void edma_pause(struct edma *cc, unsigned channel);
118void edma_resume(unsigned channel); 124void edma_resume(struct edma *cc, unsigned channel);
125int edma_trigger_channel(struct edma *cc, unsigned channel);
119 126
120void edma_assign_channel_eventq(unsigned channel, enum dma_event_q eventq_no); 127void edma_assign_channel_eventq(struct edma *cc, unsigned channel,
128 enum dma_event_q eventq_no);
121 129
122struct edma_rsv_info { 130struct edma_rsv_info {
123 131
@@ -141,6 +149,4 @@ struct edma_soc_info {
141 const s16 (*xbar_chans)[2]; 149 const s16 (*xbar_chans)[2];
142}; 150};
143 151
144int edma_trigger_channel(unsigned);
145
146#endif 152#endif