From 5d7b8467e18b14ed44c5781d77993bfdcd8c826b Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Thu, 14 Oct 2010 13:57:59 +0200 Subject: mach-ux500: config Ux500 PL011 PL022 PL180 for DMA This will configure the platform data for the PL011, PL022 and PL180 (derivate) PrimeCells found in the Ux500 to use DMA with the generic DMA engine for DMA40. Signed-off-by: Per Forlin Signed-off-by: Linus Walleij --- arch/arm/mach-ux500/board-u5500-sdi.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'arch/arm/mach-ux500/board-u5500-sdi.c') diff --git a/arch/arm/mach-ux500/board-u5500-sdi.c b/arch/arm/mach-ux500/board-u5500-sdi.c index 54712acc0394..739fb4c5b160 100644 --- a/arch/arm/mach-ux500/board-u5500-sdi.c +++ b/arch/arm/mach-ux500/board-u5500-sdi.c @@ -31,6 +31,26 @@ static pin_cfg_t u5500_sdi_pins[] = { GPIO14_MC0_CLK | PIN_DIR_OUTPUT | PIN_VAL_LOW, }; +#ifdef CONFIG_STE_DMA40 +struct stedma40_chan_cfg u5500_sdi0_dma_cfg_rx = { + .mode = STEDMA40_MODE_LOGICAL, + .dir = STEDMA40_PERIPH_TO_MEM, + .src_dev_type = DB5500_DMA_DEV24_SDMMC0_RX, + .dst_dev_type = STEDMA40_DEV_DST_MEMORY, + .src_info.data_width = STEDMA40_WORD_WIDTH, + .dst_info.data_width = STEDMA40_WORD_WIDTH, +}; + +static struct stedma40_chan_cfg u5500_sdi0_dma_cfg_tx = { + .mode = STEDMA40_MODE_LOGICAL, + .dir = STEDMA40_MEM_TO_PERIPH, + .src_dev_type = STEDMA40_DEV_SRC_MEMORY, + .dst_dev_type = DB5500_DMA_DEV24_SDMMC0_TX, + .src_info.data_width = STEDMA40_WORD_WIDTH, + .dst_info.data_width = STEDMA40_WORD_WIDTH, +}; +#endif + static struct mmci_platform_data u5500_sdi0_data = { .ocr_mask = MMC_VDD_165_195, .f_max = 50000000, @@ -39,6 +59,11 @@ static struct mmci_platform_data u5500_sdi0_data = { MMC_CAP_MMC_HIGHSPEED, .gpio_cd = -1, .gpio_wp = -1, +#ifdef CONFIG_STE_DMA40 + .dma_filter = stedma40_filter, + .dma_rx_param = &u5500_sdi0_dma_cfg_rx, + .dma_tx_param = &u5500_sdi0_dma_cfg_tx, +#endif }; void __init u5500_sdi_init(void) -- cgit v1.2.3