History

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.

Peter Ujfalusi committed 11 years ago

Commit ca304fa1 parent 700c3713 files · +214 −208Browse files

Showing the changes to include/linux/platform_data (1 of 3 files). Show all

Unified · Split

include/linux/platform_data/edma.h+22−16
@@ -92,32 +92,40 @@ enum dma_event_q { · 91 unmodified lines
9292
9393 #define EDMA_MAX_CC 2
9494
95+struct edma;
96+
97+struct edma *edma_get_data(struct device *edma_dev);
98+
9599 /* alloc/free DMA channels and their dedicated parameter RAM slots */
96−int edma_alloc_channel(int channel,
100+int edma_alloc_channel(struct edma *cc, int channel,
97101 void (*callback)(unsigned channel, u16 ch_status, void *data),
98102 void *data, enum dma_event_q);
99−void edma_free_channel(unsigned channel);
103+void edma_free_channel(struct edma *cc, unsigned channel);
100104
101105 /* alloc/free parameter RAM slots */
102−int edma_alloc_slot(unsigned ctlr, int slot);
103−void edma_free_slot(unsigned slot);
106+int edma_alloc_slot(struct edma *cc, int slot);
107+void edma_free_slot(struct edma *cc, unsigned slot);
104108
105109 /* calls that operate on part of a parameter RAM slot */
106−dma_addr_t edma_get_position(unsigned slot, bool dst);
107−void edma_link(unsigned from, unsigned to);
110+dma_addr_t edma_get_position(struct edma *cc, unsigned slot, bool dst);
111+void edma_link(struct edma *cc, unsigned from, unsigned to);
108112
109113 /* calls that operate on an entire parameter RAM slot */
110−void edma_write_slot(unsigned slot, const struct edmacc_param *params);
111−void edma_read_slot(unsigned slot, struct edmacc_param *params);
114+void edma_write_slot(struct edma *cc, unsigned slot,
115+ const struct edmacc_param *params);
116+void edma_read_slot(struct edma *cc, unsigned slot,
117+ struct edmacc_param *params);
112118
113119 /* channel control operations */
114−int edma_start(unsigned channel);
115−void edma_stop(unsigned channel);
116−void edma_clean_channel(unsigned channel);
117−void edma_pause(unsigned channel);
118−void edma_resume(unsigned channel);
120+int edma_start(struct edma *cc, unsigned channel);
121+void edma_stop(struct edma *cc, unsigned channel);
122+void edma_clean_channel(struct edma *cc, unsigned channel);
123+void edma_pause(struct edma *cc, unsigned channel);
124+void edma_resume(struct edma *cc, unsigned channel);
125+int edma_trigger_channel(struct edma *cc, unsigned channel);
119126
120−void edma_assign_channel_eventq(unsigned channel, enum dma_event_q eventq_no);
127+void edma_assign_channel_eventq(struct edma *cc, unsigned channel,
128+ enum dma_event_q eventq_no);
121129
122130 struct edma_rsv_info {
123131
@@ -141,6 +149,4 @@ struct edma_soc_info { · 17 unmodified lines
141149 const s16 (*xbar_chans)[2];
142150 };
143151
144−int edma_trigger_channel(unsigned);
145−
146152 #endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t