aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-08 18:07:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-08 18:07:14 -0400
commitf5a246eab9a268f51ba8189ea5b098a1bfff200e (patch)
treea6ff7169e0bcaca498d9aec8b0624de1b74eaecb /arch
parentd5bbd43d5f450c3fca058f5b85f3dfb4e8cc88c9 (diff)
parent7ff34ad80b7080fafaac8efa9ef0061708eddd51 (diff)
Merge tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai: "This contains pretty many small commits covering fairly large range of files in sound/ directory. Partly because of additional API support and partly because of constantly developed ASoC and ARM stuff. Some highlights: - Introduced the helper function and documentation for exposing the channel map via control API, as discussed in Plumbers; most of PCI drivers are covered, will follow more drivers later - Most of drivers have been replaced with the new PM callbacks (if the bus is supported) - HD-audio controller got the support of runtime PM and the support of D3 clock-stop. Also changing the power_save option in sysfs kicks off immediately to enable / disable the power-save mode. - Another significant code change in HD-audio is the rewrite of firmware loading code. Other than that, most of changes in HD-audio are continued cleanups and standardization for the generic auto parser and bug fixes (HBR, device-specific fixups), in addition to the support of channel-map API. - Addition of ASoC bindings for the compressed API, used by the mid-x86 drivers. - Lots of cleanups and API refreshes for ASoC codec drivers and DaVinci. - Conversion of OMAP to dmaengine. - New machine driver for Wolfson Microelectronics Bells. - New CODEC driver for Wolfson Microelectronics WM0010. - Enhancements to the ux500 and wm2000 drivers - A new driver for DA9055 and the support for regulator bypass mode." Fix up various arm soc header file reorg conflicts. * tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (339 commits) ALSA: hda - Add new codec ALC283 ALC290 support ALSA: hda - avoid unneccesary indices on "Headphone Jack" controls ALSA: hda - fix indices on boost volume on Conexant ALSA: aloop - add locking to timer access ALSA: hda - Fix hang caused by race during suspend. sound: Remove unnecessary semicolon ALSA: hda/realtek - Fix detection of ALC271X codec ALSA: hda - Add inverted internal mic quirk for Lenovo IdeaPad U310 ALSA: hda - make Realtek/Sigmatel/Conexant use the generic unsol event ALSA: hda - make a generic unsol event handler ASoC: codecs: Add DA9055 codec driver ASoC: eukrea-tlv320: Convert it to platform driver ALSA: ASoC: add DT bindings for CS4271 ASoC: wm_hubs: Ensure volume updates are handled during class W startup ASoC: wm5110: Adding missing volume update bits ASoC: wm5110: Add OUT3R support ASoC: wm5110: Add AEC loopback support ASoC: wm5110: Rename EPOUT to HPOUT3 ASoC: arizona: Add more clock rates ASoC: arizona: Add more DSP options for mixer input muxes ...
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-davinci/asp.h49
-rw-r--r--arch/arm/mach-davinci/davinci.h4
-rw-r--r--arch/arm/mach-davinci/devices-da8xx.c8
-rw-r--r--arch/arm/mach-davinci/devices.c11
-rw-r--r--arch/arm/mach-davinci/dm355.c2
-rw-r--r--arch/arm/mach-davinci/dm365.c2
-rw-r--r--arch/arm/mach-davinci/dm644x.c2
-rw-r--r--arch/arm/mach-davinci/dm646x.c2
-rw-r--r--arch/arm/mach-davinci/include/mach/asp.h137
-rw-r--r--arch/arm/mach-davinci/include/mach/da8xx.h2
-rw-r--r--arch/arm/mach-imx/eukrea_mbimx27-baseboard.c1
-rw-r--r--arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c1
-rw-r--r--arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c1
-rw-r--r--arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c1
-rw-r--r--arch/arm/mach-imx/mach-imx27_visstrim_m10.c42
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c13
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c1
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c1
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c1
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c1
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c1
-rw-r--r--arch/arm/mach-omap2/board-overo.c1
-rw-r--r--arch/arm/mach-omap2/board-zoom-peripherals.c9
-rw-r--r--arch/arm/mach-omap2/include/mach/board-zoom.h2
-rw-r--r--arch/arm/mach-omap2/mcbsp.c126
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c2
-rw-r--r--arch/arm/mach-omap2/twl-common.c27
-rw-r--r--arch/arm/mach-omap2/twl-common.h2
-rw-r--r--arch/arm/mach-tegra/include/mach/tegra_wm8903_pdata.h23
-rw-r--r--arch/arm/plat-samsung/dma-ops.c3
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c20
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c20
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c20
-rw-r--r--arch/blackfin/mach-bf561/boards/ezkit.c20
-rw-r--r--arch/blackfin/mach-bf609/boards/ezkit.c19
35 files changed, 262 insertions, 315 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 a37fc44e29bc..12d544befcfa 100644
--- a/arch/arm/mach-davinci/davinci.h
+++ b/arch/arm/mach-davinci/davinci.h
@@ -22,10 +22,10 @@
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 25#include <linux/platform_data/davinci_asp.h>
26#include <mach/asp.h>
27#include <linux/platform_data/keyscan-davinci.h> 26#include <linux/platform_data/keyscan-davinci.h>
28#include <mach/hardware.h> 27#include <mach/hardware.h>
28#include <mach/edma.h>
29 29
30#include <media/davinci/vpfe_capture.h> 30#include <media/davinci/vpfe_capture.h>
31#include <media/davinci/vpif_types.h> 31#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 783eab6845c4..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
@@ -505,15 +506,8 @@ static struct platform_device da850_mcasp_device = {
505 .resource = da850_mcasp_resources, 506 .resource = da850_mcasp_resources,
506}; 507};
507 508
508static struct platform_device davinci_pcm_device = {
509 .name = "davinci-pcm-audio",
510 .id = -1,
511};
512
513void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata) 509void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata)
514{ 510{
515 platform_device_register(&davinci_pcm_device);
516
517 /* DA830/OMAP-L137 has 3 instances of McASP */ 511 /* DA830/OMAP-L137 has 3 instances of McASP */
518 if (cpu_is_davinci_da830() && id == 1) { 512 if (cpu_is_davinci_da830() && id == 1) {
519 da830_mcasp1_device.dev.platform_data = pdata; 513 da830_mcasp1_device.dev.platform_data = pdata;
diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c
index 3a42b6f79aa9..4c48a36ee567 100644
--- a/arch/arm/mach-davinci/devices.c
+++ b/arch/arm/mach-davinci/devices.c
@@ -313,16 +313,6 @@ static void davinci_init_wdt(void)
313 313
314/*-------------------------------------------------------------------------*/ 314/*-------------------------------------------------------------------------*/
315 315
316static struct platform_device davinci_pcm_device = {
317 .name = "davinci-pcm-audio",
318 .id = -1,
319};
320
321static void davinci_init_pcm(void)
322{
323 platform_device_register(&davinci_pcm_device);
324}
325
326/*-------------------------------------------------------------------------*/ 316/*-------------------------------------------------------------------------*/
327 317
328struct davinci_timer_instance davinci_timer_instance[2] = { 318struct davinci_timer_instance davinci_timer_instance[2] = {
@@ -345,7 +335,6 @@ static int __init davinci_init_devices(void)
345 /* please keep these calls, and their implementations above, 335 /* please keep these calls, and their implementations above,
346 * in alphabetical order so they're easier to sort through. 336 * in alphabetical order so they're easier to sort through.
347 */ 337 */
348 davinci_init_pcm();
349 davinci_init_wdt(); 338 davinci_init_wdt();
350 339
351 return 0; 340 return 0;
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
index adbde33eca01..a255434908db 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 <linux/platform_data/spi-davinci.h> 29#include <linux/platform_data/spi-davinci.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 719e22f2a37e..b680c832e0ba 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 <linux/platform_data/keyscan-davinci.h> 32#include <linux/platform_data/keyscan-davinci.h>
34#include <linux/platform_data/spi-davinci.h> 33#include <linux/platform_data/spi-davinci.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/asp.h b/arch/arm/mach-davinci/include/mach/asp.h
deleted file mode 100644
index 9aa240909a2c..000000000000
--- a/arch/arm/mach-davinci/include/mach/asp.h
+++ /dev/null
@@ -1,137 +0,0 @@
1/*
2 * <mach/asp.h> - DaVinci Audio Serial Port support
3 */
4#ifndef __ASM_ARCH_DAVINCI_ASP_H
5#define __ASM_ARCH_DAVINCI_ASP_H
6
7#include <mach/irqs.h>
8#include <mach/edma.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
52struct snd_platform_data {
53 u32 tx_dma_offset;
54 u32 rx_dma_offset;
55 enum dma_event_q asp_chan_q; /* event queue number for ASP channel */
56 enum dma_event_q ram_chan_q; /* event queue number for RAM channel */
57 unsigned int codec_fmt;
58 /*
59 * Allowing this is more efficient and eliminates left and right swaps
60 * caused by underruns, but will swap the left and right channels
61 * when compared to previous behavior.
62 */
63 unsigned enable_channel_combine:1;
64 unsigned sram_size_playback;
65 unsigned sram_size_capture;
66
67 /*
68 * If McBSP peripheral gets the clock from an external pin,
69 * there are three chooses, that are MCBSP_CLKX, MCBSP_CLKR
70 * and MCBSP_CLKS.
71 * Depending on different hardware connections it is possible
72 * to use this setting to change the behaviour of McBSP
73 * driver. The dm365_clk_input_pin enum is available for dm365
74 */
75 int clk_input_pin;
76
77 /*
78 * This flag works when both clock and FS are outputs for the cpu
79 * and makes clock more accurate (FS is not symmetrical and the
80 * clock is very fast.
81 * The clock becoming faster is named
82 * i2s continuous serial clock (I2S_SCK) and it is an externally
83 * visible bit clock.
84 *
85 * first line : WordSelect
86 * second line : ContinuousSerialClock
87 * third line: SerialData
88 *
89 * SYMMETRICAL APPROACH:
90 * _______________________ LEFT
91 * _| RIGHT |______________________|
92 * _ _ _ _ _ _ _ _
93 * _| |_| |_ x16 _| |_| |_| |_| |_ x16 _| |_| |_
94 * _ _ _ _ _ _ _ _
95 * _/ \_/ \_ ... _/ \_/ \_/ \_/ \_ ... _/ \_/ \_
96 * \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
97 *
98 * ACCURATE CLOCK APPROACH:
99 * ______________ LEFT
100 * _| RIGHT |_______________________________|
101 * _ _ _ _ _ _ _ _ _
102 * _| |_ x16 _| |_| |_ x16 _| |_| |_| |_| |_| |_| |
103 * _ _ _ _ dummy cycles
104 * _/ \_ ... _/ \_/ \_ ... _/ \__________________
105 * \_/ \_/ \_/ \_/
106 *
107 */
108 bool i2s_accurate_sck;
109
110 /* McASP specific fields */
111 int tdm_slots;
112 u8 op_mode;
113 u8 num_serializer;
114 u8 *serial_dir;
115 u8 version;
116 u8 txnumevt;
117 u8 rxnumevt;
118};
119
120enum {
121 MCASP_VERSION_1 = 0, /* DM646x */
122 MCASP_VERSION_2, /* DA8xx/OMAPL1x */
123};
124
125enum dm365_clk_input_pin {
126 MCBSP_CLKR = 0, /* DM365 */
127 MCBSP_CLKS,
128};
129
130#define INACTIVE_MODE 0
131#define TX_MODE 1
132#define RX_MODE 2
133
134#define DAVINCI_MCASP_IIS_MODE 0
135#define DAVINCI_MCASP_DIT_MODE 1
136
137#endif /* __ASM_ARCH_DAVINCI_ASP_H */
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h
index 33e78ae2a254..c9ee723c56f3 100644
--- a/arch/arm/mach-davinci/include/mach/da8xx.h
+++ b/arch/arm/mach-davinci/include/mach/da8xx.h
@@ -16,10 +16,10 @@
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/asp.h>
23#include <mach/pm.h> 23#include <mach/pm.h>
24#include <linux/platform_data/i2c-davinci.h> 24#include <linux/platform_data/i2c-davinci.h>
25#include <linux/platform_data/mmc-davinci.h> 25#include <linux/platform_data/mmc-davinci.h>
diff --git a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
index fd3177f9e79a..98aef571b9f8 100644
--- a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
@@ -348,4 +348,5 @@ void __init eukrea_mbimx27_baseboard_init(void)
348 imx27_add_imx_keypad(&eukrea_mbimx27_keymap_data); 348 imx27_add_imx_keypad(&eukrea_mbimx27_keymap_data);
349 349
350 gpio_led_register_device(-1, &eukrea_mbimx27_gpio_led_info); 350 gpio_led_register_device(-1, &eukrea_mbimx27_gpio_led_info);
351 imx_add_platform_device("eukrea_tlv320", 0, NULL, 0, NULL, 0);
351} 352}
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
index dfd2da87c2df..0b84666792f0 100644
--- a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
@@ -306,4 +306,5 @@ void __init eukrea_mbimxsd25_baseboard_init(void)
306 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 306 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
307 gpio_led_register_device(-1, &eukrea_mbimxsd_led_info); 307 gpio_led_register_device(-1, &eukrea_mbimxsd_led_info);
308 imx_add_gpio_keys(&eukrea_mbimxsd_button_data); 308 imx_add_gpio_keys(&eukrea_mbimxsd_button_data);
309 imx_add_platform_device("eukrea_tlv320", 0, NULL, 0, NULL, 0);
309} 310}
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
index 6e9dd12a6961..c6532a007d46 100644
--- a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
@@ -315,4 +315,5 @@ void __init eukrea_mbimxsd35_baseboard_init(void)
315 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 315 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
316 gpio_led_register_device(-1, &eukrea_mbimxsd_led_info); 316 gpio_led_register_device(-1, &eukrea_mbimxsd_led_info);
317 imx_add_gpio_keys(&eukrea_mbimxsd_button_data); 317 imx_add_gpio_keys(&eukrea_mbimxsd_button_data);
318 imx_add_platform_device("eukrea_tlv320", 0, NULL, 0, NULL, 0);
318} 319}
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c
index 96a24b73dc23..8b0de30d7a3f 100644
--- a/arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c
@@ -228,4 +228,5 @@ void __init eukrea_mbimxsd51_baseboard_init(void)
228 228
229 gpio_led_register_device(-1, &eukrea_mbimxsd51_led_info); 229 gpio_led_register_device(-1, &eukrea_mbimxsd51_led_info);
230 imx_add_gpio_keys(&eukrea_mbimxsd51_button_data); 230 imx_add_gpio_keys(&eukrea_mbimxsd51_button_data);
231 imx_add_platform_device("eukrea_tlv320", 0, NULL, 0, NULL, 0);
231} 232}
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
index 821d6aac411c..141756f00ae5 100644
--- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
+++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
@@ -32,6 +32,7 @@
32#include <linux/delay.h> 32#include <linux/delay.h>
33#include <linux/dma-mapping.h> 33#include <linux/dma-mapping.h>
34#include <linux/leds.h> 34#include <linux/leds.h>
35#include <linux/platform_data/asoc-mx27vis.h>
35#include <media/soc_camera.h> 36#include <media/soc_camera.h>
36#include <sound/tlv320aic32x4.h> 37#include <sound/tlv320aic32x4.h>
37#include <asm/mach-types.h> 38#include <asm/mach-types.h>
@@ -58,6 +59,11 @@
58#define EXPBOARD_BIT1 (GPIO_PORTD + 27) 59#define EXPBOARD_BIT1 (GPIO_PORTD + 27)
59#define EXPBOARD_BIT0 (GPIO_PORTD + 28) 60#define EXPBOARD_BIT0 (GPIO_PORTD + 28)
60 61
62#define AMP_GAIN_0 (GPIO_PORTF + 9)
63#define AMP_GAIN_1 (GPIO_PORTF + 8)
64#define AMP_MUTE_SDL (GPIO_PORTE + 5)
65#define AMP_MUTE_SDR (GPIO_PORTF + 7)
66
61static const int visstrim_m10_pins[] __initconst = { 67static const int visstrim_m10_pins[] __initconst = {
62 /* UART1 (console) */ 68 /* UART1 (console) */
63 PE12_PF_UART1_TXD, 69 PE12_PF_UART1_TXD,
@@ -139,6 +145,11 @@ static const int visstrim_m10_pins[] __initconst = {
139 EXPBOARD_BIT2 | GPIO_GPIO | GPIO_IN | GPIO_PUEN, 145 EXPBOARD_BIT2 | GPIO_GPIO | GPIO_IN | GPIO_PUEN,
140 EXPBOARD_BIT1 | GPIO_GPIO | GPIO_IN | GPIO_PUEN, 146 EXPBOARD_BIT1 | GPIO_GPIO | GPIO_IN | GPIO_PUEN,
141 EXPBOARD_BIT0 | GPIO_GPIO | GPIO_IN | GPIO_PUEN, 147 EXPBOARD_BIT0 | GPIO_GPIO | GPIO_IN | GPIO_PUEN,
148 /* Audio AMP control */
149 AMP_GAIN_0 | GPIO_GPIO | GPIO_OUT,
150 AMP_GAIN_1 | GPIO_GPIO | GPIO_OUT,
151 AMP_MUTE_SDL | GPIO_GPIO | GPIO_OUT,
152 AMP_MUTE_SDR | GPIO_GPIO | GPIO_OUT,
142}; 153};
143 154
144static struct gpio visstrim_m10_version_gpios[] = { 155static struct gpio visstrim_m10_version_gpios[] = {
@@ -166,6 +177,26 @@ static const struct gpio visstrim_m10_gpios[] __initconst = {
166 .flags = GPIOF_DIR_OUT | GPIOF_INIT_LOW, 177 .flags = GPIOF_DIR_OUT | GPIOF_INIT_LOW,
167 .label = "usbotg_cs", 178 .label = "usbotg_cs",
168 }, 179 },
180 {
181 .gpio = AMP_GAIN_0,
182 .flags = GPIOF_DIR_OUT,
183 .label = "amp-gain-0",
184 },
185 {
186 .gpio = AMP_GAIN_1,
187 .flags = GPIOF_DIR_OUT,
188 .label = "amp-gain-1",
189 },
190 {
191 .gpio = AMP_MUTE_SDL,
192 .flags = GPIOF_DIR_OUT,
193 .label = "amp-mute-sdl",
194 },
195 {
196 .gpio = AMP_MUTE_SDR,
197 .flags = GPIOF_DIR_OUT,
198 .label = "amp-mute-sdr",
199 },
169}; 200};
170 201
171/* Camera */ 202/* Camera */
@@ -444,6 +475,14 @@ static void __init visstrim_deinterlace_init(void)
444} 475}
445 476
446 477
478/* Audio */
479static const struct snd_mx27vis_platform_data snd_mx27vis_pdata __initconst = {
480 .amp_gain0_gpio = AMP_GAIN_0,
481 .amp_gain1_gpio = AMP_GAIN_1,
482 .amp_mutel_gpio = AMP_MUTE_SDL,
483 .amp_muter_gpio = AMP_MUTE_SDR,
484};
485
447static void __init visstrim_m10_revision(void) 486static void __init visstrim_m10_revision(void)
448{ 487{
449 int exp_version = 0; 488 int exp_version = 0;
@@ -502,7 +541,8 @@ static void __init visstrim_m10_board_init(void)
502 imx27_add_fec(NULL); 541 imx27_add_fec(NULL);
503 imx_add_gpio_keys(&visstrim_gpio_keys_platform_data); 542 imx_add_gpio_keys(&visstrim_gpio_keys_platform_data);
504 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 543 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
505 imx_add_platform_device("mx27vis", 0, NULL, 0, NULL, 0); 544 imx_add_platform_device("mx27vis", 0, NULL, 0, &snd_mx27vis_pdata,
545 sizeof(snd_mx27vis_pdata));
506 platform_device_register_resndata(NULL, "soc-camera-pdrv", 0, NULL, 0, 546 platform_device_register_resndata(NULL, "soc-camera-pdrv", 0, NULL, 0,
507 &iclink_tvp5150, sizeof(iclink_tvp5150)); 547 &iclink_tvp5150, sizeof(iclink_tvp5150));
508 gpio_led_register_device(0, &visstrim_m10_led_data); 548 gpio_led_register_device(0, &visstrim_m10_led_data);
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 0d99c9110d01..e16289755f2e 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -263,6 +263,16 @@ static __init void am3517_evm_musb_init(void)
263 usb_musb_init(&musb_board_data); 263 usb_musb_init(&musb_board_data);
264} 264}
265 265
266static __init void am3517_evm_mcbsp1_init(void)
267{
268 u32 devconf0;
269
270 /* McBSP1 CLKR/FSR signal to be connected to CLKX/FSX pin */
271 devconf0 = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
272 devconf0 |= OMAP2_MCBSP1_CLKR_MASK | OMAP2_MCBSP1_FSR_MASK;
273 omap_ctrl_writel(devconf0, OMAP2_CONTROL_DEVCONF0);
274}
275
266static const struct usbhs_omap_board_data usbhs_bdata __initconst = { 276static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
267 .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, 277 .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
268#if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \ 278#if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \
@@ -366,6 +376,9 @@ static void __init am3517_evm_init(void)
366 /* MUSB */ 376 /* MUSB */
367 am3517_evm_musb_init(); 377 am3517_evm_musb_init();
368 378
379 /* McBSP1 */
380 am3517_evm_mcbsp1_init();
381
369 /* MMC init function */ 382 /* MMC init function */
370 omap_hsmmc_init(mmc); 383 omap_hsmmc_init(mmc);
371} 384}
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 8ffd612c5e07..376d26eb601c 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -723,6 +723,7 @@ static void __init cm_t3x_common_init(void)
723 cm_t35_init_ethernet(); 723 cm_t35_init_ethernet();
724 cm_t35_init_led(); 724 cm_t35_init_led();
725 cm_t35_init_display(); 725 cm_t35_init_display();
726 omap_twl4030_audio_init("cm-t3x");
726 727
727 usb_musb_init(NULL); 728 usb_musb_init(NULL);
728 cm_t35_init_usbh(); 729 cm_t35_init_usbh();
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 7bb8056d4388..1fd161e934c7 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -623,6 +623,7 @@ static void __init devkit8000_init(void)
623 usbhs_init(&usbhs_bdata); 623 usbhs_init(&usbhs_bdata);
624 omap_nand_flash_init(NAND_BUSWIDTH_16, devkit8000_nand_partitions, 624 omap_nand_flash_init(NAND_BUSWIDTH_16, devkit8000_nand_partitions,
625 ARRAY_SIZE(devkit8000_nand_partitions)); 625 ARRAY_SIZE(devkit8000_nand_partitions));
626 omap_twl4030_audio_init("omap3beagle");
626 627
627 /* Ensure SDRC pins are mux'd for self-refresh */ 628 /* Ensure SDRC pins are mux'd for self-refresh */
628 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); 629 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index fb8bd837dd13..48d5e41dfbfa 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -625,6 +625,7 @@ static void __init igep_init(void)
625 625
626 igep_flash_init(); 626 igep_flash_init();
627 igep_leds_init(); 627 igep_leds_init();
628 omap_twl4030_audio_init("igep2");
628 629
629 /* 630 /*
630 * WLAN-BT combo module from MuRata which has a Marvell WLAN 631 * WLAN-BT combo module from MuRata which has a Marvell WLAN
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 68ff8d51973c..a08bebc94ec5 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -514,6 +514,7 @@ static void __init omap3_beagle_init(void)
514 usbhs_init(&usbhs_bdata); 514 usbhs_init(&usbhs_bdata);
515 omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions, 515 omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions,
516 ARRAY_SIZE(omap3beagle_nand_partitions)); 516 ARRAY_SIZE(omap3beagle_nand_partitions));
517 omap_twl4030_audio_init("omap3beagle");
517 518
518 /* Ensure msecure is mux'd to be able to set the RTC. */ 519 /* Ensure msecure is mux'd to be able to set the RTC. */
519 omap_mux_init_signal("sys_drm_msecure", OMAP_PIN_OFF_OUTPUT_HIGH); 520 omap_mux_init_signal("sys_drm_msecure", OMAP_PIN_OFF_OUTPUT_HIGH);
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index c64e565bdef5..a3959de85e05 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -739,6 +739,7 @@ static void __init omap3_evm_init(void)
739 omap3evm_init_smsc911x(); 739 omap3evm_init_smsc911x();
740 omap3_evm_display_init(); 740 omap3_evm_display_init();
741 omap3_evm_wl12xx_init(); 741 omap3_evm_wl12xx_init();
742 omap_twl4030_audio_init("omap3evm");
742} 743}
743 744
744MACHINE_START(OMAP3EVM, "OMAP3 EVM") 745MACHINE_START(OMAP3EVM, "OMAP3 EVM")
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 2e7f24030fc9..b700685762b5 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -504,6 +504,7 @@ static void __init overo_init(void)
504 overo_display_init(); 504 overo_display_init();
505 overo_init_led(); 505 overo_init_led();
506 overo_init_keys(); 506 overo_init_keys();
507 omap_twl4030_audio_init("overo");
507 508
508 /* Ensure SDRC pins are mux'd for self-refresh */ 509 /* Ensure SDRC pins are mux'd for self-refresh */
509 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); 510 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 6bcc107b9fc3..67f8540c8e07 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -35,6 +35,7 @@
35#include "common-board-devices.h" 35#include "common-board-devices.h"
36 36
37#define OMAP_ZOOM_WLAN_PMENA_GPIO (101) 37#define OMAP_ZOOM_WLAN_PMENA_GPIO (101)
38#define ZOOM2_HEADSET_EXTMUTE_GPIO (153)
38#define OMAP_ZOOM_WLAN_IRQ_GPIO (162) 39#define OMAP_ZOOM_WLAN_IRQ_GPIO (162)
39 40
40#define LCD_PANEL_ENABLE_GPIO (7 + OMAP_MAX_GPIO_LINES) 41#define LCD_PANEL_ENABLE_GPIO (7 + OMAP_MAX_GPIO_LINES)
@@ -245,12 +246,6 @@ static int zoom_twl_gpio_setup(struct device *dev,
245 return ret; 246 return ret;
246} 247}
247 248
248/* EXTMUTE callback function */
249static void zoom2_set_hs_extmute(int mute)
250{
251 gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute);
252}
253
254static struct twl4030_gpio_platform_data zoom_gpio_data = { 249static struct twl4030_gpio_platform_data zoom_gpio_data = {
255 .setup = zoom_twl_gpio_setup, 250 .setup = zoom_twl_gpio_setup,
256}; 251};
@@ -277,7 +272,7 @@ static int __init omap_i2c_init(void)
277 272
278 codec_data->ramp_delay_value = 3; /* 161 ms */ 273 codec_data->ramp_delay_value = 3; /* 161 ms */
279 codec_data->hs_extmute = 1; 274 codec_data->hs_extmute = 1;
280 codec_data->set_hs_extmute = zoom2_set_hs_extmute; 275 codec_data->hs_extmute_gpio = ZOOM2_HEADSET_EXTMUTE_GPIO;
281 } 276 }
282 omap_pmic_init(1, 2400, "twl5030", 7 + OMAP_INTC_START, &zoom_twldata); 277 omap_pmic_init(1, 2400, "twl5030", 7 + OMAP_INTC_START, &zoom_twldata);
283 omap_register_i2c_bus(2, 400, NULL, 0); 278 omap_register_i2c_bus(2, 400, NULL, 0);
diff --git a/arch/arm/mach-omap2/include/mach/board-zoom.h b/arch/arm/mach-omap2/include/mach/board-zoom.h
index 775fdc3b000b..2e9486940ead 100644
--- a/arch/arm/mach-omap2/include/mach/board-zoom.h
+++ b/arch/arm/mach-omap2/include/mach/board-zoom.h
@@ -8,5 +8,3 @@
8extern int __init zoom_debugboard_init(void); 8extern int __init zoom_debugboard_init(void);
9extern void __init zoom_peripherals_init(void); 9extern void __init zoom_peripherals_init(void);
10extern void __init zoom_display_init(void); 10extern void __init zoom_display_init(void);
11
12#define ZOOM2_HEADSET_EXTMUTE_GPIO 153
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
index 7d47407d6d46..37f8f948047b 100644
--- a/arch/arm/mach-omap2/mcbsp.c
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -15,6 +15,7 @@
15#include <linux/clk.h> 15#include <linux/clk.h>
16#include <linux/err.h> 16#include <linux/err.h>
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/of.h>
18#include <linux/platform_device.h> 19#include <linux/platform_device.h>
19#include <linux/slab.h> 20#include <linux/slab.h>
20#include <linux/platform_data/asoc-ti-mcbsp.h> 21#include <linux/platform_data/asoc-ti-mcbsp.h>
@@ -23,8 +24,6 @@
23#include <plat/omap_device.h> 24#include <plat/omap_device.h>
24#include <linux/pm_runtime.h> 25#include <linux/pm_runtime.h>
25 26
26#include "control.h"
27
28/* 27/*
29 * FIXME: Find a mechanism to enable/disable runtime the McBSP ICLK autoidle. 28 * FIXME: Find a mechanism to enable/disable runtime the McBSP ICLK autoidle.
30 * Sidetone needs non-gated ICLK and sidetone autoidle is broken. 29 * Sidetone needs non-gated ICLK and sidetone autoidle is broken.
@@ -32,112 +31,6 @@
32#include "cm2xxx_3xxx.h" 31#include "cm2xxx_3xxx.h"
33#include "cm-regbits-34xx.h" 32#include "cm-regbits-34xx.h"
34 33
35/* McBSP1 internal signal muxing function for OMAP2/3 */
36static int omap2_mcbsp1_mux_rx_clk(struct device *dev, const char *signal,
37 const char *src)
38{
39 u32 v;
40
41 v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
42
43 if (!strcmp(signal, "clkr")) {
44 if (!strcmp(src, "clkr"))
45 v &= ~OMAP2_MCBSP1_CLKR_MASK;
46 else if (!strcmp(src, "clkx"))
47 v |= OMAP2_MCBSP1_CLKR_MASK;
48 else
49 return -EINVAL;
50 } else if (!strcmp(signal, "fsr")) {
51 if (!strcmp(src, "fsr"))
52 v &= ~OMAP2_MCBSP1_FSR_MASK;
53 else if (!strcmp(src, "fsx"))
54 v |= OMAP2_MCBSP1_FSR_MASK;
55 else
56 return -EINVAL;
57 } else {
58 return -EINVAL;
59 }
60
61 omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0);
62
63 return 0;
64}
65
66/* McBSP4 internal signal muxing function for OMAP4 */
67#define OMAP4_CONTROL_MCBSPLP_ALBCTRLRX_FSX (1 << 31)
68#define OMAP4_CONTROL_MCBSPLP_ALBCTRLRX_CLKX (1 << 30)
69static int omap4_mcbsp4_mux_rx_clk(struct device *dev, const char *signal,
70 const char *src)
71{
72 u32 v;
73
74 /*
75 * In CONTROL_MCBSPLP register only bit 30 (CLKR mux), and bit 31 (FSR
76 * mux) is used */
77 v = omap4_ctrl_pad_readl(OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_MCBSPLP);
78
79 if (!strcmp(signal, "clkr")) {
80 if (!strcmp(src, "clkr"))
81 v &= ~OMAP4_CONTROL_MCBSPLP_ALBCTRLRX_CLKX;
82 else if (!strcmp(src, "clkx"))
83 v |= OMAP4_CONTROL_MCBSPLP_ALBCTRLRX_CLKX;
84 else
85 return -EINVAL;
86 } else if (!strcmp(signal, "fsr")) {
87 if (!strcmp(src, "fsr"))
88 v &= ~OMAP4_CONTROL_MCBSPLP_ALBCTRLRX_FSX;
89 else if (!strcmp(src, "fsx"))
90 v |= OMAP4_CONTROL_MCBSPLP_ALBCTRLRX_FSX;
91 else
92 return -EINVAL;
93 } else {
94 return -EINVAL;
95 }
96
97 omap4_ctrl_pad_writel(v, OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_MCBSPLP);
98
99 return 0;
100}
101
102/* McBSP CLKS source switching function */
103static int omap2_mcbsp_set_clk_src(struct device *dev, struct clk *clk,
104 const char *src)
105{
106 struct clk *fck_src;
107 char *fck_src_name;
108 int r;
109
110 if (!strcmp(src, "clks_ext"))
111 fck_src_name = "pad_fck";
112 else if (!strcmp(src, "clks_fclk"))
113 fck_src_name = "prcm_fck";
114 else
115 return -EINVAL;
116
117 fck_src = clk_get(dev, fck_src_name);
118 if (IS_ERR_OR_NULL(fck_src)) {
119 pr_err("omap-mcbsp: %s: could not clk_get() %s\n", "clks",
120 fck_src_name);
121 return -EINVAL;
122 }
123
124 pm_runtime_put_sync(dev);
125
126 r = clk_set_parent(clk, fck_src);
127 if (IS_ERR_VALUE(r)) {
128 pr_err("omap-mcbsp: %s: could not clk_set_parent() to %s\n",
129 "clks", fck_src_name);
130 clk_put(fck_src);
131 return -EINVAL;
132 }
133
134 pm_runtime_get_sync(dev);
135
136 clk_put(fck_src);
137
138 return 0;
139}
140
141static int omap3_enable_st_clock(unsigned int id, bool enable) 34static int omap3_enable_st_clock(unsigned int id, bool enable)
142{ 35{
143 unsigned int w; 36 unsigned int w;
@@ -179,17 +72,11 @@ static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
179 pdata->reg_size = 4; 72 pdata->reg_size = 4;
180 pdata->has_ccr = true; 73 pdata->has_ccr = true;
181 } 74 }
182 pdata->set_clk_src = omap2_mcbsp_set_clk_src;
183
184 /* On OMAP2/3 the McBSP1 port has 6 pin configuration */
185 if (id == 1 && oh->class->rev < MCBSP_CONFIG_TYPE4)
186 pdata->mux_signal = omap2_mcbsp1_mux_rx_clk;
187 75
188 /* On OMAP4 the McBSP4 port has 6 pin configuration */ 76 if (oh->class->rev == MCBSP_CONFIG_TYPE2) {
189 if (id == 4 && oh->class->rev == MCBSP_CONFIG_TYPE4) 77 /* The FIFO has 128 locations */
190 pdata->mux_signal = omap4_mcbsp4_mux_rx_clk; 78 pdata->buffer_size = 0x80;
191 79 } else if (oh->class->rev == MCBSP_CONFIG_TYPE3) {
192 if (oh->class->rev == MCBSP_CONFIG_TYPE3) {
193 if (id == 2) 80 if (id == 2)
194 /* The FIFO has 1024 + 256 locations */ 81 /* The FIFO has 1024 + 256 locations */
195 pdata->buffer_size = 0x500; 82 pdata->buffer_size = 0x500;
@@ -225,7 +112,8 @@ static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
225 112
226static int __init omap2_mcbsp_init(void) 113static int __init omap2_mcbsp_init(void)
227{ 114{
228 omap_hwmod_for_each_by_class("mcbsp", omap_init_mcbsp, NULL); 115 if (!of_have_populated_dt())
116 omap_hwmod_for_each_by_class("mcbsp", omap_init_mcbsp, NULL);
229 117
230 return 0; 118 return 0;
231} 119}
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 8d7a93525bc6..652d0285bd6d 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -5269,6 +5269,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = {
5269 5269
5270static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = { 5270static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = {
5271 { 5271 {
5272 .name = "mpu",
5272 .pa_start = 0x40132000, 5273 .pa_start = 0x40132000,
5273 .pa_end = 0x4013207f, 5274 .pa_end = 0x4013207f,
5274 .flags = ADDR_TYPE_RT 5275 .flags = ADDR_TYPE_RT
@@ -5287,6 +5288,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = {
5287 5288
5288static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = { 5289static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = {
5289 { 5290 {
5291 .name = "dma",
5290 .pa_start = 0x49032000, 5292 .pa_start = 0x49032000,
5291 .pa_end = 0x4903207f, 5293 .pa_end = 0x4903207f,
5292 .flags = ADDR_TYPE_RT 5294 .flags = ADDR_TYPE_RT
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index 45f77413c21d..18a851959425 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -519,3 +519,30 @@ void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
519 pmic_data->v2v1 = &omap4_v2v1_idata; 519 pmic_data->v2v1 = &omap4_v2v1_idata;
520} 520}
521#endif /* CONFIG_ARCH_OMAP4 */ 521#endif /* CONFIG_ARCH_OMAP4 */
522
523#if defined(CONFIG_SND_OMAP_SOC_OMAP_TWL4030) || \
524 defined(CONFIG_SND_OMAP_SOC_OMAP_TWL4030_MODULE)
525#include <linux/platform_data/omap-twl4030.h>
526
527static struct omap_tw4030_pdata omap_twl4030_audio_data;
528
529static struct platform_device audio_device = {
530 .name = "omap-twl4030",
531 .id = -1,
532 .dev = {
533 .platform_data = &omap_twl4030_audio_data,
534 },
535};
536
537void __init omap_twl4030_audio_init(char *card_name)
538{
539 omap_twl4030_audio_data.card_name = card_name;
540 platform_device_register(&audio_device);
541}
542
543#else /* SOC_OMAP_TWL4030 */
544void __init omap_twl4030_audio_init(char *card_name)
545{
546 return;
547}
548#endif /* SOC_OMAP_TWL4030 */
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
index 2256efe90cf1..dcfbad5ac471 100644
--- a/arch/arm/mach-omap2/twl-common.h
+++ b/arch/arm/mach-omap2/twl-common.h
@@ -60,4 +60,6 @@ void omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
60void omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, 60void omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
61 u32 pdata_flags, u32 regulators_flags); 61 u32 pdata_flags, u32 regulators_flags);
62 62
63void omap_twl4030_audio_init(char *card_name);
64
63#endif /* __OMAP_PMIC_COMMON__ */ 65#endif /* __OMAP_PMIC_COMMON__ */
diff --git a/arch/arm/mach-tegra/include/mach/tegra_wm8903_pdata.h b/arch/arm/mach-tegra/include/mach/tegra_wm8903_pdata.h
deleted file mode 100644
index 9d293344a7ff..000000000000
--- a/arch/arm/mach-tegra/include/mach/tegra_wm8903_pdata.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * arch/arm/mach-tegra/include/mach/tegra_wm8903_pdata.h
3 *
4 * Copyright 2011 NVIDIA, Inc.
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17struct tegra_wm8903_platform_data {
18 int gpio_spkr_en;
19 int gpio_hp_det;
20 int gpio_hp_mute;
21 int gpio_int_mic_en;
22 int gpio_ext_mic_en;
23};
diff --git a/arch/arm/plat-samsung/dma-ops.c b/arch/arm/plat-samsung/dma-ops.c
index c38d75489240..d088afa034e8 100644
--- a/arch/arm/plat-samsung/dma-ops.c
+++ b/arch/arm/plat-samsung/dma-ops.c
@@ -91,7 +91,8 @@ static int samsung_dmadev_prepare(unsigned ch,
91 break; 91 break;
92 case DMA_CYCLIC: 92 case DMA_CYCLIC:
93 desc = dmaengine_prep_dma_cyclic(chan, param->buf, 93 desc = dmaengine_prep_dma_cyclic(chan, param->buf,
94 param->len, param->period, param->direction); 94 param->len, param->period, param->direction,
95 DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
95 break; 96 break;
96 default: 97 default:
97 dev_err(&chan->dev->device, "unsupported format\n"); 98 dev_err(&chan->dev->device, "unsupported format\n");
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index fc179ca07799..29f16e5c37b9 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -587,6 +587,21 @@ static struct platform_device bfin_tdm = {
587}; 587};
588#endif 588#endif
589 589
590#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
591 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
592static const char * const ad1836_link[] = {
593 "bfin-tdm.0",
594 "spi0.4",
595};
596static struct platform_device bfin_ad1836_machine = {
597 .name = "bfin-snd-ad1836",
598 .id = -1,
599 .dev = {
600 .platform_data = (void *)ad1836_link,
601 },
602};
603#endif
604
590static struct spi_board_info bfin_spi_board_info[] __initdata = { 605static struct spi_board_info bfin_spi_board_info[] __initdata = {
591#if defined(CONFIG_MTD_M25P80) \ 606#if defined(CONFIG_MTD_M25P80) \
592 || defined(CONFIG_MTD_M25P80_MODULE) 607 || defined(CONFIG_MTD_M25P80_MODULE)
@@ -1269,6 +1284,11 @@ static struct platform_device *stamp_devices[] __initdata = {
1269#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) 1284#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
1270 &bfin_tdm, 1285 &bfin_tdm,
1271#endif 1286#endif
1287
1288#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \
1289 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
1290 &bfin_ad1836_machine,
1291#endif
1272}; 1292};
1273 1293
1274static int __init ezkit_init(void) 1294static int __init ezkit_init(void)
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index ce88a7165b62..6fca8698bf3b 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -617,6 +617,21 @@ static struct platform_device bfin_ac97_pcm = {
617}; 617};
618#endif 618#endif
619 619
620#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
621 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
622static const char * const ad1836_link[] = {
623 "bfin-tdm.0",
624 "spi0.4",
625};
626static struct platform_device bfin_ad1836_machine = {
627 .name = "bfin-snd-ad1836",
628 .id = -1,
629 .dev = {
630 .platform_data = (void *)ad1836_link,
631 },
632};
633#endif
634
620#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ 635#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \
621 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) 636 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
622static const unsigned ad73311_gpio[] = { 637static const unsigned ad73311_gpio[] = {
@@ -754,6 +769,11 @@ static struct platform_device *stamp_devices[] __initdata = {
754 &bfin_ac97_pcm, 769 &bfin_ac97_pcm,
755#endif 770#endif
756 771
772#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \
773 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
774 &bfin_ad1836_machine,
775#endif
776
757#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ 777#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \
758 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) 778 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
759 &bfin_ad73311_machine, 779 &bfin_ad73311_machine,
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 5ed654ae66e1..307bd7e62f43 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -2641,6 +2641,21 @@ static struct platform_device bfin_ac97_pcm = {
2641}; 2641};
2642#endif 2642#endif
2643 2643
2644#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
2645 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
2646static const char * const ad1836_link[] = {
2647 "bfin-tdm.0",
2648 "spi0.4",
2649};
2650static struct platform_device bfin_ad1836_machine = {
2651 .name = "bfin-snd-ad1836",
2652 .id = -1,
2653 .dev = {
2654 .platform_data = (void *)ad1836_link,
2655 },
2656};
2657#endif
2658
2644#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ 2659#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \
2645 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) 2660 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
2646static const unsigned ad73311_gpio[] = { 2661static const unsigned ad73311_gpio[] = {
@@ -2927,6 +2942,11 @@ static struct platform_device *stamp_devices[] __initdata = {
2927 &bfin_ac97_pcm, 2942 &bfin_ac97_pcm,
2928#endif 2943#endif
2929 2944
2945#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \
2946 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
2947 &bfin_ad1836_machine,
2948#endif
2949
2930#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ 2950#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \
2931 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) 2951 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
2932 &bfin_ad73311_machine, 2952 &bfin_ad73311_machine,
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index 7c36777c6455..551f866172cf 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -539,6 +539,21 @@ static struct platform_device bfin_ac97 = {
539}; 539};
540#endif 540#endif
541 541
542#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
543 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
544static const char * const ad1836_link[] = {
545 "bfin-tdm.0",
546 "spi0.4",
547};
548static struct platform_device bfin_ad1836_machine = {
549 .name = "bfin-snd-ad1836",
550 .id = -1,
551 .dev = {
552 .platform_data = (void *)ad1836_link,
553 },
554};
555#endif
556
542static struct platform_device *ezkit_devices[] __initdata = { 557static struct platform_device *ezkit_devices[] __initdata = {
543 558
544 &bfin_dpmc, 559 &bfin_dpmc,
@@ -603,6 +618,11 @@ static struct platform_device *ezkit_devices[] __initdata = {
603#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 618#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
604 &bfin_ac97, 619 &bfin_ac97,
605#endif 620#endif
621
622#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \
623 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
624 &bfin_ad1836_machine,
625#endif
606}; 626};
607 627
608static int __init net2272_init(void) 628static int __init net2272_init(void)
diff --git a/arch/blackfin/mach-bf609/boards/ezkit.c b/arch/blackfin/mach-bf609/boards/ezkit.c
index c2cf1ae31189..61c1f47a4bf2 100644
--- a/arch/blackfin/mach-bf609/boards/ezkit.c
+++ b/arch/blackfin/mach-bf609/boards/ezkit.c
@@ -818,6 +818,21 @@ static struct platform_device bfin_i2s = {
818}; 818};
819#endif 819#endif
820 820
821#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
822 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
823static const char * const ad1836_link[] = {
824 "bfin-tdm.0",
825 "spi0.76",
826};
827static struct platform_device bfin_ad1836_machine = {
828 .name = "bfin-snd-ad1836",
829 .id = -1,
830 .dev = {
831 .platform_data = (void *)ad1836_link,
832 },
833};
834#endif
835
821#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) || \ 836#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) || \
822 defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61_MODULE) 837 defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61_MODULE)
823static struct platform_device adau1761_device = { 838static struct platform_device adau1761_device = {
@@ -1557,6 +1572,10 @@ static struct platform_device *ezkit_devices[] __initdata = {
1557 defined(CONFIG_SND_BF6XX_SOC_I2S_MODULE) 1572 defined(CONFIG_SND_BF6XX_SOC_I2S_MODULE)
1558 &bfin_i2s, 1573 &bfin_i2s,
1559#endif 1574#endif
1575#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \
1576 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
1577 &bfin_ad1836_machine,
1578#endif
1560#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) || \ 1579#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) || \
1561 defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61_MODULE) 1580 defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61_MODULE)
1562 &adau1761_device, 1581 &adau1761_device,