Merge tag 'boards-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-ux500 / board-mop500-audio.c
1 /*
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>
10 #include <linux/platform_data/dma-ste-dma40.h>
11
12 #include "irqs.h"
13 #include <linux/platform_data/asoc-ux500-msp.h>
14
15 #include "ste-dma40-db8500.h"
16 #include "board-mop500.h"
17
18 static struct stedma40_chan_cfg msp0_dma_rx = {
19         .high_priority = true,
20         .dir = DMA_DEV_TO_MEM,
21         .dev_type = DB8500_DMA_DEV31_MSP0_SLIM0_CH0,
22 };
23
24 static struct stedma40_chan_cfg msp0_dma_tx = {
25         .high_priority = true,
26         .dir = DMA_MEM_TO_DEV,
27         .dev_type = DB8500_DMA_DEV31_MSP0_SLIM0_CH0,
28 };
29
30 struct msp_i2s_platform_data msp0_platform_data = {
31         .id = 0,
32         .msp_i2s_dma_rx = &msp0_dma_rx,
33         .msp_i2s_dma_tx = &msp0_dma_tx,
34 };
35
36 static struct stedma40_chan_cfg msp1_dma_rx = {
37         .high_priority = true,
38         .dir = DMA_DEV_TO_MEM,
39         .dev_type = DB8500_DMA_DEV30_MSP3,
40 };
41
42 static struct stedma40_chan_cfg msp1_dma_tx = {
43         .high_priority = true,
44         .dir = DMA_MEM_TO_DEV,
45         .dev_type = DB8500_DMA_DEV30_MSP1,
46 };
47
48 struct msp_i2s_platform_data msp1_platform_data = {
49         .id = 1,
50         .msp_i2s_dma_rx = NULL,
51         .msp_i2s_dma_tx = &msp1_dma_tx,
52 };
53
54 static struct stedma40_chan_cfg msp2_dma_rx = {
55         .high_priority = true,
56         .dir = DMA_DEV_TO_MEM,
57         .dev_type = DB8500_DMA_DEV14_MSP2,
58 };
59
60 static struct stedma40_chan_cfg msp2_dma_tx = {
61         .high_priority = true,
62         .dir = DMA_MEM_TO_DEV,
63         .dev_type = DB8500_DMA_DEV14_MSP2,
64         .use_fixed_channel = true,
65         .phy_channel = 1,
66 };
67
68 struct msp_i2s_platform_data msp2_platform_data = {
69         .id = 2,
70         .msp_i2s_dma_rx = &msp2_dma_rx,
71         .msp_i2s_dma_tx = &msp2_dma_tx,
72 };
73
74 struct msp_i2s_platform_data msp3_platform_data = {
75         .id             = 3,
76         .msp_i2s_dma_rx = &msp1_dma_rx,
77         .msp_i2s_dma_tx = NULL,
78 };