diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-omap/include/plat/mcbsp.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/mcbsp.c | 14 |
2 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h index 975744f10a58..b4ff6a11a8f2 100644 --- a/arch/arm/plat-omap/include/plat/mcbsp.h +++ b/arch/arm/plat-omap/include/plat/mcbsp.h | |||
@@ -473,6 +473,7 @@ void omap_mcbsp_set_tx_threshold(unsigned int id, u16 threshold); | |||
473 | void omap_mcbsp_set_rx_threshold(unsigned int id, u16 threshold); | 473 | void omap_mcbsp_set_rx_threshold(unsigned int id, u16 threshold); |
474 | u16 omap_mcbsp_get_max_tx_threshold(unsigned int id); | 474 | u16 omap_mcbsp_get_max_tx_threshold(unsigned int id); |
475 | u16 omap_mcbsp_get_max_rx_threshold(unsigned int id); | 475 | u16 omap_mcbsp_get_max_rx_threshold(unsigned int id); |
476 | u16 omap_mcbsp_get_fifo_size(unsigned int id); | ||
476 | u16 omap_mcbsp_get_tx_delay(unsigned int id); | 477 | u16 omap_mcbsp_get_tx_delay(unsigned int id); |
477 | u16 omap_mcbsp_get_rx_delay(unsigned int id); | 478 | u16 omap_mcbsp_get_rx_delay(unsigned int id); |
478 | int omap_mcbsp_get_dma_op_mode(unsigned int id); | 479 | int omap_mcbsp_get_dma_op_mode(unsigned int id); |
@@ -483,6 +484,7 @@ static inline void omap_mcbsp_set_rx_threshold(unsigned int id, u16 threshold) | |||
483 | { } | 484 | { } |
484 | static inline u16 omap_mcbsp_get_max_tx_threshold(unsigned int id) { return 0; } | 485 | static inline u16 omap_mcbsp_get_max_tx_threshold(unsigned int id) { return 0; } |
485 | static inline u16 omap_mcbsp_get_max_rx_threshold(unsigned int id) { return 0; } | 486 | static inline u16 omap_mcbsp_get_max_rx_threshold(unsigned int id) { return 0; } |
487 | static inline u16 omap_mcbsp_get_fifo_size(unsigned int id) { return 0; } | ||
486 | static inline u16 omap_mcbsp_get_tx_delay(unsigned int id) { return 0; } | 488 | static inline u16 omap_mcbsp_get_tx_delay(unsigned int id) { return 0; } |
487 | static inline u16 omap_mcbsp_get_rx_delay(unsigned int id) { return 0; } | 489 | static inline u16 omap_mcbsp_get_rx_delay(unsigned int id) { return 0; } |
488 | static inline int omap_mcbsp_get_dma_op_mode(unsigned int id) { return 0; } | 490 | static inline int omap_mcbsp_get_dma_op_mode(unsigned int id) { return 0; } |
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index 7e669c9744d8..8bab0b28b7a3 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c | |||
@@ -560,6 +560,20 @@ u16 omap_mcbsp_get_max_rx_threshold(unsigned int id) | |||
560 | } | 560 | } |
561 | EXPORT_SYMBOL(omap_mcbsp_get_max_rx_threshold); | 561 | EXPORT_SYMBOL(omap_mcbsp_get_max_rx_threshold); |
562 | 562 | ||
563 | u16 omap_mcbsp_get_fifo_size(unsigned int id) | ||
564 | { | ||
565 | struct omap_mcbsp *mcbsp; | ||
566 | |||
567 | if (!omap_mcbsp_check_valid_id(id)) { | ||
568 | printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1); | ||
569 | return -ENODEV; | ||
570 | } | ||
571 | mcbsp = id_to_mcbsp_ptr(id); | ||
572 | |||
573 | return mcbsp->pdata->buffer_size; | ||
574 | } | ||
575 | EXPORT_SYMBOL(omap_mcbsp_get_fifo_size); | ||
576 | |||
563 | #define MCBSP2_FIFO_SIZE 0x500 /* 1024 + 256 locations */ | 577 | #define MCBSP2_FIFO_SIZE 0x500 /* 1024 + 256 locations */ |
564 | #define MCBSP1345_FIFO_SIZE 0x80 /* 128 locations */ | 578 | #define MCBSP1345_FIFO_SIZE 0x80 /* 128 locations */ |
565 | /* | 579 | /* |