diff options
Diffstat (limited to 'drivers/dma/coh901318.c')
-rw-r--r-- | drivers/dma/coh901318.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/dma/coh901318.c b/drivers/dma/coh901318.c index a92d95eac86b..4234f416ef11 100644 --- a/drivers/dma/coh901318.c +++ b/drivers/dma/coh901318.c | |||
@@ -41,6 +41,8 @@ struct coh901318_desc { | |||
41 | struct coh901318_lli *lli; | 41 | struct coh901318_lli *lli; |
42 | enum dma_data_direction dir; | 42 | enum dma_data_direction dir; |
43 | unsigned long flags; | 43 | unsigned long flags; |
44 | u32 head_config; | ||
45 | u32 head_ctrl; | ||
44 | }; | 46 | }; |
45 | 47 | ||
46 | struct coh901318_base { | 48 | struct coh901318_base { |
@@ -661,6 +663,9 @@ static struct coh901318_desc *coh901318_queue_start(struct coh901318_chan *cohc) | |||
661 | 663 | ||
662 | coh901318_desc_submit(cohc, cohd); | 664 | coh901318_desc_submit(cohc, cohd); |
663 | 665 | ||
666 | /* Program the transaction head */ | ||
667 | coh901318_set_conf(cohc, cohd->head_config); | ||
668 | coh901318_set_ctrl(cohc, cohd->head_ctrl); | ||
664 | coh901318_prep_linked_list(cohc, cohd->lli); | 669 | coh901318_prep_linked_list(cohc, cohd->lli); |
665 | 670 | ||
666 | /* start dma job on this channel */ | 671 | /* start dma job on this channel */ |
@@ -1091,8 +1096,6 @@ coh901318_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, | |||
1091 | } else | 1096 | } else |
1092 | goto err_direction; | 1097 | goto err_direction; |
1093 | 1098 | ||
1094 | coh901318_set_conf(cohc, config); | ||
1095 | |||
1096 | /* The dma only supports transmitting packages up to | 1099 | /* The dma only supports transmitting packages up to |
1097 | * MAX_DMA_PACKET_SIZE. Calculate to total number of | 1100 | * MAX_DMA_PACKET_SIZE. Calculate to total number of |
1098 | * dma elemts required to send the entire sg list | 1101 | * dma elemts required to send the entire sg list |
@@ -1129,16 +1132,18 @@ coh901318_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, | |||
1129 | if (ret) | 1132 | if (ret) |
1130 | goto err_lli_fill; | 1133 | goto err_lli_fill; |
1131 | 1134 | ||
1132 | /* | ||
1133 | * Set the default ctrl for the channel to the one from the lli, | ||
1134 | * things may have changed due to odd buffer alignment etc. | ||
1135 | */ | ||
1136 | coh901318_set_ctrl(cohc, lli->control); | ||
1137 | 1135 | ||
1138 | COH_DBG(coh901318_list_print(cohc, lli)); | 1136 | COH_DBG(coh901318_list_print(cohc, lli)); |
1139 | 1137 | ||
1140 | /* Pick a descriptor to handle this transfer */ | 1138 | /* Pick a descriptor to handle this transfer */ |
1141 | cohd = coh901318_desc_get(cohc); | 1139 | cohd = coh901318_desc_get(cohc); |
1140 | cohd->head_config = config; | ||
1141 | /* | ||
1142 | * Set the default head ctrl for the channel to the one from the | ||
1143 | * lli, things may have changed due to odd buffer alignment | ||
1144 | * etc. | ||
1145 | */ | ||
1146 | cohd->head_ctrl = lli->control; | ||
1142 | cohd->dir = direction; | 1147 | cohd->dir = direction; |
1143 | cohd->flags = flags; | 1148 | cohd->flags = flags; |
1144 | cohd->desc.tx_submit = coh901318_tx_submit; | 1149 | cohd->desc.tx_submit = coh901318_tx_submit; |