aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/board-mop500-sdi.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2010-10-14 07:57:59 -0400
committerLinus Walleij <linus.walleij@linaro.org>2011-03-14 09:05:14 -0400
commit5d7b8467e18b14ed44c5781d77993bfdcd8c826b (patch)
tree0bc8e0cd883c9c6a0a8184c8e69b22a6a5b8bddf /arch/arm/mach-ux500/board-mop500-sdi.c
parentec8f12533b4a439a8feb0d1a3bf15516781804be (diff)
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 <per.forlin@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500-sdi.c')
-rw-r--r--arch/arm/mach-ux500/board-mop500-sdi.c77
1 files changed, 77 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c
index 4ba3d930a06e..d1ae6a09979d 100644
--- a/arch/arm/mach-ux500/board-mop500-sdi.c
+++ b/arch/arm/mach-ux500/board-mop500-sdi.c
@@ -13,12 +13,14 @@
13#include <linux/platform_device.h> 13#include <linux/platform_device.h>
14 14
15#include <plat/pincfg.h> 15#include <plat/pincfg.h>
16#include <plat/ste_dma40.h>
16#include <mach/devices.h> 17#include <mach/devices.h>
17#include <mach/hardware.h> 18#include <mach/hardware.h>
18 19
19#include "devices-db8500.h" 20#include "devices-db8500.h"
20#include "pins-db8500.h" 21#include "pins-db8500.h"
21#include "board-mop500.h" 22#include "board-mop500.h"
23#include "ste-dma40-db8500.h"
22 24
23static pin_cfg_t mop500_sdi_pins[] = { 25static pin_cfg_t mop500_sdi_pins[] = {
24 /* SDI0 (MicroSD slot) */ 26 /* SDI0 (MicroSD slot) */
@@ -86,6 +88,26 @@ static u32 mop500_sdi0_vdd_handler(struct device *dev, unsigned int vdd,
86 MCI_DATA2DIREN | MCI_DATA31DIREN; 88 MCI_DATA2DIREN | MCI_DATA31DIREN;
87} 89}
88 90
91#ifdef CONFIG_STE_DMA40
92struct stedma40_chan_cfg mop500_sdi0_dma_cfg_rx = {
93 .mode = STEDMA40_MODE_LOGICAL,
94 .dir = STEDMA40_PERIPH_TO_MEM,
95 .src_dev_type = DB8500_DMA_DEV29_SD_MM0_RX,
96 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
97 .src_info.data_width = STEDMA40_WORD_WIDTH,
98 .dst_info.data_width = STEDMA40_WORD_WIDTH,
99};
100
101static struct stedma40_chan_cfg mop500_sdi0_dma_cfg_tx = {
102 .mode = STEDMA40_MODE_LOGICAL,
103 .dir = STEDMA40_MEM_TO_PERIPH,
104 .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
105 .dst_dev_type = DB8500_DMA_DEV29_SD_MM0_TX,
106 .src_info.data_width = STEDMA40_WORD_WIDTH,
107 .dst_info.data_width = STEDMA40_WORD_WIDTH,
108};
109#endif
110
89static struct mmci_platform_data mop500_sdi0_data = { 111static struct mmci_platform_data mop500_sdi0_data = {
90 .vdd_handler = mop500_sdi0_vdd_handler, 112 .vdd_handler = mop500_sdi0_vdd_handler,
91 .ocr_mask = MMC_VDD_29_30, 113 .ocr_mask = MMC_VDD_29_30,
@@ -93,6 +115,11 @@ static struct mmci_platform_data mop500_sdi0_data = {
93 .capabilities = MMC_CAP_4_BIT_DATA, 115 .capabilities = MMC_CAP_4_BIT_DATA,
94 .gpio_cd = GPIO_SDMMC_CD, 116 .gpio_cd = GPIO_SDMMC_CD,
95 .gpio_wp = -1, 117 .gpio_wp = -1,
118#ifdef CONFIG_STE_DMA40
119 .dma_filter = stedma40_filter,
120 .dma_rx_param = &mop500_sdi0_dma_cfg_rx,
121 .dma_tx_param = &mop500_sdi0_dma_cfg_tx,
122#endif
96}; 123};
97 124
98void mop500_sdi_tc35892_init(void) 125void mop500_sdi_tc35892_init(void)
@@ -116,18 +143,63 @@ void mop500_sdi_tc35892_init(void)
116 * SDI 2 (POP eMMC, not on DB8500ed) 143 * SDI 2 (POP eMMC, not on DB8500ed)
117 */ 144 */
118 145
146#ifdef CONFIG_STE_DMA40
147struct stedma40_chan_cfg mop500_sdi2_dma_cfg_rx = {
148 .mode = STEDMA40_MODE_LOGICAL,
149 .dir = STEDMA40_PERIPH_TO_MEM,
150 .src_dev_type = DB8500_DMA_DEV28_SD_MM2_RX,
151 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
152 .src_info.data_width = STEDMA40_WORD_WIDTH,
153 .dst_info.data_width = STEDMA40_WORD_WIDTH,
154};
155
156static struct stedma40_chan_cfg mop500_sdi2_dma_cfg_tx = {
157 .mode = STEDMA40_MODE_LOGICAL,
158 .dir = STEDMA40_MEM_TO_PERIPH,
159 .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
160 .dst_dev_type = DB8500_DMA_DEV28_SD_MM2_TX,
161 .src_info.data_width = STEDMA40_WORD_WIDTH,
162 .dst_info.data_width = STEDMA40_WORD_WIDTH,
163};
164#endif
165
119static struct mmci_platform_data mop500_sdi2_data = { 166static struct mmci_platform_data mop500_sdi2_data = {
120 .ocr_mask = MMC_VDD_165_195, 167 .ocr_mask = MMC_VDD_165_195,
121 .f_max = 100000000, 168 .f_max = 100000000,
122 .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, 169 .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
123 .gpio_cd = -1, 170 .gpio_cd = -1,
124 .gpio_wp = -1, 171 .gpio_wp = -1,
172#ifdef CONFIG_STE_DMA40
173 .dma_filter = stedma40_filter,
174 .dma_rx_param = &mop500_sdi2_dma_cfg_rx,
175 .dma_tx_param = &mop500_sdi2_dma_cfg_tx,
176#endif
125}; 177};
126 178
127/* 179/*
128 * SDI 4 (on-board eMMC) 180 * SDI 4 (on-board eMMC)
129 */ 181 */
130 182
183#ifdef CONFIG_STE_DMA40
184struct stedma40_chan_cfg mop500_sdi4_dma_cfg_rx = {
185 .mode = STEDMA40_MODE_LOGICAL,
186 .dir = STEDMA40_PERIPH_TO_MEM,
187 .src_dev_type = DB8500_DMA_DEV42_SD_MM4_RX,
188 .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
189 .src_info.data_width = STEDMA40_WORD_WIDTH,
190 .dst_info.data_width = STEDMA40_WORD_WIDTH,
191};
192
193static struct stedma40_chan_cfg mop500_sdi4_dma_cfg_tx = {
194 .mode = STEDMA40_MODE_LOGICAL,
195 .dir = STEDMA40_MEM_TO_PERIPH,
196 .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
197 .dst_dev_type = DB8500_DMA_DEV42_SD_MM4_TX,
198 .src_info.data_width = STEDMA40_WORD_WIDTH,
199 .dst_info.data_width = STEDMA40_WORD_WIDTH,
200};
201#endif
202
131static struct mmci_platform_data mop500_sdi4_data = { 203static struct mmci_platform_data mop500_sdi4_data = {
132 .ocr_mask = MMC_VDD_29_30, 204 .ocr_mask = MMC_VDD_29_30,
133 .f_max = 100000000, 205 .f_max = 100000000,
@@ -135,6 +207,11 @@ static struct mmci_platform_data mop500_sdi4_data = {
135 MMC_CAP_MMC_HIGHSPEED, 207 MMC_CAP_MMC_HIGHSPEED,
136 .gpio_cd = -1, 208 .gpio_cd = -1,
137 .gpio_wp = -1, 209 .gpio_wp = -1,
210#ifdef CONFIG_STE_DMA40
211 .dma_filter = stedma40_filter,
212 .dma_rx_param = &mop500_sdi4_dma_cfg_rx,
213 .dma_tx_param = &mop500_sdi4_dma_cfg_tx,
214#endif
138}; 215};
139 216
140void __init mop500_sdi_init(void) 217void __init mop500_sdi_init(void)