File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -97,8 +97,8 @@ static void fsl_edma3_enable_request(struct fsl_edma_chan *fsl_chan)
97
97
* ch_mux: With the exception of 0, attempts to write a value
98
98
* already in use will be forced to 0.
99
99
*/
100
- if (!edma_readl_chreg (fsl_chan , ch_mux ))
101
- edma_writel_chreg (fsl_chan , fsl_chan -> srcid , ch_mux );
100
+ if (!edma_readl (fsl_chan -> edma , fsl_chan -> mux_addr ))
101
+ edma_writel (fsl_chan -> edma , fsl_chan -> srcid , fsl_chan -> mux_addr );
102
102
}
103
103
104
104
val = edma_readl_chreg (fsl_chan , ch_csr );
@@ -134,7 +134,7 @@ static void fsl_edma3_disable_request(struct fsl_edma_chan *fsl_chan)
134
134
flags = fsl_edma_drvflags (fsl_chan );
135
135
136
136
if (flags & FSL_EDMA_DRV_HAS_CHMUX )
137
- edma_writel_chreg (fsl_chan , 0 , ch_mux );
137
+ edma_writel (fsl_chan -> edma , 0 , fsl_chan -> mux_addr );
138
138
139
139
val &= ~EDMA_V3_CH_CSR_ERQ ;
140
140
edma_writel_chreg (fsl_chan , val , ch_csr );
Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ struct fsl_edma_chan {
145
145
enum dma_data_direction dma_dir ;
146
146
char chan_name [32 ];
147
147
struct fsl_edma_hw_tcd __iomem * tcd ;
148
+ void __iomem * mux_addr ;
148
149
u32 real_count ;
149
150
struct work_struct issue_worker ;
150
151
struct platform_device * pdev ;
@@ -206,6 +207,8 @@ struct fsl_edma_drvdata {
206
207
u32 chreg_off ;
207
208
u32 chreg_space_sz ;
208
209
u32 flags ;
210
+ u32 mux_off ; /* channel mux register offset */
211
+ u32 mux_skip ; /* how much skip for each channel */
209
212
int (* setup_irq )(struct platform_device * pdev ,
210
213
struct fsl_edma_engine * fsl_edma );
211
214
};
Original file line number Diff line number Diff line change @@ -359,6 +359,8 @@ static struct fsl_edma_drvdata imx93_data4 = {
359
359
.flags = FSL_EDMA_DRV_HAS_CHMUX | FSL_EDMA_DRV_HAS_DMACLK | FSL_EDMA_DRV_EDMA4 ,
360
360
.chreg_space_sz = 0x8000 ,
361
361
.chreg_off = 0x10000 ,
362
+ .mux_off = 0x10000 + offsetof(struct fsl_edma3_ch_reg , ch_mux ),
363
+ .mux_skip = 0x8000 ,
362
364
.setup_irq = fsl_edma3_irq_init ,
363
365
};
364
366
@@ -532,6 +534,7 @@ static int fsl_edma_probe(struct platform_device *pdev)
532
534
offsetof(struct fsl_edma3_ch_reg , tcd ) : 0 ;
533
535
fsl_chan -> tcd = fsl_edma -> membase
534
536
+ i * drvdata -> chreg_space_sz + drvdata -> chreg_off + len ;
537
+ fsl_chan -> mux_addr = fsl_edma -> membase + drvdata -> mux_off + i * drvdata -> mux_skip ;
535
538
536
539
fsl_chan -> pdev = pdev ;
537
540
vchan_init (& fsl_chan -> vchan , & fsl_edma -> dma_dev );
You can’t perform that action at this time.
0 commit comments