diff options
-rw-r--r-- | arch/arm/mach-davinci/asp.h | 49 | ||||
-rw-r--r-- | arch/arm/mach-davinci/davinci.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-davinci/devices-da8xx.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-davinci/dm355.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-davinci/dm365.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-davinci/dm644x.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-davinci/dm646x.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/da8xx.h | 2 | ||||
-rw-r--r-- | include/linux/platform_data/davinci_asp.h (renamed from arch/arm/mach-davinci/include/mach/asp.h) | 73 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-evm.c | 3 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-i2s.c | 3 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-mcasp.h | 3 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-pcm.c | 1 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-pcm.h | 3 |
14 files changed, 81 insertions, 68 deletions
diff --git a/arch/arm/mach-davinci/asp.h b/arch/arm/mach-davinci/asp.h new file mode 100644 index 000000000000..d9b2acd12393 --- /dev/null +++ b/arch/arm/mach-davinci/asp.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * TI DaVinci Audio definitions | ||
3 | */ | ||
4 | #ifndef __ASM_ARCH_DAVINCI_ASP_H | ||
5 | #define __ASM_ARCH_DAVINCI_ASP_H | ||
6 | |||
7 | /* Bases of dm644x and dm355 register banks */ | ||
8 | #define DAVINCI_ASP0_BASE 0x01E02000 | ||
9 | #define DAVINCI_ASP1_BASE 0x01E04000 | ||
10 | |||
11 | /* Bases of dm365 register banks */ | ||
12 | #define DAVINCI_DM365_ASP0_BASE 0x01D02000 | ||
13 | |||
14 | /* Bases of dm646x register banks */ | ||
15 | #define DAVINCI_DM646X_MCASP0_REG_BASE 0x01D01000 | ||
16 | #define DAVINCI_DM646X_MCASP1_REG_BASE 0x01D01800 | ||
17 | |||
18 | /* Bases of da850/da830 McASP0 register banks */ | ||
19 | #define DAVINCI_DA8XX_MCASP0_REG_BASE 0x01D00000 | ||
20 | |||
21 | /* Bases of da830 McASP1 register banks */ | ||
22 | #define DAVINCI_DA830_MCASP1_REG_BASE 0x01D04000 | ||
23 | |||
24 | /* EDMA channels of dm644x and dm355 */ | ||
25 | #define DAVINCI_DMA_ASP0_TX 2 | ||
26 | #define DAVINCI_DMA_ASP0_RX 3 | ||
27 | #define DAVINCI_DMA_ASP1_TX 8 | ||
28 | #define DAVINCI_DMA_ASP1_RX 9 | ||
29 | |||
30 | /* EDMA channels of dm646x */ | ||
31 | #define DAVINCI_DM646X_DMA_MCASP0_AXEVT0 6 | ||
32 | #define DAVINCI_DM646X_DMA_MCASP0_AREVT0 9 | ||
33 | #define DAVINCI_DM646X_DMA_MCASP1_AXEVT1 12 | ||
34 | |||
35 | /* EDMA channels of da850/da830 McASP0 */ | ||
36 | #define DAVINCI_DA8XX_DMA_MCASP0_AREVT 0 | ||
37 | #define DAVINCI_DA8XX_DMA_MCASP0_AXEVT 1 | ||
38 | |||
39 | /* EDMA channels of da830 McASP1 */ | ||
40 | #define DAVINCI_DA830_DMA_MCASP1_AREVT 2 | ||
41 | #define DAVINCI_DA830_DMA_MCASP1_AXEVT 3 | ||
42 | |||
43 | /* Interrupts */ | ||
44 | #define DAVINCI_ASP0_RX_INT IRQ_MBRINT | ||
45 | #define DAVINCI_ASP0_TX_INT IRQ_MBXINT | ||
46 | #define DAVINCI_ASP1_RX_INT IRQ_MBRINT | ||
47 | #define DAVINCI_ASP1_TX_INT IRQ_MBXINT | ||
48 | |||
49 | #endif /* __ASM_ARCH_DAVINCI_ASP_H */ | ||
diff --git a/arch/arm/mach-davinci/davinci.h b/arch/arm/mach-davinci/davinci.h index 8db0fc6809dd..8661b2013527 100644 --- a/arch/arm/mach-davinci/davinci.h +++ b/arch/arm/mach-davinci/davinci.h | |||
@@ -22,10 +22,11 @@ | |||
22 | #include <linux/davinci_emac.h> | 22 | #include <linux/davinci_emac.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/spi/spi.h> | 24 | #include <linux/spi/spi.h> |
25 | #include <linux/platform_data/davinci_asp.h> | ||
25 | 26 | ||
26 | #include <mach/asp.h> | ||
27 | #include <mach/keyscan.h> | 27 | #include <mach/keyscan.h> |
28 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | #include <mach/edma.h> | ||
29 | 30 | ||
30 | #include <media/davinci/vpfe_capture.h> | 31 | #include <media/davinci/vpfe_capture.h> |
31 | #include <media/davinci/vpif_types.h> | 32 | #include <media/davinci/vpif_types.h> |
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index 4735d64fd6f2..bd2f72b414bc 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <mach/cpuidle.h> | 24 | #include <mach/cpuidle.h> |
25 | 25 | ||
26 | #include "clock.h" | 26 | #include "clock.h" |
27 | #include "asp.h" | ||
27 | 28 | ||
28 | #define DA8XX_TPCC_BASE 0x01c00000 | 29 | #define DA8XX_TPCC_BASE 0x01c00000 |
29 | #define DA8XX_TPTC0_BASE 0x01c08000 | 30 | #define DA8XX_TPTC0_BASE 0x01c08000 |
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index 678cd99b7336..e47a3f0e8ac4 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c | |||
@@ -26,13 +26,13 @@ | |||
26 | #include <mach/time.h> | 26 | #include <mach/time.h> |
27 | #include <mach/serial.h> | 27 | #include <mach/serial.h> |
28 | #include <mach/common.h> | 28 | #include <mach/common.h> |
29 | #include <mach/asp.h> | ||
30 | #include <mach/spi.h> | 29 | #include <mach/spi.h> |
31 | #include <mach/gpio-davinci.h> | 30 | #include <mach/gpio-davinci.h> |
32 | 31 | ||
33 | #include "davinci.h" | 32 | #include "davinci.h" |
34 | #include "clock.h" | 33 | #include "clock.h" |
35 | #include "mux.h" | 34 | #include "mux.h" |
35 | #include "asp.h" | ||
36 | 36 | ||
37 | #define DM355_UART2_BASE (IO_PHYS + 0x206000) | 37 | #define DM355_UART2_BASE (IO_PHYS + 0x206000) |
38 | 38 | ||
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index a50d49de1883..f473745d6e3c 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <mach/time.h> | 29 | #include <mach/time.h> |
30 | #include <mach/serial.h> | 30 | #include <mach/serial.h> |
31 | #include <mach/common.h> | 31 | #include <mach/common.h> |
32 | #include <mach/asp.h> | ||
33 | #include <mach/keyscan.h> | 32 | #include <mach/keyscan.h> |
34 | #include <mach/spi.h> | 33 | #include <mach/spi.h> |
35 | #include <mach/gpio-davinci.h> | 34 | #include <mach/gpio-davinci.h> |
@@ -37,6 +36,7 @@ | |||
37 | #include "davinci.h" | 36 | #include "davinci.h" |
38 | #include "clock.h" | 37 | #include "clock.h" |
39 | #include "mux.h" | 38 | #include "mux.h" |
39 | #include "asp.h" | ||
40 | 40 | ||
41 | #define DM365_REF_FREQ 24000000 /* 24 MHz on the DM365 EVM */ | 41 | #define DM365_REF_FREQ 24000000 /* 24 MHz on the DM365 EVM */ |
42 | 42 | ||
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index c8b866657fcb..0755d466221a 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c | |||
@@ -23,12 +23,12 @@ | |||
23 | #include <mach/time.h> | 23 | #include <mach/time.h> |
24 | #include <mach/serial.h> | 24 | #include <mach/serial.h> |
25 | #include <mach/common.h> | 25 | #include <mach/common.h> |
26 | #include <mach/asp.h> | ||
27 | #include <mach/gpio-davinci.h> | 26 | #include <mach/gpio-davinci.h> |
28 | 27 | ||
29 | #include "davinci.h" | 28 | #include "davinci.h" |
30 | #include "clock.h" | 29 | #include "clock.h" |
31 | #include "mux.h" | 30 | #include "mux.h" |
31 | #include "asp.h" | ||
32 | 32 | ||
33 | /* | 33 | /* |
34 | * Device specific clocks | 34 | * Device specific clocks |
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c index 9eb87c1d1edd..97c0f8e555bd 100644 --- a/arch/arm/mach-davinci/dm646x.c +++ b/arch/arm/mach-davinci/dm646x.c | |||
@@ -24,12 +24,12 @@ | |||
24 | #include <mach/time.h> | 24 | #include <mach/time.h> |
25 | #include <mach/serial.h> | 25 | #include <mach/serial.h> |
26 | #include <mach/common.h> | 26 | #include <mach/common.h> |
27 | #include <mach/asp.h> | ||
28 | #include <mach/gpio-davinci.h> | 27 | #include <mach/gpio-davinci.h> |
29 | 28 | ||
30 | #include "davinci.h" | 29 | #include "davinci.h" |
31 | #include "clock.h" | 30 | #include "clock.h" |
32 | #include "mux.h" | 31 | #include "mux.h" |
32 | #include "asp.h" | ||
33 | 33 | ||
34 | #define DAVINCI_VPIF_BASE (0x01C12000) | 34 | #define DAVINCI_VPIF_BASE (0x01C12000) |
35 | 35 | ||
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h index a2f1f274f189..c74a6abef187 100644 --- a/arch/arm/mach-davinci/include/mach/da8xx.h +++ b/arch/arm/mach-davinci/include/mach/da8xx.h | |||
@@ -16,11 +16,11 @@ | |||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/davinci_emac.h> | 17 | #include <linux/davinci_emac.h> |
18 | #include <linux/spi/spi.h> | 18 | #include <linux/spi/spi.h> |
19 | #include <linux/platform_data/davinci_asp.h> | ||
19 | 20 | ||
20 | #include <mach/serial.h> | 21 | #include <mach/serial.h> |
21 | #include <mach/edma.h> | 22 | #include <mach/edma.h> |
22 | #include <mach/i2c.h> | 23 | #include <mach/i2c.h> |
23 | #include <mach/asp.h> | ||
24 | #include <mach/mmc.h> | 24 | #include <mach/mmc.h> |
25 | #include <mach/usb.h> | 25 | #include <mach/usb.h> |
26 | #include <mach/pm.h> | 26 | #include <mach/pm.h> |
diff --git a/arch/arm/mach-davinci/include/mach/asp.h b/include/linux/platform_data/davinci_asp.h index 9aa240909a2c..79c26aa11db6 100644 --- a/arch/arm/mach-davinci/include/mach/asp.h +++ b/include/linux/platform_data/davinci_asp.h | |||
@@ -1,59 +1,26 @@ | |||
1 | /* | 1 | /* |
2 | * <mach/asp.h> - DaVinci Audio Serial Port support | 2 | * TI DaVinci Audio Serial Port support |
3 | * | ||
4 | * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License as | ||
8 | * published by the Free Software Foundation version 2. | ||
9 | * | ||
10 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
11 | * kind, whether express or implied; without even the implied warranty | ||
12 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
3 | */ | 14 | */ |
4 | #ifndef __ASM_ARCH_DAVINCI_ASP_H | ||
5 | #define __ASM_ARCH_DAVINCI_ASP_H | ||
6 | 15 | ||
7 | #include <mach/irqs.h> | 16 | #ifndef __DAVINCI_ASP_H |
8 | #include <mach/edma.h> | 17 | #define __DAVINCI_ASP_H |
9 | |||
10 | /* Bases of dm644x and dm355 register banks */ | ||
11 | #define DAVINCI_ASP0_BASE 0x01E02000 | ||
12 | #define DAVINCI_ASP1_BASE 0x01E04000 | ||
13 | |||
14 | /* Bases of dm365 register banks */ | ||
15 | #define DAVINCI_DM365_ASP0_BASE 0x01D02000 | ||
16 | |||
17 | /* Bases of dm646x register banks */ | ||
18 | #define DAVINCI_DM646X_MCASP0_REG_BASE 0x01D01000 | ||
19 | #define DAVINCI_DM646X_MCASP1_REG_BASE 0x01D01800 | ||
20 | |||
21 | /* Bases of da850/da830 McASP0 register banks */ | ||
22 | #define DAVINCI_DA8XX_MCASP0_REG_BASE 0x01D00000 | ||
23 | |||
24 | /* Bases of da830 McASP1 register banks */ | ||
25 | #define DAVINCI_DA830_MCASP1_REG_BASE 0x01D04000 | ||
26 | |||
27 | /* EDMA channels of dm644x and dm355 */ | ||
28 | #define DAVINCI_DMA_ASP0_TX 2 | ||
29 | #define DAVINCI_DMA_ASP0_RX 3 | ||
30 | #define DAVINCI_DMA_ASP1_TX 8 | ||
31 | #define DAVINCI_DMA_ASP1_RX 9 | ||
32 | |||
33 | /* EDMA channels of dm646x */ | ||
34 | #define DAVINCI_DM646X_DMA_MCASP0_AXEVT0 6 | ||
35 | #define DAVINCI_DM646X_DMA_MCASP0_AREVT0 9 | ||
36 | #define DAVINCI_DM646X_DMA_MCASP1_AXEVT1 12 | ||
37 | |||
38 | /* EDMA channels of da850/da830 McASP0 */ | ||
39 | #define DAVINCI_DA8XX_DMA_MCASP0_AREVT 0 | ||
40 | #define DAVINCI_DA8XX_DMA_MCASP0_AXEVT 1 | ||
41 | |||
42 | /* EDMA channels of da830 McASP1 */ | ||
43 | #define DAVINCI_DA830_DMA_MCASP1_AREVT 2 | ||
44 | #define DAVINCI_DA830_DMA_MCASP1_AXEVT 3 | ||
45 | |||
46 | /* Interrupts */ | ||
47 | #define DAVINCI_ASP0_RX_INT IRQ_MBRINT | ||
48 | #define DAVINCI_ASP0_TX_INT IRQ_MBXINT | ||
49 | #define DAVINCI_ASP1_RX_INT IRQ_MBRINT | ||
50 | #define DAVINCI_ASP1_TX_INT IRQ_MBXINT | ||
51 | 18 | ||
52 | struct snd_platform_data { | 19 | struct snd_platform_data { |
53 | u32 tx_dma_offset; | 20 | u32 tx_dma_offset; |
54 | u32 rx_dma_offset; | 21 | u32 rx_dma_offset; |
55 | enum dma_event_q asp_chan_q; /* event queue number for ASP channel */ | 22 | int asp_chan_q; /* event queue number for ASP channel */ |
56 | enum dma_event_q ram_chan_q; /* event queue number for RAM channel */ | 23 | int ram_chan_q; /* event queue number for RAM channel */ |
57 | unsigned int codec_fmt; | 24 | unsigned int codec_fmt; |
58 | /* | 25 | /* |
59 | * Allowing this is more efficient and eliminates left and right swaps | 26 | * Allowing this is more efficient and eliminates left and right swaps |
@@ -70,7 +37,7 @@ struct snd_platform_data { | |||
70 | * and MCBSP_CLKS. | 37 | * and MCBSP_CLKS. |
71 | * Depending on different hardware connections it is possible | 38 | * Depending on different hardware connections it is possible |
72 | * to use this setting to change the behaviour of McBSP | 39 | * to use this setting to change the behaviour of McBSP |
73 | * driver. The dm365_clk_input_pin enum is available for dm365 | 40 | * driver. |
74 | */ | 41 | */ |
75 | int clk_input_pin; | 42 | int clk_input_pin; |
76 | 43 | ||
@@ -122,8 +89,8 @@ enum { | |||
122 | MCASP_VERSION_2, /* DA8xx/OMAPL1x */ | 89 | MCASP_VERSION_2, /* DA8xx/OMAPL1x */ |
123 | }; | 90 | }; |
124 | 91 | ||
125 | enum dm365_clk_input_pin { | 92 | enum mcbsp_clk_input_pin { |
126 | MCBSP_CLKR = 0, /* DM365 */ | 93 | MCBSP_CLKR = 0, /* as in DM365 */ |
127 | MCBSP_CLKS, | 94 | MCBSP_CLKS, |
128 | }; | 95 | }; |
129 | 96 | ||
@@ -134,4 +101,4 @@ enum dm365_clk_input_pin { | |||
134 | #define DAVINCI_MCASP_IIS_MODE 0 | 101 | #define DAVINCI_MCASP_IIS_MODE 0 |
135 | #define DAVINCI_MCASP_DIT_MODE 1 | 102 | #define DAVINCI_MCASP_DIT_MODE 1 |
136 | 103 | ||
137 | #endif /* __ASM_ARCH_DAVINCI_ASP_H */ | 104 | #endif |
diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c index 4b37e2ac4685..ab0ad4591b08 100644 --- a/sound/soc/davinci/davinci-evm.c +++ b/sound/soc/davinci/davinci-evm.c | |||
@@ -22,9 +22,6 @@ | |||
22 | #include <asm/dma.h> | 22 | #include <asm/dma.h> |
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | 24 | ||
25 | #include <mach/asp.h> | ||
26 | #include <mach/edma.h> | ||
27 | |||
28 | #include "davinci-pcm.h" | 25 | #include "davinci-pcm.h" |
29 | #include "davinci-i2s.h" | 26 | #include "davinci-i2s.h" |
30 | #include "davinci-mcasp.h" | 27 | #include "davinci-mcasp.h" |
diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c index 407df7233d6d..821831207180 100644 --- a/sound/soc/davinci/davinci-i2s.c +++ b/sound/soc/davinci/davinci-i2s.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
19 | #include <linux/platform_data/davinci_asp.h> | ||
19 | 20 | ||
20 | #include <sound/core.h> | 21 | #include <sound/core.h> |
21 | #include <sound/pcm.h> | 22 | #include <sound/pcm.h> |
@@ -23,8 +24,6 @@ | |||
23 | #include <sound/initval.h> | 24 | #include <sound/initval.h> |
24 | #include <sound/soc.h> | 25 | #include <sound/soc.h> |
25 | 26 | ||
26 | #include <mach/asp.h> | ||
27 | |||
28 | #include "davinci-pcm.h" | 27 | #include "davinci-pcm.h" |
29 | #include "davinci-i2s.h" | 28 | #include "davinci-i2s.h" |
30 | 29 | ||
diff --git a/sound/soc/davinci/davinci-mcasp.h b/sound/soc/davinci/davinci-mcasp.h index 51479f9ee909..0de9ed6ce038 100644 --- a/sound/soc/davinci/davinci-mcasp.h +++ b/sound/soc/davinci/davinci-mcasp.h | |||
@@ -19,7 +19,8 @@ | |||
19 | #define DAVINCI_MCASP_H | 19 | #define DAVINCI_MCASP_H |
20 | 20 | ||
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <mach/asp.h> | 22 | #include <linux/platform_data/davinci_asp.h> |
23 | |||
23 | #include "davinci-pcm.h" | 24 | #include "davinci-pcm.h" |
24 | 25 | ||
25 | #define DAVINCI_MCASP_RATES SNDRV_PCM_RATE_8000_96000 | 26 | #define DAVINCI_MCASP_RATES SNDRV_PCM_RATE_8000_96000 |
diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c index 4b70828beedb..93ea3bf567e1 100644 --- a/sound/soc/davinci/davinci-pcm.c +++ b/sound/soc/davinci/davinci-pcm.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <sound/soc.h> | 23 | #include <sound/soc.h> |
24 | 24 | ||
25 | #include <asm/dma.h> | 25 | #include <asm/dma.h> |
26 | #include <mach/edma.h> | ||
27 | #include <mach/sram.h> | 26 | #include <mach/sram.h> |
28 | 27 | ||
29 | #include "davinci-pcm.h" | 28 | #include "davinci-pcm.h" |
diff --git a/sound/soc/davinci/davinci-pcm.h b/sound/soc/davinci/davinci-pcm.h index 5e5516460461..fc4d01cdd8c9 100644 --- a/sound/soc/davinci/davinci-pcm.h +++ b/sound/soc/davinci/davinci-pcm.h | |||
@@ -12,9 +12,8 @@ | |||
12 | #ifndef _DAVINCI_PCM_H | 12 | #ifndef _DAVINCI_PCM_H |
13 | #define _DAVINCI_PCM_H | 13 | #define _DAVINCI_PCM_H |
14 | 14 | ||
15 | #include <linux/platform_data/davinci_asp.h> | ||
15 | #include <mach/edma.h> | 16 | #include <mach/edma.h> |
16 | #include <mach/asp.h> | ||
17 | |||
18 | 17 | ||
19 | struct davinci_pcm_dma_params { | 18 | struct davinci_pcm_dma_params { |
20 | int channel; /* sync dma channel ID */ | 19 | int channel; /* sync dma channel ID */ |