Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262042
b: refs/heads/master
c: b89243d
h: refs/heads/master
v: v3
  • Loading branch information
Linus Walleij authored and Vinod Koul committed Jul 13, 2011
1 parent c4beedf commit da43e01
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 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: 98ca528916c47ad17f78a07b45e49de3940fba77
refs/heads/master: b89243dd0e6a1c96a4a346cb3e1ba2c637cdfe98
19 changes: 12 additions & 7 deletions trunk/drivers/dma/coh901318.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ struct coh901318_desc {
struct coh901318_lli *lli;
enum dma_data_direction dir;
unsigned long flags;
u32 head_config;
u32 head_ctrl;
};

struct coh901318_base {
Expand Down Expand Up @@ -660,6 +662,9 @@ static struct coh901318_desc *coh901318_queue_start(struct coh901318_chan *cohc)

coh901318_desc_submit(cohc, cohd);

/* Program the transaction head */
coh901318_set_conf(cohc, cohd->head_config);
coh901318_set_ctrl(cohc, cohd->head_ctrl);
coh901318_prep_linked_list(cohc, cohd->lli);

/* start dma job on this channel */
Expand Down Expand Up @@ -1090,8 +1095,6 @@ coh901318_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
} else
goto err_direction;

coh901318_set_conf(cohc, config);

/* The dma only supports transmitting packages up to
* MAX_DMA_PACKET_SIZE. Calculate to total number of
* dma elemts required to send the entire sg list
Expand Down Expand Up @@ -1128,16 +1131,18 @@ coh901318_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
if (ret)
goto err_lli_fill;

/*
* Set the default ctrl for the channel to the one from the lli,
* things may have changed due to odd buffer alignment etc.
*/
coh901318_set_ctrl(cohc, lli->control);

COH_DBG(coh901318_list_print(cohc, lli));

/* Pick a descriptor to handle this transfer */
cohd = coh901318_desc_get(cohc);
cohd->head_config = config;
/*
* Set the default head ctrl for the channel to the one from the
* lli, things may have changed due to odd buffer alignment
* etc.
*/
cohd->head_ctrl = lli->control;
cohd->dir = direction;
cohd->flags = flags;
cohd->desc.tx_submit = coh901318_tx_submit;
Expand Down

0 comments on commit da43e01

Please sign in to comment.