aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-pxa/include/mach/palmasoc.h7
-rw-r--r--arch/arm/mach-pxa/palmld.c18
-rw-r--r--arch/arm/mach-pxa/palmt5.c18
-rw-r--r--arch/arm/mach-pxa/palmtx.c23
4 files changed, 53 insertions, 13 deletions
diff --git a/arch/arm/mach-pxa/include/mach/palmasoc.h b/arch/arm/mach-pxa/include/mach/palmasoc.h
index 6c4b1f7de20a..58afb30d5298 100644
--- a/arch/arm/mach-pxa/include/mach/palmasoc.h
+++ b/arch/arm/mach-pxa/include/mach/palmasoc.h
@@ -1,13 +1,8 @@
1#ifndef _INCLUDE_PALMASOC_H_ 1#ifndef _INCLUDE_PALMASOC_H_
2#define _INCLUDE_PALMASOC_H_ 2#define _INCLUDE_PALMASOC_H_
3
3struct palm27x_asoc_info { 4struct palm27x_asoc_info {
4 int jack_gpio; 5 int jack_gpio;
5}; 6};
6 7
7#ifdef CONFIG_SND_PXA2XX_SOC_PALM27X
8void __init palm27x_asoc_set_pdata(struct palm27x_asoc_info *data);
9#else
10static inline void palm27x_asoc_set_pdata(struct palm27x_asoc_info *data) {}
11#endif
12
13#endif 8#endif
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c
index ecf5910e39d7..1cec1806f002 100644
--- a/arch/arm/mach-pxa/palmld.c
+++ b/arch/arm/mach-pxa/palmld.c
@@ -477,10 +477,22 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = {
477/****************************************************************************** 477/******************************************************************************
478 * aSoC audio 478 * aSoC audio
479 ******************************************************************************/ 479 ******************************************************************************/
480static struct palm27x_asoc_info palm27x_asoc_pdata = { 480static struct palm27x_asoc_info palmld_asoc_pdata = {
481 .jack_gpio = GPIO_NR_PALMLD_EARPHONE_DETECT, 481 .jack_gpio = GPIO_NR_PALMLD_EARPHONE_DETECT,
482}; 482};
483 483
484static pxa2xx_audio_ops_t palmld_ac97_pdata = {
485 .reset_gpio = 95,
486};
487
488static struct platform_device palmld_asoc = {
489 .name = "palm27x-asoc",
490 .id = -1,
491 .dev = {
492 .platform_data = &palmld_asoc_pdata,
493 },
494};
495
484/****************************************************************************** 496/******************************************************************************
485 * Framebuffer 497 * Framebuffer
486 ******************************************************************************/ 498 ******************************************************************************/
@@ -544,6 +556,7 @@ static struct platform_device *devices[] __initdata = {
544 &palmld_backlight, 556 &palmld_backlight,
545 &palmld_leds, 557 &palmld_leds,
546 &power_supply, 558 &power_supply,
559 &palmld_asoc,
547}; 560};
548 561
549static struct map_desc palmld_io_desc[] __initdata = { 562static struct map_desc palmld_io_desc[] __initdata = {
@@ -573,11 +586,10 @@ static void __init palmld_init(void)
573 586
574 set_pxa_fb_info(&palmld_lcd_screen); 587 set_pxa_fb_info(&palmld_lcd_screen);
575 pxa_set_mci_info(&palmld_mci_platform_data); 588 pxa_set_mci_info(&palmld_mci_platform_data);
576 pxa_set_ac97_info(NULL); 589 pxa_set_ac97_info(&palmld_ac97_pdata);
577 pxa_set_ficp_info(&palmld_ficp_platform_data); 590 pxa_set_ficp_info(&palmld_ficp_platform_data);
578 pxa_set_keypad_info(&palmld_keypad_platform_data); 591 pxa_set_keypad_info(&palmld_keypad_platform_data);
579 wm97xx_bat_set_pdata(&wm97xx_batt_pdata); 592 wm97xx_bat_set_pdata(&wm97xx_batt_pdata);
580 palm27x_asoc_set_pdata(&palm27x_asoc_pdata);
581 593
582 platform_add_devices(devices, ARRAY_SIZE(devices)); 594 platform_add_devices(devices, ARRAY_SIZE(devices));
583} 595}
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c
index d7f81068c613..30662363907b 100644
--- a/arch/arm/mach-pxa/palmt5.c
+++ b/arch/arm/mach-pxa/palmt5.c
@@ -420,10 +420,22 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = {
420/****************************************************************************** 420/******************************************************************************
421 * aSoC audio 421 * aSoC audio
422 ******************************************************************************/ 422 ******************************************************************************/
423static struct palm27x_asoc_info palm27x_asoc_pdata = { 423static struct palm27x_asoc_info palmt5_asoc_pdata = {
424 .jack_gpio = GPIO_NR_PALMT5_EARPHONE_DETECT, 424 .jack_gpio = GPIO_NR_PALMT5_EARPHONE_DETECT,
425}; 425};
426 426
427static pxa2xx_audio_ops_t palmt5_ac97_pdata = {
428 .reset_gpio = 95,
429};
430
431static struct platform_device palmt5_asoc = {
432 .name = "palm27x-asoc",
433 .id = -1,
434 .dev = {
435 .platform_data = &palmt5_asoc_pdata,
436 },
437};
438
427/****************************************************************************** 439/******************************************************************************
428 * Framebuffer 440 * Framebuffer
429 ******************************************************************************/ 441 ******************************************************************************/
@@ -486,6 +498,7 @@ static struct platform_device *devices[] __initdata = {
486#endif 498#endif
487 &palmt5_backlight, 499 &palmt5_backlight,
488 &power_supply, 500 &power_supply,
501 &palmt5_asoc,
489}; 502};
490 503
491/* setup udc GPIOs initial state */ 504/* setup udc GPIOs initial state */
@@ -504,12 +517,11 @@ static void __init palmt5_init(void)
504 set_pxa_fb_info(&palmt5_lcd_screen); 517 set_pxa_fb_info(&palmt5_lcd_screen);
505 pxa_set_mci_info(&palmt5_mci_platform_data); 518 pxa_set_mci_info(&palmt5_mci_platform_data);
506 palmt5_udc_init(); 519 palmt5_udc_init();
520 pxa_set_ac97_info(&palmt5_ac97_pdata);
507 pxa_set_udc_info(&palmt5_udc_info); 521 pxa_set_udc_info(&palmt5_udc_info);
508 pxa_set_ac97_info(NULL);
509 pxa_set_ficp_info(&palmt5_ficp_platform_data); 522 pxa_set_ficp_info(&palmt5_ficp_platform_data);
510 pxa_set_keypad_info(&palmt5_keypad_platform_data); 523 pxa_set_keypad_info(&palmt5_keypad_platform_data);
511 wm97xx_bat_set_pdata(&wm97xx_batt_pdata); 524 wm97xx_bat_set_pdata(&wm97xx_batt_pdata);
512 palm27x_asoc_set_pdata(&palm27x_asoc_pdata);
513 platform_add_devices(devices, ARRAY_SIZE(devices)); 525 platform_add_devices(devices, ARRAY_SIZE(devices));
514} 526}
515 527
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c
index 14393d0ad8b8..e2d44b1a8a9b 100644
--- a/arch/arm/mach-pxa/palmtx.c
+++ b/arch/arm/mach-pxa/palmtx.c
@@ -40,6 +40,7 @@
40#include <mach/irda.h> 40#include <mach/irda.h>
41#include <mach/pxa27x_keypad.h> 41#include <mach/pxa27x_keypad.h>
42#include <mach/udc.h> 42#include <mach/udc.h>
43#include <mach/palmasoc.h>
43 44
44#include "generic.h" 45#include "generic.h"
45#include "devices.h" 46#include "devices.h"
@@ -434,6 +435,25 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = {
434}; 435};
435 436
436/****************************************************************************** 437/******************************************************************************
438 * aSoC audio
439 ******************************************************************************/
440static struct palm27x_asoc_info palmtx_asoc_pdata = {
441 .jack_gpio = GPIO_NR_PALMTX_EARPHONE_DETECT,
442};
443
444static pxa2xx_audio_ops_t palmtx_ac97_pdata = {
445 .reset_gpio = 95,
446};
447
448static struct platform_device palmtx_asoc = {
449 .name = "palm27x-asoc",
450 .id = -1,
451 .dev = {
452 .platform_data = &palmtx_asoc_pdata,
453 },
454};
455
456/******************************************************************************
437 * Framebuffer 457 * Framebuffer
438 ******************************************************************************/ 458 ******************************************************************************/
439static struct pxafb_mode_info palmtx_lcd_modes[] = { 459static struct pxafb_mode_info palmtx_lcd_modes[] = {
@@ -495,6 +515,7 @@ static struct platform_device *devices[] __initdata = {
495#endif 515#endif
496 &palmtx_backlight, 516 &palmtx_backlight,
497 &power_supply, 517 &power_supply,
518 &palmtx_asoc,
498}; 519};
499 520
500static struct map_desc palmtx_io_desc[] __initdata = { 521static struct map_desc palmtx_io_desc[] __initdata = {
@@ -529,8 +550,8 @@ static void __init palmtx_init(void)
529 set_pxa_fb_info(&palmtx_lcd_screen); 550 set_pxa_fb_info(&palmtx_lcd_screen);
530 pxa_set_mci_info(&palmtx_mci_platform_data); 551 pxa_set_mci_info(&palmtx_mci_platform_data);
531 palmtx_udc_init(); 552 palmtx_udc_init();
553 pxa_set_ac97_info(&palmtx_ac97_pdata);
532 pxa_set_udc_info(&palmtx_udc_info); 554 pxa_set_udc_info(&palmtx_udc_info);
533 pxa_set_ac97_info(NULL);
534 pxa_set_ficp_info(&palmtx_ficp_platform_data); 555 pxa_set_ficp_info(&palmtx_ficp_platform_data);
535 pxa_set_keypad_info(&palmtx_keypad_platform_data); 556 pxa_set_keypad_info(&palmtx_keypad_platform_data);
536 wm97xx_bat_set_pdata(&wm97xx_batt_pdata); 557 wm97xx_bat_set_pdata(&wm97xx_batt_pdata);