blob: b2a0899e7453b29b083dab3790901294df405481 [file] [log] [blame]
Ola Liljac0af14d2012-04-20 11:32:59 +02001/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * License terms: GNU General Public License (GPL), version 2
5 */
6
7#include <linux/platform_device.h>
8#include <linux/init.h>
9#include <linux/gpio.h>
Linus Walleij865fab62012-10-18 14:20:16 +020010#include <linux/platform_data/dma-ste-dma40.h>
Ola Liljac0af14d2012-04-20 11:32:59 +020011
Arnd Bergmannab0fc6c2013-03-21 22:51:06 +010012#include <linux/platform_data/asoc-ux500-msp.h>
Ola Liljac0af14d2012-04-20 11:32:59 +020013
Linus Walleij08d98fe2012-05-07 10:34:16 +020014#include "ste-dma40-db8500.h"
Ola Liljac0af14d2012-04-20 11:32:59 +020015#include "board-mop500.h"
Ola Liljac0af14d2012-04-20 11:32:59 +020016
Ola Liljac0af14d2012-04-20 11:32:59 +020017static struct stedma40_chan_cfg msp0_dma_rx = {
18 .high_priority = true,
Lee Jones98b68ab2013-05-15 10:51:53 +010019 .dir = DMA_DEV_TO_MEM,
Lee Jones26955c07d2013-05-03 15:31:56 +010020 .dev_type = DB8500_DMA_DEV31_MSP0_SLIM0_CH0,
Ola Liljac0af14d2012-04-20 11:32:59 +020021};
22
23static struct stedma40_chan_cfg msp0_dma_tx = {
24 .high_priority = true,
Lee Jones98b68ab2013-05-15 10:51:53 +010025 .dir = DMA_MEM_TO_DEV,
Lee Jones26955c07d2013-05-03 15:31:56 +010026 .dev_type = DB8500_DMA_DEV31_MSP0_SLIM0_CH0,
Ola Liljac0af14d2012-04-20 11:32:59 +020027};
28
Lee Jones724ebbf2012-07-25 13:58:36 +010029struct msp_i2s_platform_data msp0_platform_data = {
Lee Jones04756802013-12-19 15:54:58 +000030 .id = 0,
Ola Liljac0af14d2012-04-20 11:32:59 +020031 .msp_i2s_dma_rx = &msp0_dma_rx,
32 .msp_i2s_dma_tx = &msp0_dma_tx,
33};
34
35static struct stedma40_chan_cfg msp1_dma_rx = {
36 .high_priority = true,
Lee Jones98b68ab2013-05-15 10:51:53 +010037 .dir = DMA_DEV_TO_MEM,
Lee Jones26955c07d2013-05-03 15:31:56 +010038 .dev_type = DB8500_DMA_DEV30_MSP3,
Ola Liljac0af14d2012-04-20 11:32:59 +020039};
40
41static struct stedma40_chan_cfg msp1_dma_tx = {
42 .high_priority = true,
Lee Jones98b68ab2013-05-15 10:51:53 +010043 .dir = DMA_MEM_TO_DEV,
Lee Jones26955c07d2013-05-03 15:31:56 +010044 .dev_type = DB8500_DMA_DEV30_MSP1,
Ola Liljac0af14d2012-04-20 11:32:59 +020045};
46
Lee Jones724ebbf2012-07-25 13:58:36 +010047struct msp_i2s_platform_data msp1_platform_data = {
Lee Jones04756802013-12-19 15:54:58 +000048 .id = 1,
Ola Liljac0af14d2012-04-20 11:32:59 +020049 .msp_i2s_dma_rx = NULL,
50 .msp_i2s_dma_tx = &msp1_dma_tx,
Ola Liljac0af14d2012-04-20 11:32:59 +020051};
52
53static struct stedma40_chan_cfg msp2_dma_rx = {
54 .high_priority = true,
Lee Jones98b68ab2013-05-15 10:51:53 +010055 .dir = DMA_DEV_TO_MEM,
Lee Jones26955c07d2013-05-03 15:31:56 +010056 .dev_type = DB8500_DMA_DEV14_MSP2,
Ola Liljac0af14d2012-04-20 11:32:59 +020057};
58
59static struct stedma40_chan_cfg msp2_dma_tx = {
60 .high_priority = true,
Lee Jones98b68ab2013-05-15 10:51:53 +010061 .dir = DMA_MEM_TO_DEV,
Lee Jones26955c07d2013-05-03 15:31:56 +010062 .dev_type = DB8500_DMA_DEV14_MSP2,
Ola Liljac0af14d2012-04-20 11:32:59 +020063 .use_fixed_channel = true,
64 .phy_channel = 1,
Ola Liljac0af14d2012-04-20 11:32:59 +020065};
66
Lee Jones724ebbf2012-07-25 13:58:36 +010067struct msp_i2s_platform_data msp2_platform_data = {
Lee Jones04756802013-12-19 15:54:58 +000068 .id = 2,
Ola Liljac0af14d2012-04-20 11:32:59 +020069 .msp_i2s_dma_rx = &msp2_dma_rx,
70 .msp_i2s_dma_tx = &msp2_dma_tx,
71};
72
Lee Jones724ebbf2012-07-25 13:58:36 +010073struct msp_i2s_platform_data msp3_platform_data = {
Lee Jones04756802013-12-19 15:54:58 +000074 .id = 3,
Ola Liljac0af14d2012-04-20 11:32:59 +020075 .msp_i2s_dma_rx = &msp1_dma_rx,
76 .msp_i2s_dma_tx = NULL,
Ola Liljac0af14d2012-04-20 11:32:59 +020077};