diff options
| author | Gerald Baeza <gerald.baeza@stericsson.com> | 2012-09-21 15:21:37 -0400 |
|---|---|---|
| committer | Fabio Baltieri <fabio.baltieri@linaro.org> | 2013-01-14 04:50:44 -0500 |
| commit | 47db92f4a63499b1605b4c66f9347ba5479e7b19 (patch) | |
| tree | a3e9510a1b3cec21147f11641f09bd984c2afb0a /include/linux/platform_data | |
| parent | f000df8c5a0e2002acc5989aad99a97d32a24718 (diff) | |
dmaengine: ste_dma40: physical channels number correction
DMAC_ICFG[0:2]=SCHNB only allows to count 'multiple of 4' physical
channels so it was ok with platforms having 8 channels but cannot be
used for next versions (with 10 or 14 channels). This patch allows to
provide the number of physical channels for a DMA device via
platform_data, or still rely on SCHNB if platform_data announces 0
channel.
Signed-off-by: Gerald Baeza <gerald.baeza@stericsson.com>
Reviewed-by: Per Forlin <per.forlin@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Diffstat (limited to 'include/linux/platform_data')
| -rw-r--r-- | include/linux/platform_data/dma-ste-dma40.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/platform_data/dma-ste-dma40.h b/include/linux/platform_data/dma-ste-dma40.h index 9ff93b065686..833cb959f3df 100644 --- a/include/linux/platform_data/dma-ste-dma40.h +++ b/include/linux/platform_data/dma-ste-dma40.h | |||
| @@ -147,6 +147,9 @@ struct stedma40_chan_cfg { | |||
| 147 | * @memcpy_conf_log: default configuration of logical channel memcpy | 147 | * @memcpy_conf_log: default configuration of logical channel memcpy |
| 148 | * @disabled_channels: A vector, ending with -1, that marks physical channels | 148 | * @disabled_channels: A vector, ending with -1, that marks physical channels |
| 149 | * that are for different reasons not available for the driver. | 149 | * that are for different reasons not available for the driver. |
| 150 | * @num_of_phy_chans: The number of physical channels implemented in HW. | ||
| 151 | * 0 means reading the number of channels from DMA HW but this is only valid | ||
| 152 | * for 'multiple of 4' channels, like 8. | ||
| 150 | */ | 153 | */ |
| 151 | struct stedma40_platform_data { | 154 | struct stedma40_platform_data { |
| 152 | u32 dev_len; | 155 | u32 dev_len; |
| @@ -158,6 +161,7 @@ struct stedma40_platform_data { | |||
| 158 | struct stedma40_chan_cfg *memcpy_conf_log; | 161 | struct stedma40_chan_cfg *memcpy_conf_log; |
| 159 | int disabled_channels[STEDMA40_MAX_PHYS]; | 162 | int disabled_channels[STEDMA40_MAX_PHYS]; |
| 160 | bool use_esram_lcla; | 163 | bool use_esram_lcla; |
| 164 | int num_of_phy_chans; | ||
| 161 | }; | 165 | }; |
| 162 | 166 | ||
| 163 | #ifdef CONFIG_STE_DMA40 | 167 | #ifdef CONFIG_STE_DMA40 |
