diff options
author | Eduardo Valentin <eduardo.valentin@nokia.com> | 2009-08-20 09:18:11 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-08-20 15:10:26 -0400 |
commit | a1a56f5faa41327116bf960a8e79f21a8ea35dce (patch) | |
tree | ca6e8fba492f5a3caddf421d0c4f573d863bef99 /arch/arm/plat-omap/include/mach/mcbsp.h | |
parent | 7aa9ff56cae7a6a4fa2e1a503cc5f8bbd887d6e3 (diff) |
OMAP: McBSP: Create and export max_(r|t)x_thres property
This patch export through sysfs two properties to configure
maximum threshold for transmission and reception on each
mcbsp instance. Also, it exports two helper functions to
allow mcbsp users to read this values.
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 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/mach/mcbsp.h b/arch/arm/plat-omap/include/mach/mcbsp.h index 2544aa5bccd3..832330d7cb39 100644 --- a/arch/arm/plat-omap/include/mach/mcbsp.h +++ b/arch/arm/plat-omap/include/mach/mcbsp.h | |||
@@ -348,6 +348,9 @@ struct omap_mcbsp_platform_data { | |||
348 | u8 dma_rx_sync, dma_tx_sync; | 348 | u8 dma_rx_sync, dma_tx_sync; |
349 | u16 rx_irq, tx_irq; | 349 | u16 rx_irq, tx_irq; |
350 | struct omap_mcbsp_ops *ops; | 350 | struct omap_mcbsp_ops *ops; |
351 | #ifdef CONFIG_ARCH_OMAP34XX | ||
352 | u16 buffer_size; | ||
353 | #endif | ||
351 | }; | 354 | }; |
352 | 355 | ||
353 | struct omap_mcbsp { | 356 | struct omap_mcbsp { |
@@ -381,6 +384,10 @@ struct omap_mcbsp { | |||
381 | struct omap_mcbsp_platform_data *pdata; | 384 | struct omap_mcbsp_platform_data *pdata; |
382 | struct clk *iclk; | 385 | struct clk *iclk; |
383 | struct clk *fclk; | 386 | struct clk *fclk; |
387 | #ifdef CONFIG_ARCH_OMAP34XX | ||
388 | u16 max_tx_thres; | ||
389 | u16 max_rx_thres; | ||
390 | #endif | ||
384 | }; | 391 | }; |
385 | extern struct omap_mcbsp **mcbsp_ptr; | 392 | extern struct omap_mcbsp **mcbsp_ptr; |
386 | extern int omap_mcbsp_count; | 393 | extern int omap_mcbsp_count; |
@@ -392,11 +399,15 @@ void omap_mcbsp_config(unsigned int id, const struct omap_mcbsp_reg_cfg * config | |||
392 | #ifdef CONFIG_ARCH_OMAP34XX | 399 | #ifdef CONFIG_ARCH_OMAP34XX |
393 | void omap_mcbsp_set_tx_threshold(unsigned int id, u16 threshold); | 400 | void omap_mcbsp_set_tx_threshold(unsigned int id, u16 threshold); |
394 | void omap_mcbsp_set_rx_threshold(unsigned int id, u16 threshold); | 401 | void omap_mcbsp_set_rx_threshold(unsigned int id, u16 threshold); |
402 | u16 omap_mcbsp_get_max_tx_threshold(unsigned int id); | ||
403 | u16 omap_mcbsp_get_max_rx_threshold(unsigned int id); | ||
395 | #else | 404 | #else |
396 | static inline void omap_mcbsp_set_tx_threshold(unsigned int id, u16 threshold) | 405 | static inline void omap_mcbsp_set_tx_threshold(unsigned int id, u16 threshold) |
397 | { } | 406 | { } |
398 | static inline void omap_mcbsp_set_rx_threshold(unsigned int id, u16 threshold) | 407 | static inline void omap_mcbsp_set_rx_threshold(unsigned int id, u16 threshold) |
399 | { } | 408 | { } |
409 | 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; } | ||
400 | #endif | 411 | #endif |
401 | int omap_mcbsp_request(unsigned int id); | 412 | int omap_mcbsp_request(unsigned int id); |
402 | void omap_mcbsp_free(unsigned int id); | 413 | void omap_mcbsp_free(unsigned int id); |