aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
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/arm/mach-omap2
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/arm/mach-omap2')
-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
13 files changed, 59 insertions, 128 deletions
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__ */