aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2009-01-15 06:55:59 -0500
committerTony Lindgren <tony@atomide.com>2009-01-15 07:07:48 -0500
commite999bbe7f1318390e997d13e508e4f16b1b130af (patch)
tree876adfde20c84953da12a1808bccf58bab43d7eb
parent3127f8f8595a064b3f1a1837fea2177902589ac3 (diff)
ARM: OMAP: Remove unused platform devices, v3
This patch removes old platform devices. Alsa should now be using the ASoC driver. For boards not yet using ASoC, please see sound/soc/omap/osk5912.c. Add dummy aic23_power_up and aic23_power_down functions for 770 to keep things compiling. Remove references to omap_gpio_switch, and unused h2_nand_dev_ready function. This patch is based on an earlier patch by Arun KS. Cc: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Arun KS <arunks@mistralsolutions.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap1/board-h2.c45
-rw-r--r--arch/arm/mach-omap1/board-h3.c50
-rw-r--r--arch/arm/mach-omap1/board-innovator.c39
-rw-r--r--arch/arm/mach-omap1/board-nokia770.c8
-rw-r--r--arch/arm/mach-omap1/board-osk.c39
-rw-r--r--arch/arm/mach-omap1/board-palmte.c20
-rw-r--r--arch/arm/mach-omap1/board-palmtt.c41
-rw-r--r--arch/arm/mach-omap1/board-palmz71.c37
-rw-r--r--arch/arm/mach-omap1/board-sx1.c33
-rw-r--r--arch/arm/plat-omap/include/mach/aic23.h116
10 files changed, 9 insertions, 419 deletions
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index b240c5f861da..0d784a795092 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -37,16 +37,14 @@
37#include <asm/mach/flash.h> 37#include <asm/mach/flash.h>
38#include <asm/mach/map.h> 38#include <asm/mach/map.h>
39 39
40#include <mach/gpio-switch.h>
41#include <mach/mux.h> 40#include <mach/mux.h>
41#include <mach/dma.h>
42#include <mach/tc.h> 42#include <mach/tc.h>
43#include <mach/nand.h> 43#include <mach/nand.h>
44#include <mach/irda.h> 44#include <mach/irda.h>
45#include <mach/usb.h> 45#include <mach/usb.h>
46#include <mach/keypad.h> 46#include <mach/keypad.h>
47#include <mach/common.h> 47#include <mach/common.h>
48#include <mach/mcbsp.h>
49#include <mach/omap-alsa.h>
50 48
51static int h2_keymap[] = { 49static int h2_keymap[] = {
52 KEY(0, 0, KEY_LEFT), 50 KEY(0, 0, KEY_LEFT),
@@ -292,41 +290,6 @@ static struct platform_device h2_lcd_device = {
292 .id = -1, 290 .id = -1,
293}; 291};
294 292
295static struct omap_mcbsp_reg_cfg mcbsp_regs = {
296 .spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
297 .spcr1 = RINTM(3) | RRST,
298 .rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
299 RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(1),
300 .rcr1 = RFRLEN1(OMAP_MCBSP_WORD_8) | RWDLEN1(OMAP_MCBSP_WORD_16),
301 .xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) |
302 XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(1) | XFIG,
303 .xcr1 = XFRLEN1(OMAP_MCBSP_WORD_8) | XWDLEN1(OMAP_MCBSP_WORD_16),
304 .srgr1 = FWID(15),
305 .srgr2 = GSYNC | CLKSP | FSGM | FPER(31),
306
307 .pcr0 = CLKXM | CLKRM | FSXP | FSRP | CLKXP | CLKRP,
308 /*.pcr0 = CLKXP | CLKRP,*/ /* mcbsp: slave */
309};
310
311static struct omap_alsa_codec_config alsa_config = {
312 .name = "H2 TSC2101",
313 .mcbsp_regs_alsa = &mcbsp_regs,
314 .codec_configure_dev = NULL, /* tsc2101_configure, */
315 .codec_set_samplerate = NULL, /* tsc2101_set_samplerate, */
316 .codec_clock_setup = NULL, /* tsc2101_clock_setup, */
317 .codec_clock_on = NULL, /* tsc2101_clock_on, */
318 .codec_clock_off = NULL, /* tsc2101_clock_off, */
319 .get_default_samplerate = NULL, /* tsc2101_get_default_samplerate, */
320};
321
322static struct platform_device h2_mcbsp1_device = {
323 .name = "omap_alsa_mcbsp",
324 .id = 1,
325 .dev = {
326 .platform_data = &alsa_config,
327 },
328};
329
330static struct platform_device *h2_devices[] __initdata = { 293static struct platform_device *h2_devices[] __initdata = {
331 &h2_nor_device, 294 &h2_nor_device,
332 &h2_nand_device, 295 &h2_nand_device,
@@ -334,7 +297,6 @@ static struct platform_device *h2_devices[] __initdata = {
334 &h2_irda_device, 297 &h2_irda_device,
335 &h2_kp_device, 298 &h2_kp_device,
336 &h2_lcd_device, 299 &h2_lcd_device,
337 &h2_mcbsp1_device,
338}; 300};
339 301
340static void __init h2_init_smc91x(void) 302static void __init h2_init_smc91x(void)
@@ -409,11 +371,6 @@ static struct omap_board_config_kernel h2_config[] __initdata = {
409 371
410#define H2_NAND_RB_GPIO_PIN 62 372#define H2_NAND_RB_GPIO_PIN 62
411 373
412static int h2_nand_dev_ready(struct omap_nand_platform_data *data)
413{
414 return gpio_get_value(H2_NAND_RB_GPIO_PIN);
415}
416
417static void __init h2_init(void) 374static void __init h2_init(void)
418{ 375{
419 /* Here we assume the NOR boot config: NOR on CS3 (possibly swapped 376 /* Here we assume the NOR boot config: NOR on CS3 (possibly swapped
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index 5157eea9be35..bf08b6ad22ee 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -49,8 +49,6 @@
49#include <mach/keypad.h> 49#include <mach/keypad.h>
50#include <mach/dma.h> 50#include <mach/dma.h>
51#include <mach/common.h> 51#include <mach/common.h>
52#include <mach/mcbsp.h>
53#include <mach/omap-alsa.h>
54 52
55#define H3_TS_GPIO 48 53#define H3_TS_GPIO 48
56 54
@@ -387,41 +385,6 @@ static struct spi_board_info h3_spi_board_info[] __initdata = {
387 }, 385 },
388}; 386};
389 387
390static struct omap_mcbsp_reg_cfg mcbsp_regs = {
391 .spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
392 .spcr1 = RINTM(3) | RRST,
393 .rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
394 RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(1),
395 .rcr1 = RFRLEN1(OMAP_MCBSP_WORD_8) | RWDLEN1(OMAP_MCBSP_WORD_16),
396 .xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) |
397 XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(1) | XFIG,
398 .xcr1 = XFRLEN1(OMAP_MCBSP_WORD_8) | XWDLEN1(OMAP_MCBSP_WORD_16),
399 .srgr1 = FWID(15),
400 .srgr2 = GSYNC | CLKSP | FSGM | FPER(31),
401
402 .pcr0 = CLKRM | SCLKME | FSXP | FSRP | CLKXP | CLKRP,
403 /*.pcr0 = CLKXP | CLKRP,*/ /* mcbsp: slave */
404};
405
406static struct omap_alsa_codec_config alsa_config = {
407 .name = "H3 TSC2101",
408 .mcbsp_regs_alsa = &mcbsp_regs,
409 .codec_configure_dev = NULL, /* tsc2101_configure, */
410 .codec_set_samplerate = NULL, /* tsc2101_set_samplerate, */
411 .codec_clock_setup = NULL, /* tsc2101_clock_setup, */
412 .codec_clock_on = NULL, /* tsc2101_clock_on, */
413 .codec_clock_off = NULL, /* tsc2101_clock_off, */
414 .get_default_samplerate = NULL, /* tsc2101_get_default_samplerate, */
415};
416
417static struct platform_device h3_mcbsp1_device = {
418 .name = "omap_alsa_mcbsp",
419 .id = 1,
420 .dev = {
421 .platform_data = &alsa_config,
422 },
423};
424
425static struct platform_device *devices[] __initdata = { 388static struct platform_device *devices[] __initdata = {
426 &nor_device, 389 &nor_device,
427 &nand_device, 390 &nand_device,
@@ -430,7 +393,6 @@ static struct platform_device *devices[] __initdata = {
430 &h3_irda_device, 393 &h3_irda_device,
431 &h3_kp_device, 394 &h3_kp_device,
432 &h3_lcd_device, 395 &h3_lcd_device,
433 &h3_mcbsp1_device,
434}; 396};
435 397
436static struct omap_usb_config h3_usb_config __initdata = { 398static struct omap_usb_config h3_usb_config __initdata = {
@@ -472,18 +434,6 @@ static struct i2c_board_info __initdata h3_i2c_board_info[] = {
472 }, 434 },
473}; 435};
474 436
475static struct omap_gpio_switch h3_gpio_switches[] __initdata = {
476 {
477 .name = "mmc_slot",
478 .gpio = OMAP_MPUIO(1),
479 .type = OMAP_GPIO_SWITCH_TYPE_COVER,
480 .debounce_rising = 100,
481 .debounce_falling = 0,
482 .notify = h3_mmc_slot_cover_handler,
483 .notify_data = NULL,
484 },
485};
486
487#define H3_NAND_RB_GPIO_PIN 10 437#define H3_NAND_RB_GPIO_PIN 10
488 438
489static int nand_dev_ready(struct omap_nand_platform_data *data) 439static int nand_dev_ready(struct omap_nand_platform_data *data)
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c
index af2fb9070083..071cd02a734e 100644
--- a/arch/arm/mach-omap1/board-innovator.c
+++ b/arch/arm/mach-omap1/board-innovator.c
@@ -37,8 +37,6 @@
37#include <mach/usb.h> 37#include <mach/usb.h>
38#include <mach/keypad.h> 38#include <mach/keypad.h>
39#include <mach/common.h> 39#include <mach/common.h>
40#include <mach/mcbsp.h>
41#include <mach/omap-alsa.h>
42#include <mach/mmc.h> 40#include <mach/mmc.h>
43 41
44static int innovator_keymap[] = { 42static int innovator_keymap[] = {
@@ -115,42 +113,6 @@ static struct platform_device innovator_flash_device = {
115 .resource = &innovator_flash_resource, 113 .resource = &innovator_flash_resource,
116}; 114};
117 115
118#define DEFAULT_BITPERSAMPLE 16
119
120static struct omap_mcbsp_reg_cfg mcbsp_regs = {
121 .spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
122 .spcr1 = RINTM(3) | RRST,
123 .rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
124 RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(0),
125 .rcr1 = RFRLEN1(OMAP_MCBSP_WORD_8) | RWDLEN1(OMAP_MCBSP_WORD_16),
126 .xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) |
127 XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(0) | XFIG,
128 .xcr1 = XFRLEN1(OMAP_MCBSP_WORD_8) | XWDLEN1(OMAP_MCBSP_WORD_16),
129 .srgr1 = FWID(DEFAULT_BITPERSAMPLE - 1),
130 .srgr2 = GSYNC | CLKSP | FSGM | FPER(DEFAULT_BITPERSAMPLE * 2 - 1),
131 /*.pcr0 = FSXM | FSRM | CLKXM | CLKRM | CLKXP | CLKRP,*/ /* mcbsp: master */
132 .pcr0 = CLKXP | CLKRP, /* mcbsp: slave */
133};
134
135static struct omap_alsa_codec_config alsa_config = {
136 .name = "OMAP Innovator AIC23",
137 .mcbsp_regs_alsa = &mcbsp_regs,
138 .codec_configure_dev = NULL, /* aic23_configure, */
139 .codec_set_samplerate = NULL, /* aic23_set_samplerate, */
140 .codec_clock_setup = NULL, /* aic23_clock_setup, */
141 .codec_clock_on = NULL, /* aic23_clock_on, */
142 .codec_clock_off = NULL, /* aic23_clock_off, */
143 .get_default_samplerate = NULL, /* aic23_get_default_samplerate, */
144};
145
146static struct platform_device innovator_mcbsp1_device = {
147 .name = "omap_alsa_mcbsp",
148 .id = 1,
149 .dev = {
150 .platform_data = &alsa_config,
151 },
152};
153
154static struct resource innovator_kp_resources[] = { 116static struct resource innovator_kp_resources[] = {
155 [0] = { 117 [0] = {
156 .start = INT_KEYBOARD, 118 .start = INT_KEYBOARD,
@@ -227,7 +189,6 @@ static struct platform_device innovator1510_spi_device = {
227static struct platform_device *innovator1510_devices[] __initdata = { 189static struct platform_device *innovator1510_devices[] __initdata = {
228 &innovator_flash_device, 190 &innovator_flash_device,
229 &innovator1510_smc91x_device, 191 &innovator1510_smc91x_device,
230 &innovator_mcbsp1_device,
231 &innovator_kp_device, 192 &innovator_kp_device,
232 &innovator1510_lcd_device, 193 &innovator1510_lcd_device,
233 &innovator1510_spi_device, 194 &innovator1510_spi_device,
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index 4970c402a594..af51e0b180f2 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -32,7 +32,6 @@
32#include <mach/keypad.h> 32#include <mach/keypad.h>
33#include <mach/common.h> 33#include <mach/common.h>
34#include <mach/dsp_common.h> 34#include <mach/dsp_common.h>
35#include <mach/aic23.h>
36#include <mach/omapfb.h> 35#include <mach/omapfb.h>
37#include <mach/lcd_mipid.h> 36#include <mach/lcd_mipid.h>
38#include <mach/mmc.h> 37#include <mach/mmc.h>
@@ -261,6 +260,13 @@ static DEFINE_MUTEX(audio_pwr_lock);
261 */ 260 */
262static int audio_pwr_state = -1; 261static int audio_pwr_state = -1;
263 262
263static inline void aic23_power_up(void)
264{
265}
266static inline void aic23_power_down(void)
267{
268}
269
264/* 270/*
265 * audio_pwr_up / down should be called under audio_pwr_lock 271 * audio_pwr_up / down should be called under audio_pwr_lock
266 */ 272 */
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index d17952fa2e65..1a16ecb2ccc8 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -51,8 +51,6 @@
51#include <mach/mux.h> 51#include <mach/mux.h>
52#include <mach/tc.h> 52#include <mach/tc.h>
53#include <mach/common.h> 53#include <mach/common.h>
54#include <mach/mcbsp.h>
55#include <mach/omap-alsa.h>
56 54
57static struct mtd_partition osk_partitions[] = { 55static struct mtd_partition osk_partitions[] = {
58 /* bootloader (U-Boot, etc) in first sector */ 56 /* bootloader (U-Boot, etc) in first sector */
@@ -141,47 +139,10 @@ static struct platform_device osk5912_cf_device = {
141 .resource = osk5912_cf_resources, 139 .resource = osk5912_cf_resources,
142}; 140};
143 141
144#define DEFAULT_BITPERSAMPLE 16
145
146static struct omap_mcbsp_reg_cfg mcbsp_regs = {
147 .spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
148 .spcr1 = RINTM(3) | RRST,
149 .rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
150 RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(0),
151 .rcr1 = RFRLEN1(OMAP_MCBSP_WORD_8) | RWDLEN1(OMAP_MCBSP_WORD_16),
152 .xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) |
153 XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(0) | XFIG,
154 .xcr1 = XFRLEN1(OMAP_MCBSP_WORD_8) | XWDLEN1(OMAP_MCBSP_WORD_16),
155 .srgr1 = FWID(DEFAULT_BITPERSAMPLE - 1),
156 .srgr2 = GSYNC | CLKSP | FSGM | FPER(DEFAULT_BITPERSAMPLE * 2 - 1),
157 /*.pcr0 = FSXM | FSRM | CLKXM | CLKRM | CLKXP | CLKRP,*/ /* mcbsp: master */
158 .pcr0 = CLKXP | CLKRP, /* mcbsp: slave */
159};
160
161static struct omap_alsa_codec_config alsa_config = {
162 .name = "OSK AIC23",
163 .mcbsp_regs_alsa = &mcbsp_regs,
164 .codec_configure_dev = NULL, /* aic23_configure, */
165 .codec_set_samplerate = NULL, /* aic23_set_samplerate, */
166 .codec_clock_setup = NULL, /* aic23_clock_setup, */
167 .codec_clock_on = NULL, /* aic23_clock_on, */
168 .codec_clock_off = NULL, /* aic23_clock_off, */
169 .get_default_samplerate = NULL, /* aic23_get_default_samplerate, */
170};
171
172static struct platform_device osk5912_mcbsp1_device = {
173 .name = "omap_alsa_mcbsp",
174 .id = 1,
175 .dev = {
176 .platform_data = &alsa_config,
177 },
178};
179
180static struct platform_device *osk5912_devices[] __initdata = { 142static struct platform_device *osk5912_devices[] __initdata = {
181 &osk5912_flash_device, 143 &osk5912_flash_device,
182 &osk5912_smc91x_device, 144 &osk5912_smc91x_device,
183 &osk5912_cf_device, 145 &osk5912_cf_device,
184 &osk5912_mcbsp1_device,
185}; 146};
186 147
187static struct gpio_led tps_leds[] = { 148static struct gpio_led tps_leds[] = {
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c
index 00322f42f455..99f2b43f2541 100644
--- a/arch/arm/mach-omap1/board-palmte.c
+++ b/arch/arm/mach-omap1/board-palmte.c
@@ -42,8 +42,6 @@
42#include <mach/irda.h> 42#include <mach/irda.h>
43#include <mach/keypad.h> 43#include <mach/keypad.h>
44#include <mach/common.h> 44#include <mach/common.h>
45#include <mach/mcbsp.h>
46#include <mach/omap-alsa.h>
47 45
48static void __init omap_palmte_init_irq(void) 46static void __init omap_palmte_init_irq(void)
49{ 47{
@@ -203,24 +201,6 @@ static struct omap_uart_config palmte_uart_config __initdata = {
203 .enabled_uarts = (1 << 0) | (1 << 1) | (0 << 2), 201 .enabled_uarts = (1 << 0) | (1 << 1) | (0 << 2),
204}; 202};
205 203
206static struct omap_mcbsp_reg_cfg palmte_mcbsp1_regs = {
207 .spcr2 = FRST | GRST | XRST | XINTM(3),
208 .xcr2 = XDATDLY(1) | XFIG,
209 .xcr1 = XWDLEN1(OMAP_MCBSP_WORD_32),
210 .pcr0 = SCLKME | FSXP | CLKXP,
211};
212
213static struct omap_alsa_codec_config palmte_alsa_config = {
214 .name = "TSC2102 audio",
215 .mcbsp_regs_alsa = &palmte_mcbsp1_regs,
216 .codec_configure_dev = NULL, /* tsc2102_configure, */
217 .codec_set_samplerate = NULL, /* tsc2102_set_samplerate, */
218 .codec_clock_setup = NULL, /* tsc2102_clock_setup, */
219 .codec_clock_on = NULL, /* tsc2102_clock_on, */
220 .codec_clock_off = NULL, /* tsc2102_clock_off, */
221 .get_default_samplerate = NULL, /* tsc2102_get_default_samplerate, */
222};
223
224#ifdef CONFIG_APM 204#ifdef CONFIG_APM
225/* 205/*
226 * Values measured in 10 minute intervals averaged over 10 samples. 206 * Values measured in 10 minute intervals averaged over 10 samples.
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c
index 5c001afe8062..1cbc1275c95f 100644
--- a/arch/arm/mach-omap1/board-palmtt.c
+++ b/arch/arm/mach-omap1/board-palmtt.c
@@ -30,7 +30,6 @@
30#include <asm/mach/flash.h> 30#include <asm/mach/flash.h>
31 31
32#include <mach/led.h> 32#include <mach/led.h>
33#include <mach/mcbsp.h>
34#include <mach/gpio.h> 33#include <mach/gpio.h>
35#include <mach/mux.h> 34#include <mach/mux.h>
36#include <mach/usb.h> 35#include <mach/usb.h>
@@ -40,7 +39,6 @@
40#include <mach/irda.h> 39#include <mach/irda.h>
41#include <mach/keypad.h> 40#include <mach/keypad.h>
42#include <mach/common.h> 41#include <mach/common.h>
43#include <mach/omap-alsa.h>
44 42
45#include <linux/spi/spi.h> 43#include <linux/spi/spi.h>
46#include <linux/spi/ads7846.h> 44#include <linux/spi/ads7846.h>
@@ -122,44 +120,6 @@ static struct platform_device palmtt_flash_device = {
122 .resource = &palmtt_flash_resource, 120 .resource = &palmtt_flash_resource,
123}; 121};
124 122
125#define DEFAULT_BITPERSAMPLE 16
126
127static struct omap_mcbsp_reg_cfg mcbsp_regs = {
128 .spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
129 .spcr1 = RINTM(3) | RRST,
130 .rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
131 RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(0),
132 .rcr1 = RFRLEN1(OMAP_MCBSP_WORD_8) |
133 RWDLEN1(OMAP_MCBSP_WORD_16),
134 .xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) |
135 XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(0) | XFIG,
136 .xcr1 = XFRLEN1(OMAP_MCBSP_WORD_8) |
137 XWDLEN1(OMAP_MCBSP_WORD_16),
138 .srgr1 = FWID(DEFAULT_BITPERSAMPLE - 1),
139 .srgr2 = GSYNC | CLKSP | FSGM |
140 FPER(DEFAULT_BITPERSAMPLE * 2 - 1),
141 .pcr0 = CLKXP | CLKRP, /* mcbsp: slave */
142};
143
144static struct omap_alsa_codec_config alsa_config = {
145 .name = "PalmTT AIC23",
146 .mcbsp_regs_alsa = &mcbsp_regs,
147 .codec_configure_dev = NULL, /* aic23_configure, */
148 .codec_set_samplerate = NULL, /* aic23_set_samplerate, */
149 .codec_clock_setup = NULL, /* aic23_clock_setup, */
150 .codec_clock_on = NULL, /* aic23_clock_on, */
151 .codec_clock_off = NULL, /* aic23_clock_off, */
152 .get_default_samplerate = NULL, /* aic23_get_default_samplerate, */
153};
154
155static struct platform_device palmtt_mcbsp1_device = {
156 .name = "omap_alsa_mcbsp",
157 .id = 1,
158 .dev = {
159 .platform_data = &alsa_config,
160 },
161};
162
163static struct resource palmtt_kp_resources[] = { 123static struct resource palmtt_kp_resources[] = {
164 [0] = { 124 [0] = {
165 .start = INT_KEYBOARD, 125 .start = INT_KEYBOARD,
@@ -257,7 +217,6 @@ static struct platform_device palmtt_led_device = {
257 217
258static struct platform_device *palmtt_devices[] __initdata = { 218static struct platform_device *palmtt_devices[] __initdata = {
259 &palmtt_flash_device, 219 &palmtt_flash_device,
260 &palmtt_mcbsp1_device,
261 &palmtt_kp_device, 220 &palmtt_kp_device,
262 &palmtt_lcd_device, 221 &palmtt_lcd_device,
263 &palmtt_irda_device, 222 &palmtt_irda_device,
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
index cc05257eb1cd..baf5efbfe3e8 100644
--- a/arch/arm/mach-omap1/board-palmz71.c
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -32,7 +32,6 @@
32#include <asm/mach/map.h> 32#include <asm/mach/map.h>
33#include <asm/mach/flash.h> 33#include <asm/mach/flash.h>
34 34
35#include <mach/mcbsp.h>
36#include <mach/gpio.h> 35#include <mach/gpio.h>
37#include <mach/mux.h> 36#include <mach/mux.h>
38#include <mach/usb.h> 37#include <mach/usb.h>
@@ -179,41 +178,6 @@ static struct platform_device palmz71_spi_device = {
179 .id = -1, 178 .id = -1,
180}; 179};
181 180
182#define DEFAULT_BITPERSAMPLE 16
183
184static struct omap_mcbsp_reg_cfg mcbsp_regs = {
185 .spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
186 .spcr1 = RINTM(3) | RRST,
187 .rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
188 RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(0),
189 .rcr1 = RFRLEN1(OMAP_MCBSP_WORD_8) | RWDLEN1(OMAP_MCBSP_WORD_16),
190 .xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) |
191 XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(0) | XFIG,
192 .xcr1 = XFRLEN1(OMAP_MCBSP_WORD_8) | XWDLEN1(OMAP_MCBSP_WORD_16),
193 .srgr1 = FWID(DEFAULT_BITPERSAMPLE - 1),
194 .srgr2 = GSYNC | CLKSP | FSGM | FPER(DEFAULT_BITPERSAMPLE * 2 - 1),
195 .pcr0 = CLKXP | CLKRP, /* mcbsp: slave */
196};
197
198static struct omap_alsa_codec_config alsa_config = {
199 .name = "PalmZ71 AIC23",
200 .mcbsp_regs_alsa = &mcbsp_regs,
201 .codec_configure_dev = NULL, /* aic23_configure */
202 .codec_set_samplerate = NULL, /* aic23_set_samplerate */
203 .codec_clock_setup = NULL, /* aic23_clock_setup */
204 .codec_clock_on = NULL, /* aic23_clock_on */
205 .codec_clock_off = NULL, /* aic23_clock_off */
206 .get_default_samplerate = NULL, /* aic23_get_default_samplerate */
207};
208
209static struct platform_device palmz71_mcbsp1_device = {
210 .name = "omap_alsa_mcbsp",
211 .id = 1,
212 .dev = {
213 .platform_data = &alsa_config,
214 },
215};
216
217static struct omap_backlight_config palmz71_backlight_config = { 181static struct omap_backlight_config palmz71_backlight_config = {
218 .default_intensity = 0xa0, 182 .default_intensity = 0xa0,
219}; 183};
@@ -229,7 +193,6 @@ static struct platform_device palmz71_backlight_device = {
229static struct platform_device *devices[] __initdata = { 193static struct platform_device *devices[] __initdata = {
230 &palmz71_rom_device, 194 &palmz71_rom_device,
231 &palmz71_kp_device, 195 &palmz71_kp_device,
232 &palmz71_mcbsp1_device,
233 &palmz71_lcd_device, 196 &palmz71_lcd_device,
234 &palmz71_irda_device, 197 &palmz71_irda_device,
235 &palmz71_spi_device, 198 &palmz71_spi_device,
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c
index 09a242261a3d..28c76a1e71c0 100644
--- a/arch/arm/mach-omap1/board-sx1.c
+++ b/arch/arm/mach-omap1/board-sx1.c
@@ -34,13 +34,12 @@
34 34
35#include <mach/gpio.h> 35#include <mach/gpio.h>
36#include <mach/mux.h> 36#include <mach/mux.h>
37#include <mach/dma.h>
37#include <mach/irda.h> 38#include <mach/irda.h>
38#include <mach/usb.h> 39#include <mach/usb.h>
39#include <mach/tc.h> 40#include <mach/tc.h>
40#include <mach/board.h> 41#include <mach/board.h>
41#include <mach/common.h> 42#include <mach/common.h>
42#include <mach/mcbsp.h>
43#include <mach/omap-alsa.h>
44#include <mach/keypad.h> 43#include <mach/keypad.h>
45 44
46/* Write to I2C device */ 45/* Write to I2C device */
@@ -254,35 +253,6 @@ static struct platform_device sx1_irda_device = {
254 .resource = sx1_irda_resources, 253 .resource = sx1_irda_resources,
255}; 254};
256 255
257/*----------- McBSP & Sound -------------------------*/
258
259/* Playback interface - McBSP1 */
260static struct omap_mcbsp_reg_cfg mcbsp1_regs = {
261 .spcr2 = XINTM(3), /* SPCR2=30 */
262 .spcr1 = RINTM(3), /* SPCR1=30 */
263 .rcr2 = 0, /* RCR2 =00 */
264 .rcr1 = RFRLEN1(1) | RWDLEN1(OMAP_MCBSP_WORD_16), /* RCR1=140 */
265 .xcr2 = 0, /* XCR2 = 0 */
266 .xcr1 = XFRLEN1(1) | XWDLEN1(OMAP_MCBSP_WORD_16), /* XCR1 = 140 */
267 .srgr1 = FWID(15) | CLKGDV(12), /* SRGR1=0f0c */
268 .srgr2 = FSGM | FPER(31), /* SRGR2=101f */
269 .pcr0 = FSXM | FSRM | CLKXM | CLKRM | FSXP | FSRP | CLKXP | CLKRP,
270 /* PCR0 =0f0f */
271};
272
273static struct omap_alsa_codec_config sx1_alsa_config = {
274 .name = "SX1 EGold",
275 .mcbsp_regs_alsa = &mcbsp1_regs,
276};
277
278static struct platform_device sx1_mcbsp1_device = {
279 .name = "omap_alsa_mcbsp",
280 .id = 1,
281 .dev = {
282 .platform_data = &sx1_alsa_config,
283 },
284};
285
286/*----------- MTD -------------------------*/ 256/*----------- MTD -------------------------*/
287 257
288static struct mtd_partition sx1_partitions[] = { 258static struct mtd_partition sx1_partitions[] = {
@@ -394,7 +364,6 @@ static struct platform_device *sx1_devices[] __initdata = {
394 &sx1_flash_device, 364 &sx1_flash_device,
395 &sx1_kp_device, 365 &sx1_kp_device,
396 &sx1_lcd_device, 366 &sx1_lcd_device,
397 &sx1_mcbsp1_device,
398 &sx1_irda_device, 367 &sx1_irda_device,
399}; 368};
400/*-----------------------------------------*/ 369/*-----------------------------------------*/
diff --git a/arch/arm/plat-omap/include/mach/aic23.h b/arch/arm/plat-omap/include/mach/aic23.h
deleted file mode 100644
index 5ccedac77526..000000000000
--- a/arch/arm/plat-omap/include/mach/aic23.h
+++ /dev/null
@@ -1,116 +0,0 @@
1/*
2 * arch/arm/plat-omap/include/mach/aic23.h
3 *
4 * Hardware definitions for TI TLV320AIC23 audio codec
5 *
6 * Copyright (C) 2002 RidgeRun, Inc.
7 * Author: Steve Johnson
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 *
14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
17 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
20 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 * You should have received a copy of the GNU General Public License along
26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 675 Mass Ave, Cambridge, MA 02139, USA.
28 */
29
30#ifndef __ASM_ARCH_AIC23_H
31#define __ASM_ARCH_AIC23_H
32
33// Codec TLV320AIC23
34#define LEFT_LINE_VOLUME_ADDR 0x00
35#define RIGHT_LINE_VOLUME_ADDR 0x01
36#define LEFT_CHANNEL_VOLUME_ADDR 0x02
37#define RIGHT_CHANNEL_VOLUME_ADDR 0x03
38#define ANALOG_AUDIO_CONTROL_ADDR 0x04
39#define DIGITAL_AUDIO_CONTROL_ADDR 0x05
40#define POWER_DOWN_CONTROL_ADDR 0x06
41#define DIGITAL_AUDIO_FORMAT_ADDR 0x07
42#define SAMPLE_RATE_CONTROL_ADDR 0x08
43#define DIGITAL_INTERFACE_ACT_ADDR 0x09
44#define RESET_CONTROL_ADDR 0x0F
45
46// Left (right) line input volume control register
47#define LRS_ENABLED 0x0100
48#define LIM_MUTED 0x0080
49#define LIV_DEFAULT 0x0017
50#define LIV_MAX 0x001f
51#define LIV_MIN 0x0000
52
53// Left (right) channel headphone volume control register
54#define LZC_ON 0x0080
55#define LHV_DEFAULT 0x0079
56#define LHV_MAX 0x007f
57#define LHV_MIN 0x0000
58
59// Analog audio path control register
60#define STA_REG(x) ((x)<<6)
61#define STE_ENABLED 0x0020
62#define DAC_SELECTED 0x0010
63#define BYPASS_ON 0x0008
64#define INSEL_MIC 0x0004
65#define MICM_MUTED 0x0002
66#define MICB_20DB 0x0001
67
68// Digital audio path control register
69#define DACM_MUTE 0x0008
70#define DEEMP_32K 0x0002
71#define DEEMP_44K 0x0004
72#define DEEMP_48K 0x0006
73#define ADCHP_ON 0x0001
74
75// Power control down register
76#define DEVICE_POWER_OFF 0x0080
77#define CLK_OFF 0x0040
78#define OSC_OFF 0x0020
79#define OUT_OFF 0x0010
80#define DAC_OFF 0x0008
81#define ADC_OFF 0x0004
82#define MIC_OFF 0x0002
83#define LINE_OFF 0x0001
84
85// Digital audio interface register
86#define MS_MASTER 0x0040
87#define LRSWAP_ON 0x0020
88#define LRP_ON 0x0010
89#define IWL_16 0x0000
90#define IWL_20 0x0004
91#define IWL_24 0x0008
92#define IWL_32 0x000C
93#define FOR_I2S 0x0002
94#define FOR_DSP 0x0003
95
96// Sample rate control register
97#define CLKOUT_HALF 0x0080
98#define CLKIN_HALF 0x0040
99#define BOSR_384fs 0x0002 // BOSR_272fs when in USB mode
100#define USB_CLK_ON 0x0001
101#define SR_MASK 0xf
102#define CLKOUT_SHIFT 7
103#define CLKIN_SHIFT 6
104#define SR_SHIFT 2
105#define BOSR_SHIFT 1
106
107// Digital interface register
108#define ACT_ON 0x0001
109
110#define TLV320AIC23ID1 (0x1a) // cs low
111#define TLV320AIC23ID2 (0x1b) // cs high
112
113void aic23_power_up(void);
114void aic23_power_down(void);
115
116#endif /* __ASM_ARCH_AIC23_H */