aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/dma/ste_dma40.c34
1 files changed, 26 insertions, 8 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index c07d989f26d7..ad8d6df1b6a8 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -2246,14 +2246,25 @@ static void d40_set_runtime_config(struct dma_chan *chan,
2246 return; 2246 return;
2247 } 2247 }
2248 2248
2249 if (config_maxburst >= 16) 2249 if (d40c->log_num != D40_PHY_CHAN) {
2250 psize = STEDMA40_PSIZE_LOG_16; 2250 if (config_maxburst >= 16)
2251 else if (config_maxburst >= 8) 2251 psize = STEDMA40_PSIZE_LOG_16;
2252 psize = STEDMA40_PSIZE_LOG_8; 2252 else if (config_maxburst >= 8)
2253 else if (config_maxburst >= 4) 2253 psize = STEDMA40_PSIZE_LOG_8;
2254 psize = STEDMA40_PSIZE_LOG_4; 2254 else if (config_maxburst >= 4)
2255 else 2255 psize = STEDMA40_PSIZE_LOG_4;
2256 psize = STEDMA40_PSIZE_LOG_1; 2256 else
2257 psize = STEDMA40_PSIZE_LOG_1;
2258 } else {
2259 if (config_maxburst >= 16)
2260 psize = STEDMA40_PSIZE_PHY_16;
2261 else if (config_maxburst >= 8)
2262 psize = STEDMA40_PSIZE_PHY_8;
2263 else if (config_maxburst >= 4)
2264 psize = STEDMA40_PSIZE_PHY_4;
2265 else
2266 psize = STEDMA40_PSIZE_PHY_1;
2267 }
2257 2268
2258 /* Set up all the endpoint configs */ 2269 /* Set up all the endpoint configs */
2259 cfg->src_info.data_width = addr_width; 2270 cfg->src_info.data_width = addr_width;
@@ -2265,6 +2276,13 @@ static void d40_set_runtime_config(struct dma_chan *chan,
2265 cfg->dst_info.endianess = STEDMA40_LITTLE_ENDIAN; 2276 cfg->dst_info.endianess = STEDMA40_LITTLE_ENDIAN;
2266 cfg->dst_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL; 2277 cfg->dst_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL;
2267 2278
2279 /* Fill in register values */
2280 if (d40c->log_num != D40_PHY_CHAN)
2281 d40_log_cfg(cfg, &d40c->log_def.lcsp1, &d40c->log_def.lcsp3);
2282 else
2283 d40_phy_cfg(cfg, &d40c->src_def_cfg,
2284 &d40c->dst_def_cfg, false);
2285
2268 /* These settings will take precedence later */ 2286 /* These settings will take precedence later */
2269 d40c->runtime_addr = config_addr; 2287 d40c->runtime_addr = config_addr;
2270 d40c->runtime_direction = config->direction; 2288 d40c->runtime_direction = config->direction;