Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218790
b: refs/heads/master
c: a59670a
h: refs/heads/master
v: v3
  • Loading branch information
Per Forlin authored and Dan Williams committed Oct 7, 2010
1 parent 386e67b commit ddfb37b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 819504f4861a5bc1e25c82409956388bb79fb635
refs/heads/master: a59670a40b4dd497630f9442feb259dde601e469
34 changes: 26 additions & 8 deletions trunk/drivers/dma/ste_dma40.c
Original file line number Diff line number Diff line change
Expand Up @@ -2246,14 +2246,25 @@ static void d40_set_runtime_config(struct dma_chan *chan,
return;
}

if (config_maxburst >= 16)
psize = STEDMA40_PSIZE_LOG_16;
else if (config_maxburst >= 8)
psize = STEDMA40_PSIZE_LOG_8;
else if (config_maxburst >= 4)
psize = STEDMA40_PSIZE_LOG_4;
else
psize = STEDMA40_PSIZE_LOG_1;
if (d40c->log_num != D40_PHY_CHAN) {
if (config_maxburst >= 16)
psize = STEDMA40_PSIZE_LOG_16;
else if (config_maxburst >= 8)
psize = STEDMA40_PSIZE_LOG_8;
else if (config_maxburst >= 4)
psize = STEDMA40_PSIZE_LOG_4;
else
psize = STEDMA40_PSIZE_LOG_1;
} else {
if (config_maxburst >= 16)
psize = STEDMA40_PSIZE_PHY_16;
else if (config_maxburst >= 8)
psize = STEDMA40_PSIZE_PHY_8;
else if (config_maxburst >= 4)
psize = STEDMA40_PSIZE_PHY_4;
else
psize = STEDMA40_PSIZE_PHY_1;
}

/* Set up all the endpoint configs */
cfg->src_info.data_width = addr_width;
Expand All @@ -2265,6 +2276,13 @@ static void d40_set_runtime_config(struct dma_chan *chan,
cfg->dst_info.endianess = STEDMA40_LITTLE_ENDIAN;
cfg->dst_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL;

/* Fill in register values */
if (d40c->log_num != D40_PHY_CHAN)
d40_log_cfg(cfg, &d40c->log_def.lcsp1, &d40c->log_def.lcsp3);
else
d40_phy_cfg(cfg, &d40c->src_def_cfg,
&d40c->dst_def_cfg, false);

/* These settings will take precedence later */
d40c->runtime_addr = config_addr;
d40c->runtime_direction = config->direction;
Expand Down

0 comments on commit ddfb37b

Please sign in to comment.