From e27c3c5c7e0fb107990c7f465a3525312f6d45aa Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 7 Mar 2011 08:42:00 +0100 Subject: ARM: s3c24xx: Switch to common GPIO controlled UDC pullup implementation Currently all boards using the s3c2410_udc driver use a GPIO to control the state of the pullup, as a result the same code is reimplemented in each board This patch changes these boards to use the common implementation for GPIO controlled pullup in the UDC driver. Signed-off-by: Lars-Peter Clausen Acked-by: Vasily Khoruzhick Signed-off-by: Greg Kroah-Hartman --- arch/arm/mach-s3c2412/mach-smdk2413.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'arch/arm/mach-s3c2412') diff --git a/arch/arm/mach-s3c2412/mach-smdk2413.c b/arch/arm/mach-s3c2412/mach-smdk2413.c index 8e5758bdd666..834cfb61bcfe 100644 --- a/arch/arm/mach-s3c2412/mach-smdk2413.c +++ b/arch/arm/mach-s3c2412/mach-smdk2413.c @@ -78,28 +78,9 @@ static struct s3c2410_uartcfg smdk2413_uartcfgs[] __initdata = { } }; -static void smdk2413_udc_pullup(enum s3c2410_udc_cmd_e cmd) -{ - printk(KERN_DEBUG "udc: pullup(%d)\n",cmd); - - switch (cmd) - { - case S3C2410_UDC_P_ENABLE : - gpio_set_value(S3C2410_GPF(2), 1); - break; - case S3C2410_UDC_P_DISABLE : - gpio_set_value(S3C2410_GPF(2), 0); - break; - case S3C2410_UDC_P_RESET : - break; - default: - break; - } -} - static struct s3c2410_udc_mach_info smdk2413_udc_cfg __initdata = { - .udc_command = smdk2413_udc_pullup, + .pullup_pin = S3C2410_GPF(2), }; @@ -133,9 +114,6 @@ static void __init smdk2413_machine_init(void) { /* Turn off suspend on both USB ports, and switch the * selectable USB port to USB device mode. */ - WARN_ON(gpio_request(S3C2410_GPF(2), "udc pull")); - gpio_direction_output(S3C2410_GPF(2), 0); - s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST | S3C2410_MISCCR_USBSUSPND0 | S3C2410_MISCCR_USBSUSPND1, 0x0); -- cgit v1.2.3