diff options
author | Peter Ujfalusi <peter.ujfalusi@nokia.com> | 2009-08-20 09:18:14 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-08-20 15:10:27 -0400 |
commit | 98cb20e88957faf9c99e194242caac7f55dd47e4 (patch) | |
tree | e87f54f9cf9cba27a88711d336d4f4b6bdb3b396 /arch/arm/plat-omap/include/mach/mcbsp.h | |
parent | 4c8200aeb04b8aeaf8c7425f49caf761e2cda95a (diff) |
OMAP: McBSP: Add link DMA mode selection
It adds a new sysfs file, where the user can configure the mcbsp mode to use.
If the mcbsp channel is in use, it does not allow the change.
Than in omap_pcm_open we can call the omap_mcbsp_get_opmode to get the mode,
store it, than use it to implement the different modes.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'arch/arm/plat-omap/include/mach/mcbsp.h')
-rw-r--r-- | arch/arm/plat-omap/include/mach/mcbsp.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/mach/mcbsp.h b/arch/arm/plat-omap/include/mach/mcbsp.h index 832330d7cb39..bd5b759991c8 100644 --- a/arch/arm/plat-omap/include/mach/mcbsp.h +++ b/arch/arm/plat-omap/include/mach/mcbsp.h | |||
@@ -255,6 +255,11 @@ | |||
255 | /********************** McBSP SYSCONFIG bit definitions ********************/ | 255 | /********************** McBSP SYSCONFIG bit definitions ********************/ |
256 | #define SOFTRST 0x0002 | 256 | #define SOFTRST 0x0002 |
257 | 257 | ||
258 | /********************** McBSP DMA operating modes **************************/ | ||
259 | #define MCBSP_DMA_MODE_ELEMENT 0 | ||
260 | #define MCBSP_DMA_MODE_THRESHOLD 1 | ||
261 | #define MCBSP_DMA_MODE_FRAME 2 | ||
262 | |||
258 | /* we don't do multichannel for now */ | 263 | /* we don't do multichannel for now */ |
259 | struct omap_mcbsp_reg_cfg { | 264 | struct omap_mcbsp_reg_cfg { |
260 | u16 spcr2; | 265 | u16 spcr2; |
@@ -385,6 +390,7 @@ struct omap_mcbsp { | |||
385 | struct clk *iclk; | 390 | struct clk *iclk; |
386 | struct clk *fclk; | 391 | struct clk *fclk; |
387 | #ifdef CONFIG_ARCH_OMAP34XX | 392 | #ifdef CONFIG_ARCH_OMAP34XX |
393 | int dma_op_mode; | ||
388 | u16 max_tx_thres; | 394 | u16 max_tx_thres; |
389 | u16 max_rx_thres; | 395 | u16 max_rx_thres; |
390 | #endif | 396 | #endif |
@@ -401,6 +407,7 @@ void omap_mcbsp_set_tx_threshold(unsigned int id, u16 threshold); | |||
401 | void omap_mcbsp_set_rx_threshold(unsigned int id, u16 threshold); | 407 | void omap_mcbsp_set_rx_threshold(unsigned int id, u16 threshold); |
402 | u16 omap_mcbsp_get_max_tx_threshold(unsigned int id); | 408 | u16 omap_mcbsp_get_max_tx_threshold(unsigned int id); |
403 | u16 omap_mcbsp_get_max_rx_threshold(unsigned int id); | 409 | u16 omap_mcbsp_get_max_rx_threshold(unsigned int id); |
410 | int omap_mcbsp_get_dma_op_mode(unsigned int id); | ||
404 | #else | 411 | #else |
405 | static inline void omap_mcbsp_set_tx_threshold(unsigned int id, u16 threshold) | 412 | static inline void omap_mcbsp_set_tx_threshold(unsigned int id, u16 threshold) |
406 | { } | 413 | { } |
@@ -408,6 +415,7 @@ static inline void omap_mcbsp_set_rx_threshold(unsigned int id, u16 threshold) | |||
408 | { } | 415 | { } |
409 | static inline u16 omap_mcbsp_get_max_tx_threshold(unsigned int id) { return 0; } | 416 | static inline u16 omap_mcbsp_get_max_tx_threshold(unsigned int id) { return 0; } |
410 | static inline u16 omap_mcbsp_get_max_rx_threshold(unsigned int id) { return 0; } | 417 | static inline u16 omap_mcbsp_get_max_rx_threshold(unsigned int id) { return 0; } |
418 | static inline int omap_mcbsp_get_dma_op_mode(unsigned int id) { return 0; } | ||
411 | #endif | 419 | #endif |
412 | int omap_mcbsp_request(unsigned int id); | 420 | int omap_mcbsp_request(unsigned int id); |
413 | void omap_mcbsp_free(unsigned int id); | 421 | void omap_mcbsp_free(unsigned int id); |