diff options
author | Markus Pargmann <mpa@pengutronix.de> | 2013-12-20 08:11:32 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-01-08 12:20:32 -0500 |
commit | bd3ca7d1b8ee0dcd502c8c15d1cf741bc165722f (patch) | |
tree | d3958de2b55aa67b379c2366128a65e9065a9946 /sound/soc/fsl/fsl_ssi.c | |
parent | 0888efd166fa99b733b0b68e70d2fb3c3c7684ec (diff) |
ASoC: fsl-ssi: Add offline_config flag
imx50-ssi and later versions of this IP support online reconfiguration
of all registers. The reference manual does not list any registers that
can only be configured while the SSI unit is disabled. This patch
introduces the flag for later use.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/fsl/fsl_ssi.c')
-rw-r--r-- | sound/soc/fsl/fsl_ssi.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index bc904696d820..d0b9fe31f49a 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c | |||
@@ -159,6 +159,7 @@ struct fsl_ssi_private { | |||
159 | bool use_dma; | 159 | bool use_dma; |
160 | bool baudclk_locked; | 160 | bool baudclk_locked; |
161 | bool irq_stats; | 161 | bool irq_stats; |
162 | bool offline_config; | ||
162 | u8 i2s_mode; | 163 | u8 i2s_mode; |
163 | spinlock_t baudclk_lock; | 164 | spinlock_t baudclk_lock; |
164 | struct clk *baudclk; | 165 | struct clk *baudclk; |
@@ -1251,6 +1252,32 @@ static int fsl_ssi_probe(struct platform_device *pdev) | |||
1251 | ssi_private->baudclk_locked = false; | 1252 | ssi_private->baudclk_locked = false; |
1252 | spin_lock_init(&ssi_private->baudclk_lock); | 1253 | spin_lock_init(&ssi_private->baudclk_lock); |
1253 | 1254 | ||
1255 | /* | ||
1256 | * imx51 and later SoCs have a slightly different IP that allows the | ||
1257 | * SSI configuration while the SSI unit is running. | ||
1258 | * | ||
1259 | * More important, it is necessary on those SoCs to configure the | ||
1260 | * sperate TX/RX DMA bits just before starting the stream | ||
1261 | * (fsl_ssi_trigger). The SDMA unit has to be configured before fsl_ssi | ||
1262 | * sends any DMA requests to the SDMA unit, otherwise it is not defined | ||
1263 | * how the SDMA unit handles the DMA request. | ||
1264 | * | ||
1265 | * SDMA units are present on devices starting at imx35 but the imx35 | ||
1266 | * reference manual states that the DMA bits should not be changed | ||
1267 | * while the SSI unit is running (SSIEN). So we support the necessary | ||
1268 | * online configuration of fsl-ssi starting at imx51. | ||
1269 | */ | ||
1270 | switch (hw_type) { | ||
1271 | case FSL_SSI_MCP8610: | ||
1272 | case FSL_SSI_MX21: | ||
1273 | case FSL_SSI_MX35: | ||
1274 | ssi_private->offline_config = true; | ||
1275 | break; | ||
1276 | case FSL_SSI_MX51: | ||
1277 | ssi_private->offline_config = false; | ||
1278 | break; | ||
1279 | } | ||
1280 | |||
1254 | if (hw_type == FSL_SSI_MX21 || hw_type == FSL_SSI_MX51 || | 1281 | if (hw_type == FSL_SSI_MX21 || hw_type == FSL_SSI_MX51 || |
1255 | hw_type == FSL_SSI_MX35) { | 1282 | hw_type == FSL_SSI_MX35) { |
1256 | u32 dma_events[2]; | 1283 | u32 dma_events[2]; |