diff options
author | Philipp Zabel <philipp.zabel@gmail.com> | 2009-02-01 11:20:30 +0100 |
---|---|---|
committer | Eric Miao <eric.miao@marvell.com> | 2009-02-02 16:48:43 +0800 |
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 b7aafe6823f..af464870c12 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c @@ -25,6 +25,7 @@ #include <linux/mtd/physmap.h> #include <linux/pda_power.h> #include <linux/pwm_backlight.h> +#include <linux/usb/gpio_vbus.h> #include <mach/hardware.h> #include <asm/mach-types.h> @@ -525,6 +526,31 @@ static struct platform_device pasic3 = { }; /* + * USB "Transceiver" + */ + +static struct resource gpio_vbus_resource = { + .flags = IORESOURCE_IRQ, + .start = IRQ_MAGICIAN_VBUS, + .end = IRQ_MAGICIAN_VBUS, +}; + +static struct gpio_vbus_mach_info gpio_vbus_info = { + .gpio_pullup = GPIO27_MAGICIAN_USBC_PUEN, + .gpio_vbus = EGPIO_MAGICIAN_CABLE_STATE_USB, +}; + +static struct platform_device gpio_vbus = { + .name = "gpio-vbus", + .id = -1, + .num_resources = 1, + .resource = &gpio_vbus_resource, + .dev = { + .platform_data = &gpio_vbus_info, + }, +}; + +/* * External power */ @@ -601,14 +627,14 @@ static struct resource power_supply_resources[] = { [0] = { .name = "ac", .flags = IORESOURCE_IRQ, - .start = IRQ_MAGICIAN_AC, - .end = IRQ_MAGICIAN_AC, + .start = IRQ_MAGICIAN_VBUS, + .end = IRQ_MAGICIAN_VBUS, }, [1] = { .name = "usb", .flags = IORESOURCE_IRQ, - .start = IRQ_MAGICIAN_AC, - .end = IRQ_MAGICIAN_AC, + .start = IRQ_MAGICIAN_VBUS, + .end = IRQ_MAGICIAN_VBUS, }, }; @@ -732,6 +758,7 @@ static struct platform_device *devices[] __initdata = { &egpio, &backlight, &pasic3, + &gpio_vbus, &power_supply, &strataflash, &leds_gpio, |