|
@@ -12,6 +12,8 @@
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
* published by the Free Software Foundation.
|
|
|
*/
|
|
|
+#include <linux/dmaengine.h>
|
|
|
+#include <linux/dma/pxa-dma.h>
|
|
|
#include <linux/module.h>
|
|
|
#include <linux/kernel.h>
|
|
|
#include <linux/init.h>
|
|
@@ -24,6 +26,7 @@
|
|
|
#include <linux/of.h>
|
|
|
#include <linux/syscore_ops.h>
|
|
|
#include <linux/platform_data/i2c-pxa.h>
|
|
|
+#include <linux/platform_data/mmp_dma.h>
|
|
|
|
|
|
#include <asm/mach/map.h>
|
|
|
#include <asm/suspend.h>
|
|
@@ -421,6 +424,42 @@ static struct platform_device *devices[] __initdata = {
|
|
|
&pxa27x_device_pwm1,
|
|
|
};
|
|
|
|
|
|
+static const struct dma_slave_map pxa3xx_slave_map[] = {
|
|
|
+ /* PXA25x, PXA27x and PXA3xx common entries */
|
|
|
+ { "pxa2xx-ac97", "pcm_pcm_mic_mono", PDMA_FILTER_PARAM(LOWEST, 8) },
|
|
|
+ { "pxa2xx-ac97", "pcm_pcm_aux_mono_in", PDMA_FILTER_PARAM(LOWEST, 9) },
|
|
|
+ { "pxa2xx-ac97", "pcm_pcm_aux_mono_out",
|
|
|
+ PDMA_FILTER_PARAM(LOWEST, 10) },
|
|
|
+ { "pxa2xx-ac97", "pcm_pcm_stereo_in", PDMA_FILTER_PARAM(LOWEST, 11) },
|
|
|
+ { "pxa2xx-ac97", "pcm_pcm_stereo_out", PDMA_FILTER_PARAM(LOWEST, 12) },
|
|
|
+ { "pxa-ssp-dai.0", "rx", PDMA_FILTER_PARAM(LOWEST, 13) },
|
|
|
+ { "pxa-ssp-dai.0", "tx", PDMA_FILTER_PARAM(LOWEST, 14) },
|
|
|
+ { "pxa-ssp-dai.1", "rx", PDMA_FILTER_PARAM(LOWEST, 15) },
|
|
|
+ { "pxa-ssp-dai.1", "tx", PDMA_FILTER_PARAM(LOWEST, 16) },
|
|
|
+ { "pxa2xx-ir", "rx", PDMA_FILTER_PARAM(LOWEST, 17) },
|
|
|
+ { "pxa2xx-ir", "tx", PDMA_FILTER_PARAM(LOWEST, 18) },
|
|
|
+ { "pxa2xx-mci.0", "rx", PDMA_FILTER_PARAM(LOWEST, 21) },
|
|
|
+ { "pxa2xx-mci.0", "tx", PDMA_FILTER_PARAM(LOWEST, 22) },
|
|
|
+ { "pxa-ssp-dai.2", "rx", PDMA_FILTER_PARAM(LOWEST, 66) },
|
|
|
+ { "pxa-ssp-dai.2", "tx", PDMA_FILTER_PARAM(LOWEST, 67) },
|
|
|
+
|
|
|
+ /* PXA3xx specific map */
|
|
|
+ { "pxa-ssp-dai.3", "rx", PDMA_FILTER_PARAM(LOWEST, 2) },
|
|
|
+ { "pxa-ssp-dai.3", "tx", PDMA_FILTER_PARAM(LOWEST, 3) },
|
|
|
+ { "pxa2xx-mci.1", "rx", PDMA_FILTER_PARAM(LOWEST, 93) },
|
|
|
+ { "pxa2xx-mci.1", "tx", PDMA_FILTER_PARAM(LOWEST, 94) },
|
|
|
+ { "pxa3xx-nand", "data", PDMA_FILTER_PARAM(LOWEST, 97) },
|
|
|
+ { "pxa2xx-mci.2", "rx", PDMA_FILTER_PARAM(LOWEST, 100) },
|
|
|
+ { "pxa2xx-mci.2", "tx", PDMA_FILTER_PARAM(LOWEST, 101) },
|
|
|
+};
|
|
|
+
|
|
|
+static struct mmp_dma_platdata pxa3xx_dma_pdata = {
|
|
|
+ .dma_channels = 32,
|
|
|
+ .nb_requestors = 100,
|
|
|
+ .slave_map = pxa3xx_slave_map,
|
|
|
+ .slave_map_cnt = ARRAY_SIZE(pxa3xx_slave_map),
|
|
|
+};
|
|
|
+
|
|
|
static int __init pxa3xx_init(void)
|
|
|
{
|
|
|
int ret = 0;
|
|
@@ -456,7 +495,7 @@ static int __init pxa3xx_init(void)
|
|
|
if (of_have_populated_dt())
|
|
|
return 0;
|
|
|
|
|
|
- pxa2xx_set_dmac_info(32, 100);
|
|
|
+ pxa2xx_set_dmac_info(&pxa3xx_dma_pdata);
|
|
|
ret = platform_add_devices(devices, ARRAY_SIZE(devices));
|
|
|
if (ret)
|
|
|
return ret;
|