From 63c82ad62f293e14f1137c739d2756f198594852 Mon Sep 17 00:00:00 2001 From: Christer Weinigel Date: Mon, 7 Jul 2008 18:12:42 +0100 Subject: [PATCH] --- yaml --- r: 100856 b: refs/heads/master c: d088e5fe586287da003341e7bbfdad15e0f432f7 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-s3c2410/mach-n30.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 809b17cc41b5..33b61d47fa7f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 196a047574e1465b89bc41fda573efc9b9be70e5 +refs/heads/master: d088e5fe586287da003341e7bbfdad15e0f432f7 diff --git a/trunk/arch/arm/mach-s3c2410/mach-n30.c b/trunk/arch/arm/mach-s3c2410/mach-n30.c index fc54e07ccac5..8edc0c0eb043 100644 --- a/trunk/arch/arm/mach-s3c2410/mach-n30.c +++ b/trunk/arch/arm/mach-s3c2410/mach-n30.c @@ -41,6 +41,7 @@ #include #include #include +#include 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. */