diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2011-03-07 02:42:00 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-07 15:23:22 -0500 |
commit | e27c3c5c7e0fb107990c7f465a3525312f6d45aa (patch) | |
tree | 697835d843f1310cc670511ad078e1ddd305f0ec /arch/arm/mach-s3c2440/mach-gta02.c | |
parent | a74022a55e44fe2044ac3660452cafecb300aece (diff) |
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 <lars@metafoo.de>
Acked-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/arm/mach-s3c2440/mach-gta02.c')
-rw-r--r-- | arch/arm/mach-s3c2440/mach-gta02.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c index 9f2c14ec718..37405d9abe3 100644 --- a/arch/arm/mach-s3c2440/mach-gta02.c +++ b/arch/arm/mach-s3c2440/mach-gta02.c | |||
@@ -455,28 +455,10 @@ static struct s3c2410_platform_nand __initdata gta02_nand_info = { | |||
455 | }; | 455 | }; |
456 | 456 | ||
457 | 457 | ||
458 | static void gta02_udc_command(enum s3c2410_udc_cmd_e cmd) | ||
459 | { | ||
460 | switch (cmd) { | ||
461 | case S3C2410_UDC_P_ENABLE: | ||
462 | pr_debug("%s S3C2410_UDC_P_ENABLE\n", __func__); | ||
463 | gpio_direction_output(GTA02_GPIO_USB_PULLUP, 1); | ||
464 | break; | ||
465 | case S3C2410_UDC_P_DISABLE: | ||
466 | pr_debug("%s S3C2410_UDC_P_DISABLE\n", __func__); | ||
467 | gpio_direction_output(GTA02_GPIO_USB_PULLUP, 0); | ||
468 | break; | ||
469 | case S3C2410_UDC_P_RESET: | ||
470 | pr_debug("%s S3C2410_UDC_P_RESET\n", __func__); | ||
471 | /* FIXME: Do something here. */ | ||
472 | } | ||
473 | } | ||
474 | |||
475 | /* Get PMU to set USB current limit accordingly. */ | 458 | /* Get PMU to set USB current limit accordingly. */ |
476 | static struct s3c2410_udc_mach_info gta02_udc_cfg = { | 459 | static struct s3c2410_udc_mach_info gta02_udc_cfg __initdata = { |
477 | .vbus_draw = gta02_udc_vbus_draw, | 460 | .vbus_draw = gta02_udc_vbus_draw, |
478 | .udc_command = gta02_udc_command, | 461 | .pullup_pin = GTA02_GPIO_USB_PULLUP, |
479 | |||
480 | }; | 462 | }; |
481 | 463 | ||
482 | /* USB */ | 464 | /* USB */ |