diff options
Diffstat (limited to 'arch/arm/plat-omap/include/plat/mcbsp.h')
-rw-r--r-- | arch/arm/plat-omap/include/plat/mcbsp.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h index 5b20103e68eb..b87d83ccd545 100644 --- a/arch/arm/plat-omap/include/plat/mcbsp.h +++ b/arch/arm/plat-omap/include/plat/mcbsp.h | |||
@@ -319,6 +319,18 @@ static struct platform_device omap_mcbsp##port_nr = { \ | |||
319 | #define RFSREN 0x0002 | 319 | #define RFSREN 0x0002 |
320 | #define RSYNCERREN 0x0001 | 320 | #define RSYNCERREN 0x0001 |
321 | 321 | ||
322 | /* CLKR signal muxing options */ | ||
323 | #define CLKR_SRC_CLKR 0 | ||
324 | #define CLKR_SRC_CLKX 1 | ||
325 | |||
326 | /* FSR signal muxing options */ | ||
327 | #define FSR_SRC_FSR 0 | ||
328 | #define FSR_SRC_FSX 1 | ||
329 | |||
330 | /* McBSP functional clock sources */ | ||
331 | #define MCBSP_CLKS_PRCM_SRC 0 | ||
332 | #define MCBSP_CLKS_PAD_SRC 1 | ||
333 | |||
322 | /* we don't do multichannel for now */ | 334 | /* we don't do multichannel for now */ |
323 | struct omap_mcbsp_reg_cfg { | 335 | struct omap_mcbsp_reg_cfg { |
324 | u16 spcr2; | 336 | u16 spcr2; |
@@ -405,6 +417,7 @@ struct omap_mcbsp_spi_cfg { | |||
405 | struct omap_mcbsp_ops { | 417 | struct omap_mcbsp_ops { |
406 | void (*request)(unsigned int); | 418 | void (*request)(unsigned int); |
407 | void (*free)(unsigned int); | 419 | void (*free)(unsigned int); |
420 | int (*set_clks_src)(u8, u8); | ||
408 | }; | 421 | }; |
409 | 422 | ||
410 | struct omap_mcbsp_platform_data { | 423 | struct omap_mcbsp_platform_data { |
@@ -471,6 +484,9 @@ struct omap_mcbsp { | |||
471 | extern struct omap_mcbsp **mcbsp_ptr; | 484 | extern struct omap_mcbsp **mcbsp_ptr; |
472 | extern int omap_mcbsp_count, omap_mcbsp_cache_size; | 485 | extern int omap_mcbsp_count, omap_mcbsp_cache_size; |
473 | 486 | ||
487 | #define omap_mcbsp_check_valid_id(id) (id < omap_mcbsp_count) | ||
488 | #define id_to_mcbsp_ptr(id) mcbsp_ptr[id]; | ||
489 | |||
474 | int omap_mcbsp_init(void); | 490 | int omap_mcbsp_init(void); |
475 | void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config, | 491 | void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config, |
476 | int size); | 492 | int size); |
@@ -509,6 +525,8 @@ int omap_mcbsp_spi_master_xmit_word_poll(unsigned int id, u32 word); | |||
509 | int omap_mcbsp_spi_master_recv_word_poll(unsigned int id, u32 * word); | 525 | int omap_mcbsp_spi_master_recv_word_poll(unsigned int id, u32 * word); |
510 | 526 | ||
511 | 527 | ||
528 | /* McBSP functional clock source changing function */ | ||
529 | extern int omap2_mcbsp_set_clks_src(u8 id, u8 fck_src_id); | ||
512 | /* SPI specific API */ | 530 | /* SPI specific API */ |
513 | void omap_mcbsp_set_spi_mode(unsigned int id, const struct omap_mcbsp_spi_cfg * spi_cfg); | 531 | void omap_mcbsp_set_spi_mode(unsigned int id, const struct omap_mcbsp_spi_cfg * spi_cfg); |
514 | 532 | ||
@@ -517,6 +535,10 @@ int omap_mcbsp_pollread(unsigned int id, u16 * buf); | |||
517 | int omap_mcbsp_pollwrite(unsigned int id, u16 buf); | 535 | int omap_mcbsp_pollwrite(unsigned int id, u16 buf); |
518 | int omap_mcbsp_set_io_type(unsigned int id, omap_mcbsp_io_type_t io_type); | 536 | int omap_mcbsp_set_io_type(unsigned int id, omap_mcbsp_io_type_t io_type); |
519 | 537 | ||
538 | /* McBSP signal muxing API */ | ||
539 | void omap2_mcbsp1_mux_clkr_src(u8 mux); | ||
540 | void omap2_mcbsp1_mux_fsr_src(u8 mux); | ||
541 | |||
520 | #ifdef CONFIG_ARCH_OMAP3 | 542 | #ifdef CONFIG_ARCH_OMAP3 |
521 | /* Sidetone specific API */ | 543 | /* Sidetone specific API */ |
522 | int omap_st_set_chgain(unsigned int id, int channel, s16 chgain); | 544 | int omap_st_set_chgain(unsigned int id, int channel, s16 chgain); |