From 6489c611db095356645ca1a2689e93c63caeb310 Mon Sep 17 00:00:00 2001 From: Philipp Zabel Date: Sun, 1 Feb 2009 11:20:30 +0100 Subject: [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 Signed-off-by: Eric Miao --- arch/arm/mach-pxa/magician.c | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) (limited to 'arch/arm/mach-pxa/magician.c') 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 #include #include +#include #include #include @@ -524,6 +525,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, -- cgit v1.2.3