Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: mxs: rename custom flag

The mxs dma driver uses the flags parameter in dmaengine_prep_slave_sg() for
custom flags, but still uses the dmaengine specific names of the flags.
Do a little bit better and at least give the flag a custom name.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

authored by

Sascha Hauer and committed by
Miquel Raynal
ceeeb99c e0ddaab7

+15 -8
+2 -2
drivers/dma/mxs-dma.c
··· 541 541 ccw->bits = 0; 542 542 ccw->bits |= CCW_IRQ; 543 543 ccw->bits |= CCW_DEC_SEM; 544 - if (flags & DMA_CTRL_ACK) 544 + if (flags & MXS_DMA_CTRL_WAIT4END) 545 545 ccw->bits |= CCW_WAIT4END; 546 546 ccw->bits |= CCW_HALT_ON_TERM; 547 547 ccw->bits |= CCW_TERM_FLUSH; ··· 573 573 ccw->bits &= ~CCW_CHAIN; 574 574 ccw->bits |= CCW_IRQ; 575 575 ccw->bits |= CCW_DEC_SEM; 576 - if (flags & DMA_CTRL_ACK) 576 + if (flags & MXS_DMA_CTRL_WAIT4END) 577 577 ccw->bits |= CCW_WAIT4END; 578 578 } 579 579 }
+11 -6
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
··· 926 926 sg_init_one(sgl, this->cmd_buffer, this->command_length); 927 927 dma_map_sg(this->dev, sgl, 1, DMA_TO_DEVICE); 928 928 desc = dmaengine_prep_slave_sg(channel, 929 - sgl, 1, DMA_MEM_TO_DEV, DMA_CTRL_ACK); 929 + sgl, 1, DMA_MEM_TO_DEV, 930 + MXS_DMA_CTRL_WAIT4END); 930 931 if (!desc) 931 932 return -EINVAL; 932 933 ··· 997 996 /* [2] send DMA request */ 998 997 prepare_data_dma(this, buf, len, DMA_TO_DEVICE); 999 998 desc = dmaengine_prep_slave_sg(channel, &this->data_sgl, 1000 - 1, DMA_MEM_TO_DEV, DMA_CTRL_ACK); 999 + 1, DMA_MEM_TO_DEV, 1000 + MXS_DMA_CTRL_WAIT4END); 1001 1001 if (!desc) 1002 1002 return -EINVAL; 1003 1003 ··· 1035 1033 /* [2] : send DMA request */ 1036 1034 direct = prepare_data_dma(this, buf, len, DMA_FROM_DEVICE); 1037 1035 desc = dmaengine_prep_slave_sg(channel, &this->data_sgl, 1038 - 1, DMA_DEV_TO_MEM, DMA_CTRL_ACK); 1036 + 1, DMA_DEV_TO_MEM, 1037 + MXS_DMA_CTRL_WAIT4END); 1039 1038 if (!desc) 1040 1039 return -EINVAL; 1041 1040 ··· 1086 1083 pio[5] = auxiliary; 1087 1084 1088 1085 desc = mxs_dmaengine_prep_pio(channel, pio, ARRAY_SIZE(pio), 1089 - DMA_TRANS_NONE, DMA_CTRL_ACK); 1086 + DMA_TRANS_NONE, 1087 + MXS_DMA_CTRL_WAIT4END); 1090 1088 if (!desc) 1091 1089 return -EINVAL; 1092 1090 ··· 1144 1140 pio[4] = payload; 1145 1141 pio[5] = auxiliary; 1146 1142 desc = mxs_dmaengine_prep_pio(channel, pio, ARRAY_SIZE(pio), 1147 - DMA_TRANS_NONE, DMA_CTRL_ACK); 1143 + DMA_TRANS_NONE, 1144 + MXS_DMA_CTRL_WAIT4END); 1148 1145 if (!desc) 1149 1146 return -EINVAL; 1150 1147 ··· 1162 1157 pio[1] = 0; 1163 1158 pio[2] = 0; /* clear GPMI_HW_GPMI_ECCCTRL, disable the BCH. */ 1164 1159 desc = mxs_dmaengine_prep_pio(channel, pio, 3, DMA_TRANS_NONE, 1165 - DMA_CTRL_ACK); 1160 + MXS_DMA_CTRL_WAIT4END); 1166 1161 if (!desc) 1167 1162 return -EINVAL; 1168 1163
+2
include/linux/dma/mxs-dma.h
··· 4 4 5 5 #include <linux/dmaengine.h> 6 6 7 + #define MXS_DMA_CTRL_WAIT4END BIT(31) 8 + 7 9 /* 8 10 * The mxs dmaengine can do PIO transfers. We pass a pointer to the PIO words 9 11 * in the second argument to dmaengine_prep_slave_sg when the direction is