Skip to content

Commit d0e217b

Browse files
nxpfranklivinodkoul
authored andcommitted
dmaengine: fsl-edma: utilize common dt-binding header file
Refactor the code to use the common dt-binding header file, fsl-edma.h. Renaming ARGS* to FSL_EDMA*, ensuring no functional changes. Signed-off-by: Frank Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 1e9b052 commit d0e217b

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

drivers/dma/fsl-edma-main.c

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* Vybrid and Layerscape SoCs.
1010
*/
1111

12+
#include <dt-bindings/dma/fsl-edma.h>
1213
#include <linux/module.h>
1314
#include <linux/interrupt.h>
1415
#include <linux/clk.h>
@@ -21,12 +22,6 @@
2122

2223
#include "fsl-edma-common.h"
2324

24-
#define ARGS_RX BIT(0)
25-
#define ARGS_REMOTE BIT(1)
26-
#define ARGS_MULTI_FIFO BIT(2)
27-
#define ARGS_EVEN_CH BIT(3)
28-
#define ARGS_ODD_CH BIT(4)
29-
3025
static void fsl_edma_synchronize(struct dma_chan *chan)
3126
{
3227
struct fsl_edma_chan *fsl_chan = to_fsl_edma_chan(chan);
@@ -155,14 +150,14 @@ static struct dma_chan *fsl_edma3_xlate(struct of_phandle_args *dma_spec,
155150
i = fsl_chan - fsl_edma->chans;
156151

157152
fsl_chan->priority = dma_spec->args[1];
158-
fsl_chan->is_rxchan = dma_spec->args[2] & ARGS_RX;
159-
fsl_chan->is_remote = dma_spec->args[2] & ARGS_REMOTE;
160-
fsl_chan->is_multi_fifo = dma_spec->args[2] & ARGS_MULTI_FIFO;
153+
fsl_chan->is_rxchan = dma_spec->args[2] & FSL_EDMA_RX;
154+
fsl_chan->is_remote = dma_spec->args[2] & FSL_EDMA_REMOTE;
155+
fsl_chan->is_multi_fifo = dma_spec->args[2] & FSL_EDMA_MULTI_FIFO;
161156

162-
if ((dma_spec->args[2] & ARGS_EVEN_CH) && (i & 0x1))
157+
if ((dma_spec->args[2] & FSL_EDMA_EVEN_CH) && (i & 0x1))
163158
continue;
164159

165-
if ((dma_spec->args[2] & ARGS_ODD_CH) && !(i & 0x1))
160+
if ((dma_spec->args[2] & FSL_EDMA_ODD_CH) && !(i & 0x1))
166161
continue;
167162

168163
if (!b_chmux && i == dma_spec->args[0]) {

0 commit comments

Comments
 (0)