aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-04-20 09:03:04 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-04-20 09:03:04 -0400
commit64bd43a086469a0bfdd87e012523184bdd96ce81 (patch)
treef44ff7df4bae5ac265f68885663a790885895666 /arch
parent4a014a240b5a3c3b167702948a22dbe9e9a150a8 (diff)
parenta48dc30da44769ea3f3562c18f54878a9a3e78a1 (diff)
Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-pxa/include/mach/audio.h10
-rw-r--r--arch/arm/mach-pxa/include/mach/palmasoc.h7
-rw-r--r--arch/arm/mach-pxa/mioa701.c6
-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
-rw-r--r--arch/arm/mach-pxa/pcm990-baseboard.c6
7 files changed, 71 insertions, 17 deletions
diff --git a/arch/arm/mach-pxa/include/mach/audio.h b/arch/arm/mach-pxa/include/mach/audio.h
index f82f96dd1053..16eb02552d5d 100644
--- a/arch/arm/mach-pxa/include/mach/audio.h
+++ b/arch/arm/mach-pxa/include/mach/audio.h
@@ -4,12 +4,22 @@
4#include <sound/core.h> 4#include <sound/core.h>
5#include <sound/pcm.h> 5#include <sound/pcm.h>
6 6
7/*
8 * @reset_gpio: AC97 reset gpio (normally gpio113 or gpio95)
9 * a -1 value means no gpio will be used for reset
10
11 * reset_gpio should only be specified for pxa27x CPUs where a silicon
12 * bug prevents correct operation of the reset line. If not specified,
13 * the default behaviour on these CPUs is to consider gpio 113 as the
14 * AC97 reset line, which is the default on most boards.
15 */
7typedef struct { 16typedef struct {
8 int (*startup)(struct snd_pcm_substream *, void *); 17 int (*startup)(struct snd_pcm_substream *, void *);
9 void (*shutdown)(struct snd_pcm_substream *, void *); 18 void (*shutdown)(struct snd_pcm_substream *, void *);
10 void (*suspend)(void *); 19 void (*suspend)(void *);
11 void (*resume)(void *); 20 void (*resume)(void *);
12 void *priv; 21 void *priv;
22 int reset_gpio;
13} pxa2xx_audio_ops_t; 23} pxa2xx_audio_ops_t;
14 24
15extern void pxa_set_ac97_info(pxa2xx_audio_ops_t *ops); 25extern void pxa_set_ac97_info(pxa2xx_audio_ops_t *ops);
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/mioa701.c b/arch/arm/mach-pxa/mioa701.c
index 9203b069b35c..ff8052ce0a05 100644
--- a/arch/arm/mach-pxa/mioa701.c
+++ b/arch/arm/mach-pxa/mioa701.c
@@ -742,6 +742,10 @@ struct i2c_pxa_platform_data i2c_pdata = {
742 .fast_mode = 1, 742 .fast_mode = 1,
743}; 743};
744 744
745static pxa2xx_audio_ops_t mioa701_ac97_info = {
746 .reset_gpio = 95,
747};
748
745/* 749/*
746 * Mio global 750 * Mio global
747 */ 751 */
@@ -815,7 +819,7 @@ static void __init mioa701_machine_init(void)
815 pxa_set_keypad_info(&mioa701_keypad_info); 819 pxa_set_keypad_info(&mioa701_keypad_info);
816 wm97xx_bat_set_pdata(&mioa701_battery_data); 820 wm97xx_bat_set_pdata(&mioa701_battery_data);
817 pxa_set_udc_info(&mioa701_udc_info); 821 pxa_set_udc_info(&mioa701_udc_info);
818 pxa_set_ac97_info(NULL); 822 pxa_set_ac97_info(&mioa701_ac97_info);
819 pm_power_off = mioa701_poweroff; 823 pm_power_off = mioa701_poweroff;
820 arm_pm_restart = mioa701_restart; 824 arm_pm_restart = mioa701_restart;
821 platform_add_devices(devices, ARRAY_SIZE(devices)); 825 platform_add_devices(devices, ARRAY_SIZE(devices));
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);
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
index 6112740b4ae9..6c12b5a3132f 100644
--- a/arch/arm/mach-pxa/pcm990-baseboard.c
+++ b/arch/arm/mach-pxa/pcm990-baseboard.c
@@ -377,7 +377,7 @@ struct pxacamera_platform_data pcm990_pxacamera_platform_data = {
377#include <linux/i2c/pca953x.h> 377#include <linux/i2c/pca953x.h>
378 378
379static struct pca953x_platform_data pca9536_data = { 379static struct pca953x_platform_data pca9536_data = {
380 .gpio_base = NR_BUILTIN_GPIO + 1, 380 .gpio_base = NR_BUILTIN_GPIO,
381}; 381};
382 382
383static int gpio_bus_switch; 383static int gpio_bus_switch;
@@ -405,9 +405,9 @@ static unsigned long pcm990_camera_query_bus_param(struct soc_camera_link *link)
405 int ret; 405 int ret;
406 406
407 if (!gpio_bus_switch) { 407 if (!gpio_bus_switch) {
408 ret = gpio_request(NR_BUILTIN_GPIO + 1, "camera"); 408 ret = gpio_request(NR_BUILTIN_GPIO, "camera");
409 if (!ret) { 409 if (!ret) {
410 gpio_bus_switch = NR_BUILTIN_GPIO + 1; 410 gpio_bus_switch = NR_BUILTIN_GPIO;
411 gpio_direction_output(gpio_bus_switch, 0); 411 gpio_direction_output(gpio_bus_switch, 0);
412 } else 412 } else
413 gpio_bus_switch = -EINVAL; 413 gpio_bus_switch = -EINVAL;