diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 18:18:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 18:18:06 -0400 |
commit | d973664992d814d93db161b28c0cc9a4c7e68f42 (patch) | |
tree | 03de3a9ef1f8f0d5dcd2e3c217c4fdf334f6691e /arch/arm/mach-pxa | |
parent | 2d5e3e8d28a7820de1eb7b18a7c15d645bb26992 (diff) | |
parent | 9d87dd97ffcd3b5eb2bbaf0d5d93f4bfcaed3f04 (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (26 commits)
[ARM] pxa: fix 1c104e0e4f6ab396960c058e95e18bdedcac945b
[ARM] serial: s3c2410: platform_get_irq() may return signed unnoticed
[ARM] am79c961a: platform_get_irq() may return signed unnoticed
[ARM] Feroceon: Feroceon-specific WA-cache compatible {copy,clear}_user_page()
[ARM] Feroceon: fix function alignment in proc-feroceon.S
[ARM] Orion: catch a couple more alternative spellings of PCIe
[ARM] Orion: fix orion-ehci platform resource end addresses
[ARM] Orion: fix ->map_irq() PCIe bus number check
[ARM] Orion: fix ioremap() optimization
[ARM] feroceon: remove CONFIG_CPU_CACHE_ROUND_ROBIN check
[ARM] feroceon: remove CONFIG_CPU_DCACHE_WRITETHROUGH check
kprobes/arm: fix decoding of arithmetic immediate instructions
kprobes/arm: fix cache flush address for instruction stub
[ARM] 5022/1: Race in ARM MMCI PL18x driver, V2
[ARM] 5021/1: at91: buildfix for sam9263 + PM
[ARM] 5018/1: RealView: Fix the ARM11MPCore Oprofile compilation
[ARM] 5016/1: AT91: typo in mci configuration for at91cap at91sam9263
[ARM] 5017/1: pxa3xx: Report unsupported wakeup sources in pxa3xx_set_wake()
[ARM] 5020/1: magician: remove __devinit marker from pasic3_leds_info
[ARM] 5014/1: Cleanup reset state before entering suspend or resetting.
...
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/Makefile | 6 | ||||
-rw-r--r-- | arch/arm/mach-pxa/gumstix.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/magician.c | 61 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pm.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa3xx.c | 2 |
5 files changed, 60 insertions, 14 deletions
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index 7cdcb459ea9d..6a830853aa6a 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile | |||
@@ -5,9 +5,9 @@ | |||
5 | # Common support (must be linked before board specific support) | 5 | # Common support (must be linked before board specific support) |
6 | obj-y += clock.o devices.o generic.o irq.o dma.o \ | 6 | obj-y += clock.o devices.o generic.o irq.o dma.o \ |
7 | time.o gpio.o | 7 | time.o gpio.o |
8 | obj-$(CONFIG_PXA25x) += pxa25x.o mfp-pxa2xx.o | 8 | obj-$(CONFIG_PXA25x) += mfp-pxa2xx.o pxa25x.o |
9 | obj-$(CONFIG_PXA27x) += pxa27x.o mfp-pxa2xx.o | 9 | obj-$(CONFIG_PXA27x) += mfp-pxa2xx.o pxa27x.o |
10 | obj-$(CONFIG_PXA3xx) += pxa3xx.o mfp-pxa3xx.o smemc.o | 10 | obj-$(CONFIG_PXA3xx) += mfp-pxa3xx.o pxa3xx.o smemc.o |
11 | obj-$(CONFIG_CPU_PXA300) += pxa300.o | 11 | obj-$(CONFIG_CPU_PXA300) += pxa300.o |
12 | obj-$(CONFIG_CPU_PXA320) += pxa320.o | 12 | obj-$(CONFIG_CPU_PXA320) += pxa320.o |
13 | 13 | ||
diff --git a/arch/arm/mach-pxa/gumstix.c b/arch/arm/mach-pxa/gumstix.c index f01d18544133..bdf239754037 100644 --- a/arch/arm/mach-pxa/gumstix.c +++ b/arch/arm/mach-pxa/gumstix.c | |||
@@ -40,6 +40,7 @@ | |||
40 | 40 | ||
41 | #include <asm/arch/pxa-regs.h> | 41 | #include <asm/arch/pxa-regs.h> |
42 | #include <asm/arch/pxa2xx-regs.h> | 42 | #include <asm/arch/pxa2xx-regs.h> |
43 | #include <asm/arch/pxa2xx-gpio.h> | ||
43 | 44 | ||
44 | #include "generic.h" | 45 | #include "generic.h" |
45 | 46 | ||
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index d70be75bd199..badba064dc04 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c | |||
@@ -114,6 +114,14 @@ static unsigned long magician_pin_config[] = { | |||
114 | GPIO82_CIF_DD_5, | 114 | GPIO82_CIF_DD_5, |
115 | GPIO84_CIF_FV, | 115 | GPIO84_CIF_FV, |
116 | GPIO85_CIF_LV, | 116 | GPIO85_CIF_LV, |
117 | |||
118 | /* Magician specific input GPIOs */ | ||
119 | GPIO9_GPIO, /* unknown */ | ||
120 | GPIO10_GPIO, /* GSM_IRQ */ | ||
121 | GPIO13_GPIO, /* CPLD_IRQ */ | ||
122 | GPIO107_GPIO, /* DS1WM_IRQ */ | ||
123 | GPIO108_GPIO, /* GSM_READY */ | ||
124 | GPIO115_GPIO, /* nPEN_IRQ */ | ||
117 | }; | 125 | }; |
118 | 126 | ||
119 | /* | 127 | /* |
@@ -438,7 +446,7 @@ static struct pasic3_led pasic3_leds[] = { | |||
438 | 446 | ||
439 | static struct platform_device pasic3; | 447 | static struct platform_device pasic3; |
440 | 448 | ||
441 | static struct pasic3_leds_machinfo __devinit pasic3_leds_info = { | 449 | static struct pasic3_leds_machinfo pasic3_leds_info = { |
442 | .num_leds = ARRAY_SIZE(pasic3_leds), | 450 | .num_leds = ARRAY_SIZE(pasic3_leds), |
443 | .power_gpio = EGPIO_MAGICIAN_LED_POWER, | 451 | .power_gpio = EGPIO_MAGICIAN_LED_POWER, |
444 | .leds = pasic3_leds, | 452 | .leds = pasic3_leds, |
@@ -543,9 +551,28 @@ static struct platform_device power_supply = { | |||
543 | static int magician_mci_init(struct device *dev, | 551 | static int magician_mci_init(struct device *dev, |
544 | irq_handler_t detect_irq, void *data) | 552 | irq_handler_t detect_irq, void *data) |
545 | { | 553 | { |
546 | return request_irq(IRQ_MAGICIAN_SD, detect_irq, | 554 | int err; |
555 | |||
556 | err = request_irq(IRQ_MAGICIAN_SD, detect_irq, | ||
547 | IRQF_DISABLED | IRQF_SAMPLE_RANDOM, | 557 | IRQF_DISABLED | IRQF_SAMPLE_RANDOM, |
548 | "MMC card detect", data); | 558 | "MMC card detect", data); |
559 | if (err) | ||
560 | goto err_request_irq; | ||
561 | err = gpio_request(EGPIO_MAGICIAN_SD_POWER, "SD_POWER"); | ||
562 | if (err) | ||
563 | goto err_request_power; | ||
564 | err = gpio_request(EGPIO_MAGICIAN_nSD_READONLY, "nSD_READONLY"); | ||
565 | if (err) | ||
566 | goto err_request_readonly; | ||
567 | |||
568 | return 0; | ||
569 | |||
570 | err_request_readonly: | ||
571 | gpio_free(EGPIO_MAGICIAN_SD_POWER); | ||
572 | err_request_power: | ||
573 | free_irq(IRQ_MAGICIAN_SD, data); | ||
574 | err_request_irq: | ||
575 | return err; | ||
549 | } | 576 | } |
550 | 577 | ||
551 | static void magician_mci_setpower(struct device *dev, unsigned int vdd) | 578 | static void magician_mci_setpower(struct device *dev, unsigned int vdd) |
@@ -562,6 +589,8 @@ static int magician_mci_get_ro(struct device *dev) | |||
562 | 589 | ||
563 | static void magician_mci_exit(struct device *dev, void *data) | 590 | static void magician_mci_exit(struct device *dev, void *data) |
564 | { | 591 | { |
592 | gpio_free(EGPIO_MAGICIAN_nSD_READONLY); | ||
593 | gpio_free(EGPIO_MAGICIAN_SD_POWER); | ||
565 | free_irq(IRQ_MAGICIAN_SD, data); | 594 | free_irq(IRQ_MAGICIAN_SD, data); |
566 | } | 595 | } |
567 | 596 | ||
@@ -643,28 +672,42 @@ static void __init magician_init(void) | |||
643 | { | 672 | { |
644 | void __iomem *cpld; | 673 | void __iomem *cpld; |
645 | int lcd_select; | 674 | int lcd_select; |
675 | int err; | ||
676 | |||
677 | gpio_request(GPIO13_MAGICIAN_CPLD_IRQ, "CPLD_IRQ"); | ||
678 | gpio_request(GPIO107_MAGICIAN_DS1WM_IRQ, "DS1WM_IRQ"); | ||
646 | 679 | ||
647 | pxa2xx_mfp_config(ARRAY_AND_SIZE(magician_pin_config)); | 680 | pxa2xx_mfp_config(ARRAY_AND_SIZE(magician_pin_config)); |
648 | 681 | ||
649 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 682 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
683 | |||
684 | err = gpio_request(GPIO83_MAGICIAN_nIR_EN, "nIR_EN"); | ||
685 | if (!err) { | ||
686 | gpio_direction_output(GPIO83_MAGICIAN_nIR_EN, 1); | ||
687 | pxa_set_ficp_info(&magician_ficp_info); | ||
688 | } | ||
650 | pxa_set_i2c_info(NULL); | 689 | pxa_set_i2c_info(NULL); |
651 | pxa_set_mci_info(&magician_mci_info); | 690 | pxa_set_mci_info(&magician_mci_info); |
652 | pxa_set_ohci_info(&magician_ohci_info); | 691 | pxa_set_ohci_info(&magician_ohci_info); |
653 | pxa_set_ficp_info(&magician_ficp_info); | ||
654 | 692 | ||
655 | /* Check LCD type we have */ | 693 | /* Check LCD type we have */ |
656 | cpld = ioremap_nocache(PXA_CS3_PHYS, 0x1000); | 694 | cpld = ioremap_nocache(PXA_CS3_PHYS, 0x1000); |
657 | if (cpld) { | 695 | if (cpld) { |
658 | u8 board_id = __raw_readb(cpld+0x14); | 696 | u8 board_id = __raw_readb(cpld+0x14); |
697 | iounmap(cpld); | ||
659 | system_rev = board_id & 0x7; | 698 | system_rev = board_id & 0x7; |
660 | lcd_select = board_id & 0x8; | 699 | lcd_select = board_id & 0x8; |
661 | iounmap(cpld); | ||
662 | pr_info("LCD type: %s\n", lcd_select ? "Samsung" : "Toppoly"); | 700 | pr_info("LCD type: %s\n", lcd_select ? "Samsung" : "Toppoly"); |
663 | if (lcd_select && (system_rev < 3)) | 701 | if (lcd_select && (system_rev < 3)) { |
664 | pxa_gpio_mode(GPIO75_MAGICIAN_SAMSUNG_POWER_MD); | 702 | gpio_request(GPIO75_MAGICIAN_SAMSUNG_POWER, "SAMSUNG_POWER"); |
665 | pxa_gpio_mode(GPIO104_MAGICIAN_LCD_POWER_1_MD); | 703 | gpio_direction_output(GPIO75_MAGICIAN_SAMSUNG_POWER, 0); |
666 | pxa_gpio_mode(GPIO105_MAGICIAN_LCD_POWER_2_MD); | 704 | } |
667 | pxa_gpio_mode(GPIO106_MAGICIAN_LCD_POWER_3_MD); | 705 | gpio_request(GPIO104_MAGICIAN_LCD_POWER_1, "LCD_POWER_1"); |
706 | gpio_request(GPIO105_MAGICIAN_LCD_POWER_2, "LCD_POWER_2"); | ||
707 | gpio_request(GPIO106_MAGICIAN_LCD_POWER_3, "LCD_POWER_3"); | ||
708 | gpio_direction_output(GPIO104_MAGICIAN_LCD_POWER_1, 0); | ||
709 | gpio_direction_output(GPIO105_MAGICIAN_LCD_POWER_2, 0); | ||
710 | gpio_direction_output(GPIO106_MAGICIAN_LCD_POWER_3, 0); | ||
668 | set_pxa_fb_info(lcd_select ? &samsung_info : &toppoly_info); | 711 | set_pxa_fb_info(lcd_select ? &samsung_info : &toppoly_info); |
669 | } else | 712 | } else |
670 | pr_err("LCD detection: CPLD mapping failed\n"); | 713 | pr_err("LCD detection: CPLD mapping failed\n"); |
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c index 039194cbe477..ec1bbf333a3a 100644 --- a/arch/arm/mach-pxa/pm.c +++ b/arch/arm/mach-pxa/pm.c | |||
@@ -46,8 +46,8 @@ int pxa_pm_enter(suspend_state_t state) | |||
46 | sleep_save_checksum += sleep_save[i]; | 46 | sleep_save_checksum += sleep_save[i]; |
47 | } | 47 | } |
48 | 48 | ||
49 | /* Clear sleep reset status */ | 49 | /* Clear reset status */ |
50 | RCSR = RCSR_SMR; | 50 | RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; |
51 | 51 | ||
52 | /* *** go zzz *** */ | 52 | /* *** go zzz *** */ |
53 | pxa_cpu_pm_fns->enter(state); | 53 | pxa_cpu_pm_fns->enter(state); |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index dde355e88fa1..b6a6f5fcc77a 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -486,6 +486,8 @@ static int pxa3xx_set_wake(unsigned int irq, unsigned int on) | |||
486 | case IRQ_MMC3: | 486 | case IRQ_MMC3: |
487 | mask = ADXER_MFP_GEN12; | 487 | mask = ADXER_MFP_GEN12; |
488 | break; | 488 | break; |
489 | default: | ||
490 | return -EINVAL; | ||
489 | } | 491 | } |
490 | 492 | ||
491 | local_irq_save(flags); | 493 | local_irq_save(flags); |