javier Martin | fd6a639 | 2009-08-04 17:17:52 +0200 | [diff] [blame^] | 1 | /* |
| 2 | * mx1_mx2-pcm.h :- ASoC platform header for Freescale i.MX1x, i.MX2x |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 as |
| 6 | * published by the Free Software Foundation. |
| 7 | */ |
| 8 | |
| 9 | #ifndef _MXC_PCM_H |
| 10 | #define _MXC_PCM_H |
| 11 | |
| 12 | /* AUDMUX register definitions */ |
| 13 | #define AUDMUX_IO_BASE_ADDR IO_ADDRESS(AUDMUX_BASE_ADDR) |
| 14 | |
| 15 | #define DAM_HPCR1 (*((volatile u32 *)(AUDMUX_IO_BASE_ADDR + 0x00))) |
| 16 | #define DAM_HPCR2 (*((volatile u32 *)(AUDMUX_IO_BASE_ADDR + 0x04))) |
| 17 | #define DAM_HPCR3 (*((volatile u32 *)(AUDMUX_IO_BASE_ADDR + 0x08))) |
| 18 | #define DAM_PPCR1 (*((volatile u32 *)(AUDMUX_IO_BASE_ADDR + 0x10))) |
| 19 | #define DAM_PPCR2 (*((volatile u32 *)(AUDMUX_IO_BASE_ADDR + 0x14))) |
| 20 | #define DAM_PPCR3 (*((volatile u32 *)(AUDMUX_IO_BASE_ADDR + 0x1C))) |
| 21 | |
| 22 | #define AUDMUX_HPCR_TFSDIR (1 << 31) |
| 23 | #define AUDMUX_HPCR_TCLKDIR (1 << 30) |
| 24 | #define AUDMUX_HPCR_TFCSEL(x) (((x) & 0xff) << 26) |
| 25 | #define AUDMUX_HPCR_RXDSEL(x) (((x) & 0x7) << 13) |
| 26 | #define AUDMUX_HPCR_SYN (1 << 12) |
| 27 | |
| 28 | #define AUDMUX_PPCR_TFSDIR (1 << 31) |
| 29 | #define AUDMUX_PPCR_TCLKDIR (1 << 30) |
| 30 | #define AUDMUX_PPCR_TFCSEL(x) (((x) & 0xff) << 26) |
| 31 | #define AUDMUX_PPCR_RXDSEL(x) (((x) & 0x7) << 13) |
| 32 | #define AUDMUX_PPCR_SYN (1 << 12) |
| 33 | |
| 34 | /* DMA information for mx1_mx2 platforms */ |
| 35 | struct mx1_mx2_pcm_dma_params { |
| 36 | char *name; /* stream identifier */ |
| 37 | unsigned int transfer_type; /* READ or WRITE DMA transfer */ |
| 38 | dma_addr_t per_address; /* physical address of SSI fifo */ |
| 39 | int event_id; /* fixed DMA number for SSI fifo */ |
| 40 | int watermark_level; /* SSI fifo watermark level */ |
| 41 | int per_config; /* DMA Config flags for peripheral */ |
| 42 | int mem_config; /* DMA Config flags for RAM */ |
| 43 | }; |
| 44 | |
| 45 | /* platform data */ |
| 46 | extern struct snd_soc_platform mx1_mx2_soc_platform; |
| 47 | |
| 48 | #endif |