diff options
author | Philipp Zabel <philipp.zabel@gmail.com> | 2009-02-01 05:20:30 -0500 |
---|---|---|
committer | Eric Miao <eric.miao@marvell.com> | 2009-02-02 03:48:43 -0500 |
commit | 6489c611db095356645ca1a2689e93c63caeb310 (patch) | |
tree | 3811ef0a65f5cde6740d870fc03b0c0d557b715a /arch/arm/mach-pxa/magician.c | |
parent | 51c10bbc3d7d700acd25a004d58a51067983acb6 (diff) |
[ARM] pxa/magician: Enable pxa27x_udc and gpio_vbus
This patch depends on otg_transceiver support in pxa27x_udc
(which is queued via linux-usb) to work.
It compiles also without it.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'arch/arm/mach-pxa/magician.c')
-rw-r--r-- | arch/arm/mach-pxa/magician.c | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index b7aafe6823f7..af464870c129 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/mtd/physmap.h> | 25 | #include <linux/mtd/physmap.h> |
26 | #include <linux/pda_power.h> | 26 | #include <linux/pda_power.h> |
27 | #include <linux/pwm_backlight.h> | 27 | #include <linux/pwm_backlight.h> |
28 | #include <linux/usb/gpio_vbus.h> | ||
28 | 29 | ||
29 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
30 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
@@ -525,6 +526,31 @@ static struct platform_device pasic3 = { | |||
525 | }; | 526 | }; |
526 | 527 | ||
527 | /* | 528 | /* |
529 | * USB "Transceiver" | ||
530 | */ | ||
531 | |||
532 | static struct resource gpio_vbus_resource = { | ||
533 | .flags = IORESOURCE_IRQ, | ||
534 | .start = IRQ_MAGICIAN_VBUS, | ||
535 | .end = IRQ_MAGICIAN_VBUS, | ||
536 | }; | ||
537 | |||
538 | static struct gpio_vbus_mach_info gpio_vbus_info = { | ||
539 | .gpio_pullup = GPIO27_MAGICIAN_USBC_PUEN, | ||
540 | .gpio_vbus = EGPIO_MAGICIAN_CABLE_STATE_USB, | ||
541 | }; | ||
542 | |||
543 | static struct platform_device gpio_vbus = { | ||
544 | .name = "gpio-vbus", | ||
545 | .id = -1, | ||
546 | .num_resources = 1, | ||
547 | .resource = &gpio_vbus_resource, | ||
548 | .dev = { | ||
549 | .platform_data = &gpio_vbus_info, | ||
550 | }, | ||
551 | }; | ||
552 | |||
553 | /* | ||
528 | * External power | 554 | * External power |
529 | */ | 555 | */ |
530 | 556 | ||
@@ -601,14 +627,14 @@ static struct resource power_supply_resources[] = { | |||
601 | [0] = { | 627 | [0] = { |
602 | .name = "ac", | 628 | .name = "ac", |
603 | .flags = IORESOURCE_IRQ, | 629 | .flags = IORESOURCE_IRQ, |
604 | .start = IRQ_MAGICIAN_AC, | 630 | .start = IRQ_MAGICIAN_VBUS, |
605 | .end = IRQ_MAGICIAN_AC, | 631 | .end = IRQ_MAGICIAN_VBUS, |
606 | }, | 632 | }, |
607 | [1] = { | 633 | [1] = { |
608 | .name = "usb", | 634 | .name = "usb", |
609 | .flags = IORESOURCE_IRQ, | 635 | .flags = IORESOURCE_IRQ, |
610 | .start = IRQ_MAGICIAN_AC, | 636 | .start = IRQ_MAGICIAN_VBUS, |
611 | .end = IRQ_MAGICIAN_AC, | 637 | .end = IRQ_MAGICIAN_VBUS, |
612 | }, | 638 | }, |
613 | }; | 639 | }; |
614 | 640 | ||
@@ -732,6 +758,7 @@ static struct platform_device *devices[] __initdata = { | |||
732 | &egpio, | 758 | &egpio, |
733 | &backlight, | 759 | &backlight, |
734 | &pasic3, | 760 | &pasic3, |
761 | &gpio_vbus, | ||
735 | &power_supply, | 762 | &power_supply, |
736 | &strataflash, | 763 | &strataflash, |
737 | &leds_gpio, | 764 | &leds_gpio, |