Ola Lilja | c0af14d | 2012-04-20 11:32:59 +0200 | [diff] [blame] | 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> |
Linus Walleij | 865fab6 | 2012-10-18 14:20:16 +0200 | [diff] [blame] | 10 | #include <linux/platform_data/dma-ste-dma40.h> |
Ola Lilja | c0af14d | 2012-04-20 11:32:59 +0200 | [diff] [blame] | 11 | |
Arnd Bergmann | ab0fc6c | 2013-03-21 22:51:06 +0100 | [diff] [blame] | 12 | #include <linux/platform_data/asoc-ux500-msp.h> |
Ola Lilja | c0af14d | 2012-04-20 11:32:59 +0200 | [diff] [blame] | 13 | |
Linus Walleij | 08d98fe | 2012-05-07 10:34:16 +0200 | [diff] [blame] | 14 | #include "ste-dma40-db8500.h" |
Ola Lilja | c0af14d | 2012-04-20 11:32:59 +0200 | [diff] [blame] | 15 | #include "board-mop500.h" |
Ola Lilja | c0af14d | 2012-04-20 11:32:59 +0200 | [diff] [blame] | 16 | |
Ola Lilja | c0af14d | 2012-04-20 11:32:59 +0200 | [diff] [blame] | 17 | static struct stedma40_chan_cfg msp0_dma_rx = { |
| 18 | .high_priority = true, |
Lee Jones | 98b68ab | 2013-05-15 10:51:53 +0100 | [diff] [blame] | 19 | .dir = DMA_DEV_TO_MEM, |
Lee Jones | 26955c07d | 2013-05-03 15:31:56 +0100 | [diff] [blame] | 20 | .dev_type = DB8500_DMA_DEV31_MSP0_SLIM0_CH0, |
Ola Lilja | c0af14d | 2012-04-20 11:32:59 +0200 | [diff] [blame] | 21 | }; |
| 22 | |
| 23 | static struct stedma40_chan_cfg msp0_dma_tx = { |
| 24 | .high_priority = true, |
Lee Jones | 98b68ab | 2013-05-15 10:51:53 +0100 | [diff] [blame] | 25 | .dir = DMA_MEM_TO_DEV, |
Lee Jones | 26955c07d | 2013-05-03 15:31:56 +0100 | [diff] [blame] | 26 | .dev_type = DB8500_DMA_DEV31_MSP0_SLIM0_CH0, |
Ola Lilja | c0af14d | 2012-04-20 11:32:59 +0200 | [diff] [blame] | 27 | }; |
| 28 | |
Lee Jones | 724ebbf | 2012-07-25 13:58:36 +0100 | [diff] [blame] | 29 | struct msp_i2s_platform_data msp0_platform_data = { |
Lee Jones | 0475680 | 2013-12-19 15:54:58 +0000 | [diff] [blame] | 30 | .id = 0, |
Ola Lilja | c0af14d | 2012-04-20 11:32:59 +0200 | [diff] [blame] | 31 | .msp_i2s_dma_rx = &msp0_dma_rx, |
| 32 | .msp_i2s_dma_tx = &msp0_dma_tx, |
| 33 | }; |
| 34 | |
| 35 | static struct stedma40_chan_cfg msp1_dma_rx = { |
| 36 | .high_priority = true, |
Lee Jones | 98b68ab | 2013-05-15 10:51:53 +0100 | [diff] [blame] | 37 | .dir = DMA_DEV_TO_MEM, |
Lee Jones | 26955c07d | 2013-05-03 15:31:56 +0100 | [diff] [blame] | 38 | .dev_type = DB8500_DMA_DEV30_MSP3, |
Ola Lilja | c0af14d | 2012-04-20 11:32:59 +0200 | [diff] [blame] | 39 | }; |
| 40 | |
| 41 | static struct stedma40_chan_cfg msp1_dma_tx = { |
| 42 | .high_priority = true, |
Lee Jones | 98b68ab | 2013-05-15 10:51:53 +0100 | [diff] [blame] | 43 | .dir = DMA_MEM_TO_DEV, |
Lee Jones | 26955c07d | 2013-05-03 15:31:56 +0100 | [diff] [blame] | 44 | .dev_type = DB8500_DMA_DEV30_MSP1, |
Ola Lilja | c0af14d | 2012-04-20 11:32:59 +0200 | [diff] [blame] | 45 | }; |
| 46 | |
Lee Jones | 724ebbf | 2012-07-25 13:58:36 +0100 | [diff] [blame] | 47 | struct msp_i2s_platform_data msp1_platform_data = { |
Lee Jones | 0475680 | 2013-12-19 15:54:58 +0000 | [diff] [blame] | 48 | .id = 1, |
Ola Lilja | c0af14d | 2012-04-20 11:32:59 +0200 | [diff] [blame] | 49 | .msp_i2s_dma_rx = NULL, |
| 50 | .msp_i2s_dma_tx = &msp1_dma_tx, |
Ola Lilja | c0af14d | 2012-04-20 11:32:59 +0200 | [diff] [blame] | 51 | }; |
| 52 | |
| 53 | static struct stedma40_chan_cfg msp2_dma_rx = { |
| 54 | .high_priority = true, |
Lee Jones | 98b68ab | 2013-05-15 10:51:53 +0100 | [diff] [blame] | 55 | .dir = DMA_DEV_TO_MEM, |
Lee Jones | 26955c07d | 2013-05-03 15:31:56 +0100 | [diff] [blame] | 56 | .dev_type = DB8500_DMA_DEV14_MSP2, |
Ola Lilja | c0af14d | 2012-04-20 11:32:59 +0200 | [diff] [blame] | 57 | }; |
| 58 | |
| 59 | static struct stedma40_chan_cfg msp2_dma_tx = { |
| 60 | .high_priority = true, |
Lee Jones | 98b68ab | 2013-05-15 10:51:53 +0100 | [diff] [blame] | 61 | .dir = DMA_MEM_TO_DEV, |
Lee Jones | 26955c07d | 2013-05-03 15:31:56 +0100 | [diff] [blame] | 62 | .dev_type = DB8500_DMA_DEV14_MSP2, |
Ola Lilja | c0af14d | 2012-04-20 11:32:59 +0200 | [diff] [blame] | 63 | .use_fixed_channel = true, |
| 64 | .phy_channel = 1, |
Ola Lilja | c0af14d | 2012-04-20 11:32:59 +0200 | [diff] [blame] | 65 | }; |
| 66 | |
Lee Jones | 724ebbf | 2012-07-25 13:58:36 +0100 | [diff] [blame] | 67 | struct msp_i2s_platform_data msp2_platform_data = { |
Lee Jones | 0475680 | 2013-12-19 15:54:58 +0000 | [diff] [blame] | 68 | .id = 2, |
Ola Lilja | c0af14d | 2012-04-20 11:32:59 +0200 | [diff] [blame] | 69 | .msp_i2s_dma_rx = &msp2_dma_rx, |
| 70 | .msp_i2s_dma_tx = &msp2_dma_tx, |
| 71 | }; |
| 72 | |
Lee Jones | 724ebbf | 2012-07-25 13:58:36 +0100 | [diff] [blame] | 73 | struct msp_i2s_platform_data msp3_platform_data = { |
Lee Jones | 0475680 | 2013-12-19 15:54:58 +0000 | [diff] [blame] | 74 | .id = 3, |
Ola Lilja | c0af14d | 2012-04-20 11:32:59 +0200 | [diff] [blame] | 75 | .msp_i2s_dma_rx = &msp1_dma_rx, |
| 76 | .msp_i2s_dma_tx = NULL, |
Ola Lilja | c0af14d | 2012-04-20 11:32:59 +0200 | [diff] [blame] | 77 | }; |