diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-05-10 06:17:41 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2012-05-14 23:17:18 -0400 |
commit | 1dd1ea8eb46a71201943148cc0ed3182cd04e288 (patch) | |
tree | 0d4c7f05f751d906aea6b0270956453bcd6520e5 /drivers/dma/at_hdmac.c | |
parent | b409ebfb14a71b64e11b156dc82ede698480397e (diff) |
dmaengine: at_hdmac: take maxburst from slave configuration
The maxburst/chunk size was taken from the private slave DMA data structure.
Use the common API provided by DMA_SLAVE_CONFIG to setup src/dst maxburst
values.
The ctrla field is not needed anymore in the slave private structure nor the
header constants that were located in an architecture specific directory.
The at91sam9g45_devices.c file that was using this platform data is also
modified to remove this now useless data.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/dma/at_hdmac.c')
-rw-r--r-- | drivers/dma/at_hdmac.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index c057309c8ae5..7292aa87b2dd 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c | |||
@@ -666,7 +666,8 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, | |||
666 | return NULL; | 666 | return NULL; |
667 | } | 667 | } |
668 | 668 | ||
669 | ctrla = atslave->ctrla; | 669 | ctrla = ATC_SCSIZE(sconfig->src_maxburst) |
670 | | ATC_DCSIZE(sconfig->dst_maxburst); | ||
670 | ctrlb = ATC_IEN; | 671 | ctrlb = ATC_IEN; |
671 | 672 | ||
672 | switch (direction) { | 673 | switch (direction) { |
@@ -794,12 +795,12 @@ atc_dma_cyclic_fill_desc(struct dma_chan *chan, struct at_desc *desc, | |||
794 | enum dma_transfer_direction direction) | 795 | enum dma_transfer_direction direction) |
795 | { | 796 | { |
796 | struct at_dma_chan *atchan = to_at_dma_chan(chan); | 797 | struct at_dma_chan *atchan = to_at_dma_chan(chan); |
797 | struct at_dma_slave *atslave = chan->private; | ||
798 | struct dma_slave_config *sconfig = &atchan->dma_sconfig; | 798 | struct dma_slave_config *sconfig = &atchan->dma_sconfig; |
799 | u32 ctrla; | 799 | u32 ctrla; |
800 | 800 | ||
801 | /* prepare common CRTLA value */ | 801 | /* prepare common CRTLA value */ |
802 | ctrla = atslave->ctrla | 802 | ctrla = ATC_SCSIZE(sconfig->src_maxburst) |
803 | | ATC_DCSIZE(sconfig->dst_maxburst) | ||
803 | | ATC_DST_WIDTH(reg_width) | 804 | | ATC_DST_WIDTH(reg_width) |
804 | | ATC_SRC_WIDTH(reg_width) | 805 | | ATC_SRC_WIDTH(reg_width) |
805 | | period_len >> reg_width; | 806 | | period_len >> reg_width; |