File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -150,37 +150,32 @@ struct dma_mcux_edma_data {
150
150
#define EDMA_HW_TCD_CSR (dev , ch ) (DEV_BASE(dev)->CH[ch].TCD_CSR)
151
151
#endif
152
152
153
+ #if DMA_MCUX_HAS_CHANNEL_GAP
153
154
/*
154
155
* The hardware channel (takes the gap into account) is used when access DMA registers.
155
156
* For data structures in the shim driver still use the primitive channel.
156
157
*/
157
158
static ALWAYS_INLINE uint32_t dma_mcux_edma_add_channel_gap (const struct device * dev ,
158
159
uint32_t channel )
159
160
{
160
- #if DMA_MCUX_HAS_CHANNEL_GAP
161
161
const struct dma_mcux_edma_config * config = DEV_CFG (dev );
162
162
163
163
return (channel < config -> channel_gap [0 ]) ? channel :
164
164
(channel + 1 + config -> channel_gap [1 ] - config -> channel_gap [0 ]);
165
- #else
166
- ARG_UNUSED (dev );
167
- return channel ;
168
- #endif
169
165
}
170
166
171
167
static ALWAYS_INLINE uint32_t dma_mcux_edma_remove_channel_gap (const struct device * dev ,
172
168
uint32_t channel )
173
169
{
174
- #if DMA_MCUX_HAS_CHANNEL_GAP
175
170
const struct dma_mcux_edma_config * config = DEV_CFG (dev );
176
171
177
172
return (channel < config -> channel_gap [0 ]) ? channel :
178
173
(channel + config -> channel_gap [0 ] - config -> channel_gap [1 ] - 1 );
179
- #else
180
- ARG_UNUSED (dev );
181
- return channel ;
182
- #endif
183
174
}
175
+ #else
176
+ #define dma_mcux_edma_add_channel_gap (dev , channel ) channel
177
+ #define dma_mcux_edma_remove_channel_gap (dev , channel ) channel
178
+ #endif /* DMA_MCUX_HAS_CHANNEL_GAP */
184
179
185
180
static bool data_size_valid (const size_t data_size )
186
181
{
You can’t perform that action at this time.
0 commit comments