diff options
| -rw-r--r-- | arch/arm/mach-u300/core.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-u300/dma_channels.h | 60 | ||||
| -rw-r--r-- | arch/arm/mach-u300/include/mach/coh901318.h | 16 | ||||
| -rw-r--r-- | arch/arm/mach-u300/spi.c | 2 | ||||
| -rw-r--r-- | drivers/dma/coh901318.c | 1 | ||||
| -rw-r--r-- | include/linux/platform_data/dma-coh901318.h | 72 |
6 files changed, 75 insertions, 78 deletions
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index 4ce77cdc31cc..0951b51f36a6 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #include <linux/dma-mapping.h> | 31 | #include <linux/dma-mapping.h> |
| 32 | #include <linux/platform_data/clk-u300.h> | 32 | #include <linux/platform_data/clk-u300.h> |
| 33 | #include <linux/platform_data/pinctrl-coh901.h> | 33 | #include <linux/platform_data/pinctrl-coh901.h> |
| 34 | #include <linux/platform_data/dma-coh901318.h> | ||
| 34 | 35 | ||
| 35 | #include <asm/types.h> | 36 | #include <asm/types.h> |
| 36 | #include <asm/setup.h> | 37 | #include <asm/setup.h> |
| @@ -49,7 +50,6 @@ | |||
| 49 | #include "spi.h" | 50 | #include "spi.h" |
| 50 | #include "i2c.h" | 51 | #include "i2c.h" |
| 51 | #include "u300-gpio.h" | 52 | #include "u300-gpio.h" |
| 52 | #include "dma_channels.h" | ||
| 53 | 53 | ||
| 54 | /* | 54 | /* |
| 55 | * Static I/O mappings that are needed for booting the U300 platforms. The | 55 | * Static I/O mappings that are needed for booting the U300 platforms. The |
diff --git a/arch/arm/mach-u300/dma_channels.h b/arch/arm/mach-u300/dma_channels.h deleted file mode 100644 index 4e8a88fbca49..000000000000 --- a/arch/arm/mach-u300/dma_channels.h +++ /dev/null | |||
| @@ -1,60 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * | ||
| 3 | * arch/arm/mach-u300/include/mach/dma_channels.h | ||
| 4 | * | ||
| 5 | * | ||
| 6 | * Copyright (C) 2007-2012 ST-Ericsson | ||
| 7 | * License terms: GNU General Public License (GPL) version 2 | ||
| 8 | * Map file for the U300 dma driver. | ||
| 9 | * Author: Per Friden <per.friden@stericsson.com> | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef DMA_CHANNELS_H | ||
| 13 | #define DMA_CHANNELS_H | ||
| 14 | |||
| 15 | #define U300_DMA_MSL_TX_0 0 | ||
| 16 | #define U300_DMA_MSL_TX_1 1 | ||
| 17 | #define U300_DMA_MSL_TX_2 2 | ||
| 18 | #define U300_DMA_MSL_TX_3 3 | ||
| 19 | #define U300_DMA_MSL_TX_4 4 | ||
| 20 | #define U300_DMA_MSL_TX_5 5 | ||
| 21 | #define U300_DMA_MSL_TX_6 6 | ||
| 22 | #define U300_DMA_MSL_RX_0 7 | ||
| 23 | #define U300_DMA_MSL_RX_1 8 | ||
| 24 | #define U300_DMA_MSL_RX_2 9 | ||
| 25 | #define U300_DMA_MSL_RX_3 10 | ||
| 26 | #define U300_DMA_MSL_RX_4 11 | ||
| 27 | #define U300_DMA_MSL_RX_5 12 | ||
| 28 | #define U300_DMA_MSL_RX_6 13 | ||
| 29 | #define U300_DMA_MMCSD_RX_TX 14 | ||
| 30 | #define U300_DMA_MSPRO_TX 15 | ||
| 31 | #define U300_DMA_MSPRO_RX 16 | ||
| 32 | #define U300_DMA_UART0_TX 17 | ||
| 33 | #define U300_DMA_UART0_RX 18 | ||
| 34 | #define U300_DMA_APEX_TX 19 | ||
| 35 | #define U300_DMA_APEX_RX 20 | ||
| 36 | #define U300_DMA_PCM_I2S0_TX 21 | ||
| 37 | #define U300_DMA_PCM_I2S0_RX 22 | ||
| 38 | #define U300_DMA_PCM_I2S1_TX 23 | ||
| 39 | #define U300_DMA_PCM_I2S1_RX 24 | ||
| 40 | #define U300_DMA_XGAM_CDI 25 | ||
| 41 | #define U300_DMA_XGAM_PDI 26 | ||
| 42 | #define U300_DMA_SPI_TX 27 | ||
| 43 | #define U300_DMA_SPI_RX 28 | ||
| 44 | #define U300_DMA_GENERAL_PURPOSE_0 29 | ||
| 45 | #define U300_DMA_GENERAL_PURPOSE_1 30 | ||
| 46 | #define U300_DMA_GENERAL_PURPOSE_2 31 | ||
| 47 | #define U300_DMA_GENERAL_PURPOSE_3 32 | ||
| 48 | #define U300_DMA_GENERAL_PURPOSE_4 33 | ||
| 49 | #define U300_DMA_GENERAL_PURPOSE_5 34 | ||
| 50 | #define U300_DMA_GENERAL_PURPOSE_6 35 | ||
| 51 | #define U300_DMA_GENERAL_PURPOSE_7 36 | ||
| 52 | #define U300_DMA_GENERAL_PURPOSE_8 37 | ||
| 53 | #define U300_DMA_UART1_TX 38 | ||
| 54 | #define U300_DMA_UART1_RX 39 | ||
| 55 | |||
| 56 | #define U300_DMA_DEVICE_CHANNELS 32 | ||
| 57 | #define U300_DMA_CHANNELS 40 | ||
| 58 | |||
| 59 | |||
| 60 | #endif /* DMA_CHANNELS_H */ | ||
diff --git a/arch/arm/mach-u300/include/mach/coh901318.h b/arch/arm/mach-u300/include/mach/coh901318.h index 7c3b2b2d25b6..fc47d30988fc 100644 --- a/arch/arm/mach-u300/include/mach/coh901318.h +++ b/arch/arm/mach-u300/include/mach/coh901318.h | |||
| @@ -102,22 +102,6 @@ struct coh901318_platform { | |||
| 102 | const int max_channels; | 102 | const int max_channels; |
| 103 | }; | 103 | }; |
| 104 | 104 | ||
| 105 | #ifdef CONFIG_COH901318 | ||
| 106 | /** | ||
| 107 | * coh901318_filter_id() - DMA channel filter function | ||
| 108 | * @chan: dma channel handle | ||
| 109 | * @chan_id: id of dma channel to be filter out | ||
| 110 | * | ||
| 111 | * In dma_request_channel() it specifies what channel id to be requested | ||
| 112 | */ | ||
| 113 | bool coh901318_filter_id(struct dma_chan *chan, void *chan_id); | ||
| 114 | #else | ||
| 115 | static inline bool coh901318_filter_id(struct dma_chan *chan, void *chan_id) | ||
| 116 | { | ||
| 117 | return false; | ||
| 118 | } | ||
| 119 | #endif | ||
| 120 | |||
| 121 | /* | 105 | /* |
| 122 | * DMA Controller - this access the static mappings of the coh901318 dma. | 106 | * DMA Controller - this access the static mappings of the coh901318 dma. |
| 123 | * | 107 | * |
diff --git a/arch/arm/mach-u300/spi.c b/arch/arm/mach-u300/spi.c index 02e6659286d5..b34567f944ca 100644 --- a/arch/arm/mach-u300/spi.c +++ b/arch/arm/mach-u300/spi.c | |||
| @@ -10,9 +10,9 @@ | |||
| 10 | #include <linux/amba/bus.h> | 10 | #include <linux/amba/bus.h> |
| 11 | #include <linux/spi/spi.h> | 11 | #include <linux/spi/spi.h> |
| 12 | #include <linux/amba/pl022.h> | 12 | #include <linux/amba/pl022.h> |
| 13 | #include <linux/platform_data/dma-coh901318.h> | ||
| 13 | #include <linux/err.h> | 14 | #include <linux/err.h> |
| 14 | #include <mach/coh901318.h> | 15 | #include <mach/coh901318.h> |
| 15 | #include "dma_channels.h" | ||
| 16 | 16 | ||
| 17 | /* | 17 | /* |
| 18 | * The following is for the actual devices on the SSP/SPI bus | 18 | * The following is for the actual devices on the SSP/SPI bus |
diff --git a/drivers/dma/coh901318.c b/drivers/dma/coh901318.c index aa384e53b7ac..5fdd38bcda23 100644 --- a/drivers/dma/coh901318.c +++ b/drivers/dma/coh901318.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
| 22 | #include <linux/uaccess.h> | 22 | #include <linux/uaccess.h> |
| 23 | #include <linux/debugfs.h> | 23 | #include <linux/debugfs.h> |
| 24 | #include <linux/platform_data/dma-coh901318.h> | ||
| 24 | #include <mach/coh901318.h> | 25 | #include <mach/coh901318.h> |
| 25 | 26 | ||
| 26 | #include "coh901318_lli.h" | 27 | #include "coh901318_lli.h" |
diff --git a/include/linux/platform_data/dma-coh901318.h b/include/linux/platform_data/dma-coh901318.h new file mode 100644 index 000000000000..c4cb9590d115 --- /dev/null +++ b/include/linux/platform_data/dma-coh901318.h | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | /* | ||
| 2 | * Platform data for the COH901318 DMA controller | ||
| 3 | * Copyright (C) 2007-2013 ST-Ericsson | ||
| 4 | * License terms: GNU General Public License (GPL) version 2 | ||
| 5 | */ | ||
| 6 | |||
| 7 | #ifndef PLAT_COH901318_H | ||
| 8 | #define PLAT_COH901318_H | ||
| 9 | |||
| 10 | #ifdef CONFIG_COH901318 | ||
| 11 | |||
| 12 | /* We only support the U300 DMA channels */ | ||
| 13 | #define U300_DMA_MSL_TX_0 0 | ||
| 14 | #define U300_DMA_MSL_TX_1 1 | ||
| 15 | #define U300_DMA_MSL_TX_2 2 | ||
| 16 | #define U300_DMA_MSL_TX_3 3 | ||
| 17 | #define U300_DMA_MSL_TX_4 4 | ||
| 18 | #define U300_DMA_MSL_TX_5 5 | ||
| 19 | #define U300_DMA_MSL_TX_6 6 | ||
| 20 | #define U300_DMA_MSL_RX_0 7 | ||
| 21 | #define U300_DMA_MSL_RX_1 8 | ||
| 22 | #define U300_DMA_MSL_RX_2 9 | ||
| 23 | #define U300_DMA_MSL_RX_3 10 | ||
| 24 | #define U300_DMA_MSL_RX_4 11 | ||
| 25 | #define U300_DMA_MSL_RX_5 12 | ||
| 26 | #define U300_DMA_MSL_RX_6 13 | ||
| 27 | #define U300_DMA_MMCSD_RX_TX 14 | ||
| 28 | #define U300_DMA_MSPRO_TX 15 | ||
| 29 | #define U300_DMA_MSPRO_RX 16 | ||
| 30 | #define U300_DMA_UART0_TX 17 | ||
| 31 | #define U300_DMA_UART0_RX 18 | ||
| 32 | #define U300_DMA_APEX_TX 19 | ||
| 33 | #define U300_DMA_APEX_RX 20 | ||
| 34 | #define U300_DMA_PCM_I2S0_TX 21 | ||
| 35 | #define U300_DMA_PCM_I2S0_RX 22 | ||
| 36 | #define U300_DMA_PCM_I2S1_TX 23 | ||
| 37 | #define U300_DMA_PCM_I2S1_RX 24 | ||
| 38 | #define U300_DMA_XGAM_CDI 25 | ||
| 39 | #define U300_DMA_XGAM_PDI 26 | ||
| 40 | #define U300_DMA_SPI_TX 27 | ||
| 41 | #define U300_DMA_SPI_RX 28 | ||
| 42 | #define U300_DMA_GENERAL_PURPOSE_0 29 | ||
| 43 | #define U300_DMA_GENERAL_PURPOSE_1 30 | ||
| 44 | #define U300_DMA_GENERAL_PURPOSE_2 31 | ||
| 45 | #define U300_DMA_GENERAL_PURPOSE_3 32 | ||
| 46 | #define U300_DMA_GENERAL_PURPOSE_4 33 | ||
| 47 | #define U300_DMA_GENERAL_PURPOSE_5 34 | ||
| 48 | #define U300_DMA_GENERAL_PURPOSE_6 35 | ||
| 49 | #define U300_DMA_GENERAL_PURPOSE_7 36 | ||
| 50 | #define U300_DMA_GENERAL_PURPOSE_8 37 | ||
| 51 | #define U300_DMA_UART1_TX 38 | ||
| 52 | #define U300_DMA_UART1_RX 39 | ||
| 53 | |||
| 54 | #define U300_DMA_DEVICE_CHANNELS 32 | ||
| 55 | #define U300_DMA_CHANNELS 40 | ||
| 56 | |||
| 57 | /** | ||
| 58 | * coh901318_filter_id() - DMA channel filter function | ||
| 59 | * @chan: dma channel handle | ||
| 60 | * @chan_id: id of dma channel to be filter out | ||
| 61 | * | ||
| 62 | * In dma_request_channel() it specifies what channel id to be requested | ||
| 63 | */ | ||
| 64 | bool coh901318_filter_id(struct dma_chan *chan, void *chan_id); | ||
| 65 | #else | ||
| 66 | static inline bool coh901318_filter_id(struct dma_chan *chan, void *chan_id) | ||
| 67 | { | ||
| 68 | return false; | ||
| 69 | } | ||
| 70 | #endif | ||
| 71 | |||
| 72 | #endif /* PLAT_COH901318_H */ | ||
