diff options
author | Christer Weinigel <christer@weinigel.se> | 2008-07-07 19:12:42 +0200 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2008-07-07 19:13:03 +0200 |
commit | d088e5fe586287da003341e7bbfdad15e0f432f7 (patch) | |
tree | 7d90305f2ace431ddbea571277e716e7b562cb19 /arch/arm/mach-s3c2410/mach-n30.c | |
parent | [ARM] Acer n30: Source file cleanups. (diff) | |
download | linux-d088e5fe586287da003341e7bbfdad15e0f432f7.tar.xz linux-d088e5fe586287da003341e7bbfdad15e0f432f7.zip |
[ARM] Acer n30: USB bus pull-up support.
Add support for the USB D+ pull up on the Acer N30. This is needed
for the USB gadget to work properly.
Signed-off-by: Christer Weinigel <christer@weinigel.se>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s3c2410/mach-n30.c')
-rw-r--r-- | arch/arm/mach-s3c2410/mach-n30.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c index fc54e07ccac5..8edc0c0eb043 100644 --- a/arch/arm/mach-s3c2410/mach-n30.c +++ b/arch/arm/mach-s3c2410/mach-n30.c @@ -41,6 +41,7 @@ #include <asm/plat-s3c24xx/cpu.h> #include <asm/plat-s3c24xx/devs.h> #include <asm/plat-s3c24xx/s3c2410.h> +#include <asm/plat-s3c24xx/udc.h> static struct map_desc n30_iodesc[] __initdata = { /* nothing here yet */ @@ -74,6 +75,29 @@ static struct s3c2410_uartcfg n30_uartcfgs[] = { }, }; +static void n30_udc_pullup(enum s3c2410_udc_cmd_e cmd) +{ + switch (cmd) + { + case S3C2410_UDC_P_ENABLE : + s3c2410_gpio_setpin(S3C2410_GPB3, 1); + break; + case S3C2410_UDC_P_DISABLE : + s3c2410_gpio_setpin(S3C2410_GPB3, 0); + break; + case S3C2410_UDC_P_RESET : + break; + default: + break; + } +} + +static struct s3c2410_udc_mach_info n30_udc_cfg __initdata = { + .udc_command = n30_udc_pullup, + .vbus_pin = S3C2410_GPG1, + .vbus_pin_inverted = 0, +}; + static struct platform_device *n30_devices[] __initdata = { &s3c_device_lcd, &s3c_device_wdt, @@ -107,6 +131,7 @@ static void __init n30_init_irq(void) static void __init n30_init(void) { s3c_device_i2c.dev.platform_data = &n30_i2ccfg; + s3c24xx_udc_set_platdata(&n30_udc_cfg); /* Turn off suspend on both USB ports, and switch the * selectable USB port to USB device mode. */ |