aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91
diff options
context:
space:
mode:
authorNicolas Ferre <nicolas.ferre@atmel.com>2012-05-10 06:17:41 -0400
committerVinod Koul <vinod.koul@linux.intel.com>2012-05-14 23:17:18 -0400
commit1dd1ea8eb46a71201943148cc0ed3182cd04e288 (patch)
tree0d4c7f05f751d906aea6b0270956453bcd6520e5 /arch/arm/mach-at91
parentb409ebfb14a71b64e11b156dc82ede698480397e (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 'arch/arm/mach-at91')
-rw-r--r--arch/arm/mach-at91/at91sam9g45_devices.c1
-rw-r--r--arch/arm/mach-at91/include/mach/at_hdmac.h21
2 files changed, 0 insertions, 22 deletions
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index 698479f1e197..a9f03f26dc15 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -439,7 +439,6 @@ void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data)
439 atslave->dma_dev = &at_hdmac_device.dev; 439 atslave->dma_dev = &at_hdmac_device.dev;
440 atslave->cfg = ATC_FIFOCFG_HALFFIFO 440 atslave->cfg = ATC_FIFOCFG_HALFFIFO
441 | ATC_SRC_H2SEL_HW | ATC_DST_H2SEL_HW; 441 | ATC_SRC_H2SEL_HW | ATC_DST_H2SEL_HW;
442 atslave->ctrla = ATC_SCSIZE_16 | ATC_DCSIZE_16;
443 if (mmc_id == 0) /* MCI0 */ 442 if (mmc_id == 0) /* MCI0 */
444 atslave->cfg |= ATC_SRC_PER(AT_DMA_ID_MCI0) 443 atslave->cfg |= ATC_SRC_PER(AT_DMA_ID_MCI0)
445 | ATC_DST_PER(AT_DMA_ID_MCI0); 444 | ATC_DST_PER(AT_DMA_ID_MCI0);
diff --git a/arch/arm/mach-at91/include/mach/at_hdmac.h b/arch/arm/mach-at91/include/mach/at_hdmac.h
index 810a13e86245..cab0997be3de 100644
--- a/arch/arm/mach-at91/include/mach/at_hdmac.h
+++ b/arch/arm/mach-at91/include/mach/at_hdmac.h
@@ -27,12 +27,10 @@ struct at_dma_platform_data {
27 * struct at_dma_slave - Controller-specific information about a slave 27 * struct at_dma_slave - Controller-specific information about a slave
28 * @dma_dev: required DMA master device 28 * @dma_dev: required DMA master device
29 * @cfg: Platform-specific initializer for the CFG register 29 * @cfg: Platform-specific initializer for the CFG register
30 * @ctrla: Platform-specific initializer for the CTRLA register
31 */ 30 */
32struct at_dma_slave { 31struct at_dma_slave {
33 struct device *dma_dev; 32 struct device *dma_dev;
34 u32 cfg; 33 u32 cfg;
35 u32 ctrla;
36}; 34};
37 35
38 36
@@ -59,24 +57,5 @@ struct at_dma_slave {
59#define ATC_FIFOCFG_HALFFIFO (0x1 << 28) 57#define ATC_FIFOCFG_HALFFIFO (0x1 << 28)
60#define ATC_FIFOCFG_ENOUGHSPACE (0x2 << 28) 58#define ATC_FIFOCFG_ENOUGHSPACE (0x2 << 28)
61 59
62/* Platform-configurable bits in CTRLA */
63#define ATC_SCSIZE_MASK (0x7 << 16) /* Source Chunk Transfer Size */
64#define ATC_SCSIZE_1 (0x0 << 16)
65#define ATC_SCSIZE_4 (0x1 << 16)
66#define ATC_SCSIZE_8 (0x2 << 16)
67#define ATC_SCSIZE_16 (0x3 << 16)
68#define ATC_SCSIZE_32 (0x4 << 16)
69#define ATC_SCSIZE_64 (0x5 << 16)
70#define ATC_SCSIZE_128 (0x6 << 16)
71#define ATC_SCSIZE_256 (0x7 << 16)
72#define ATC_DCSIZE_MASK (0x7 << 20) /* Destination Chunk Transfer Size */
73#define ATC_DCSIZE_1 (0x0 << 20)
74#define ATC_DCSIZE_4 (0x1 << 20)
75#define ATC_DCSIZE_8 (0x2 << 20)
76#define ATC_DCSIZE_16 (0x3 << 20)
77#define ATC_DCSIZE_32 (0x4 << 20)
78#define ATC_DCSIZE_64 (0x5 << 20)
79#define ATC_DCSIZE_128 (0x6 << 20)
80#define ATC_DCSIZE_256 (0x7 << 20)
81 60
82#endif /* AT_HDMAC_H */ 61#endif /* AT_HDMAC_H */