aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/include/mach
diff options
context:
space:
mode:
authorChaithrika U S <chaithrika@ti.com>2009-06-05 06:28:08 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2009-08-26 03:57:00 -0400
commit25acf553aeed86f93f2cf39227b59fc6eb3e8c78 (patch)
tree39ad69bf9d160bac7e2d890fc1b4b0f82e8bcb85 /arch/arm/mach-davinci/include/mach
parent7a36071e7954836ba437987e5ca4ced174462b28 (diff)
davinci: ASoC: Add the platform devices for ASP
1) Registers the platform devices for ASP on dm355, dm644x and dm646x so that the machine driver can probe to get ASP related platform data. 2) Move towards definition of the asp clocks using physical name(for dm355 and dm644x) 3) Add platform data to board specific files. Signed-off-by: Naresh Medisetty <naresh@ti.com> Signed-off-by: Chaithrika U S <chaithrika@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/include/mach')
-rw-r--r--arch/arm/mach-davinci/include/mach/asp.h35
-rw-r--r--arch/arm/mach-davinci/include/mach/dm355.h5
-rw-r--r--arch/arm/mach-davinci/include/mach/dm644x.h2
-rw-r--r--arch/arm/mach-davinci/include/mach/dm646x.h3
4 files changed, 43 insertions, 2 deletions
diff --git a/arch/arm/mach-davinci/include/mach/asp.h b/arch/arm/mach-davinci/include/mach/asp.h
index e0abc437d796..038ecb7c231b 100644
--- a/arch/arm/mach-davinci/include/mach/asp.h
+++ b/arch/arm/mach-davinci/include/mach/asp.h
@@ -5,21 +5,52 @@
5#define __ASM_ARCH_DAVINCI_ASP_H 5#define __ASM_ARCH_DAVINCI_ASP_H
6 6
7#include <mach/irqs.h> 7#include <mach/irqs.h>
8#include <mach/edma.h>
8 9
9/* Bases of register banks */ 10/* Bases of dm644x and dm355 register banks */
10#define DAVINCI_ASP0_BASE 0x01E02000 11#define DAVINCI_ASP0_BASE 0x01E02000
11#define DAVINCI_ASP1_BASE 0x01E04000 12#define DAVINCI_ASP1_BASE 0x01E04000
12 13
13/* EDMA channels */ 14/* Bases of dm646x register banks */
15#define DAVINCI_DM646X_MCASP0_REG_BASE 0x01D01000
16#define DAVINCI_DM646X_MCASP1_REG_BASE 0x01D01800
17
18/* EDMA channels of dm644x and dm355 */
14#define DAVINCI_DMA_ASP0_TX 2 19#define DAVINCI_DMA_ASP0_TX 2
15#define DAVINCI_DMA_ASP0_RX 3 20#define DAVINCI_DMA_ASP0_RX 3
16#define DAVINCI_DMA_ASP1_TX 8 21#define DAVINCI_DMA_ASP1_TX 8
17#define DAVINCI_DMA_ASP1_RX 9 22#define DAVINCI_DMA_ASP1_RX 9
18 23
24/* EDMA channels of dm646x */
25#define DAVINCI_DM646X_DMA_MCASP0_AXEVT0 6
26#define DAVINCI_DM646X_DMA_MCASP0_AREVT0 9
27#define DAVINCI_DM646X_DMA_MCASP1_AXEVT1 12
28
19/* Interrupts */ 29/* Interrupts */
20#define DAVINCI_ASP0_RX_INT IRQ_MBRINT 30#define DAVINCI_ASP0_RX_INT IRQ_MBRINT
21#define DAVINCI_ASP0_TX_INT IRQ_MBXINT 31#define DAVINCI_ASP0_TX_INT IRQ_MBXINT
22#define DAVINCI_ASP1_RX_INT IRQ_MBRINT 32#define DAVINCI_ASP1_RX_INT IRQ_MBRINT
23#define DAVINCI_ASP1_TX_INT IRQ_MBXINT 33#define DAVINCI_ASP1_TX_INT IRQ_MBXINT
24 34
35struct snd_platform_data {
36 char *clk_name;
37 u32 tx_dma_offset;
38 u32 rx_dma_offset;
39 enum dma_event_q eventq_no; /* event queue number */
40 unsigned int codec_fmt;
41
42 /* McASP specific fields */
43 int tdm_slots;
44 u8 op_mode;
45 u8 num_serializer;
46 u8 *serial_dir;
47};
48
49#define INACTIVE_MODE 0
50#define TX_MODE 1
51#define RX_MODE 2
52
53#define DAVINCI_MCASP_IIS_MODE 0
54#define DAVINCI_MCASP_DIT_MODE 1
55
25#endif /* __ASM_ARCH_DAVINCI_ASP_H */ 56#endif /* __ASM_ARCH_DAVINCI_ASP_H */
diff --git a/arch/arm/mach-davinci/include/mach/dm355.h b/arch/arm/mach-davinci/include/mach/dm355.h
index 54903b72438e..03faaef95a9a 100644
--- a/arch/arm/mach-davinci/include/mach/dm355.h
+++ b/arch/arm/mach-davinci/include/mach/dm355.h
@@ -12,11 +12,16 @@
12#define __ASM_ARCH_DM355_H 12#define __ASM_ARCH_DM355_H
13 13
14#include <mach/hardware.h> 14#include <mach/hardware.h>
15#include <mach/asp.h>
16
17#define ASP1_TX_EVT_EN 1
18#define ASP1_RX_EVT_EN 2
15 19
16struct spi_board_info; 20struct spi_board_info;
17 21
18void __init dm355_init(void); 22void __init dm355_init(void);
19void dm355_init_spi0(unsigned chipselect_mask, 23void dm355_init_spi0(unsigned chipselect_mask,
20 struct spi_board_info *info, unsigned len); 24 struct spi_board_info *info, unsigned len);
25void __init dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata);
21 26
22#endif /* __ASM_ARCH_DM355_H */ 27#endif /* __ASM_ARCH_DM355_H */
diff --git a/arch/arm/mach-davinci/include/mach/dm644x.h b/arch/arm/mach-davinci/include/mach/dm644x.h
index 15d42b92a8c9..8b157ceec0ca 100644
--- a/arch/arm/mach-davinci/include/mach/dm644x.h
+++ b/arch/arm/mach-davinci/include/mach/dm644x.h
@@ -25,6 +25,7 @@
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26#include <mach/hardware.h> 26#include <mach/hardware.h>
27#include <mach/emac.h> 27#include <mach/emac.h>
28#include <mach/asp.h>
28 29
29#define DM644X_EMAC_BASE (0x01C80000) 30#define DM644X_EMAC_BASE (0x01C80000)
30#define DM644X_EMAC_CNTRL_OFFSET (0x0000) 31#define DM644X_EMAC_CNTRL_OFFSET (0x0000)
@@ -34,5 +35,6 @@
34#define DM644X_EMAC_CNTRL_RAM_SIZE (0x2000) 35#define DM644X_EMAC_CNTRL_RAM_SIZE (0x2000)
35 36
36void __init dm644x_init(void); 37void __init dm644x_init(void);
38void __init dm644x_init_asp(struct snd_platform_data *pdata);
37 39
38#endif /* __ASM_ARCH_DM644X_H */ 40#endif /* __ASM_ARCH_DM644X_H */
diff --git a/arch/arm/mach-davinci/include/mach/dm646x.h b/arch/arm/mach-davinci/include/mach/dm646x.h
index 1fc764c8646e..05854846242a 100644
--- a/arch/arm/mach-davinci/include/mach/dm646x.h
+++ b/arch/arm/mach-davinci/include/mach/dm646x.h
@@ -13,6 +13,7 @@
13 13
14#include <mach/hardware.h> 14#include <mach/hardware.h>
15#include <mach/emac.h> 15#include <mach/emac.h>
16#include <mach/asp.h>
16 17
17#define DM646X_EMAC_BASE (0x01C80000) 18#define DM646X_EMAC_BASE (0x01C80000)
18#define DM646X_EMAC_CNTRL_OFFSET (0x0000) 19#define DM646X_EMAC_CNTRL_OFFSET (0x0000)
@@ -22,5 +23,7 @@
22#define DM646X_EMAC_CNTRL_RAM_SIZE (0x2000) 23#define DM646X_EMAC_CNTRL_RAM_SIZE (0x2000)
23 24
24void __init dm646x_init(void); 25void __init dm646x_init(void);
26void __init dm646x_init_mcasp0(struct snd_platform_data *pdata);
27void __init dm646x_init_mcasp1(struct snd_platform_data *pdata);
25 28
26#endif /* __ASM_ARCH_DM646X_H */ 29#endif /* __ASM_ARCH_DM646X_H */