aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-omap/include')
-rw-r--r--arch/arm/plat-omap/include/plat/mcbsp.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h
index 886d0e610aa7..4da6f94ae8e8 100644
--- a/arch/arm/plat-omap/include/plat/mcbsp.h
+++ b/arch/arm/plat-omap/include/plat/mcbsp.h
@@ -320,6 +320,10 @@
320#define FSR_SRC_FSR 0 320#define FSR_SRC_FSR 0
321#define FSR_SRC_FSX 1 321#define FSR_SRC_FSX 1
322 322
323/* McBSP functional clock sources */
324#define MCBSP_CLKS_PAD_SRC 0
325#define MCBSP_CLKS_PRCM_SRC 1
326
323/* we don't do multichannel for now */ 327/* we don't do multichannel for now */
324struct omap_mcbsp_reg_cfg { 328struct omap_mcbsp_reg_cfg {
325 u16 spcr2; 329 u16 spcr2;
@@ -406,6 +410,7 @@ struct omap_mcbsp_spi_cfg {
406struct omap_mcbsp_ops { 410struct omap_mcbsp_ops {
407 void (*request)(unsigned int); 411 void (*request)(unsigned int);
408 void (*free)(unsigned int); 412 void (*free)(unsigned int);
413 int (*set_clks_src)(u8, u8);
409}; 414};
410 415
411struct omap_mcbsp_platform_data { 416struct omap_mcbsp_platform_data {
@@ -472,6 +477,9 @@ struct omap_mcbsp {
472extern struct omap_mcbsp **mcbsp_ptr; 477extern struct omap_mcbsp **mcbsp_ptr;
473extern int omap_mcbsp_count, omap_mcbsp_cache_size; 478extern int omap_mcbsp_count, omap_mcbsp_cache_size;
474 479
480#define omap_mcbsp_check_valid_id(id) (id < omap_mcbsp_count)
481#define id_to_mcbsp_ptr(id) mcbsp_ptr[id];
482
475int omap_mcbsp_init(void); 483int omap_mcbsp_init(void);
476void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config, 484void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,
477 int size); 485 int size);
@@ -509,6 +517,9 @@ int omap_mcbsp_recv_buffer(unsigned int id, dma_addr_t buffer, unsigned int leng
509int omap_mcbsp_spi_master_xmit_word_poll(unsigned int id, u32 word); 517int omap_mcbsp_spi_master_xmit_word_poll(unsigned int id, u32 word);
510int omap_mcbsp_spi_master_recv_word_poll(unsigned int id, u32 * word); 518int omap_mcbsp_spi_master_recv_word_poll(unsigned int id, u32 * word);
511 519
520
521/* McBSP functional clock source changing function */
522extern int omap2_mcbsp_set_clks_src(u8 id, u8 fck_src_id);
512/* SPI specific API */ 523/* SPI specific API */
513void omap_mcbsp_set_spi_mode(unsigned int id, const struct omap_mcbsp_spi_cfg * spi_cfg); 524void omap_mcbsp_set_spi_mode(unsigned int id, const struct omap_mcbsp_spi_cfg * spi_cfg);
514 525