diff options
| author | Robert Jarzmik <robert.jarzmik@free.fr> | 2009-01-31 15:07:09 -0500 |
|---|---|---|
| committer | Eric Miao <eric.miao@marvell.com> | 2009-03-13 05:10:45 -0400 |
| commit | cefdb2a4436ec83b4c8b349aa30f976d30c22e25 (patch) | |
| tree | b30a05b5266091e0f8970aa22d2a71e070349728 | |
| parent | 689b4febeca7e98ad1986cf5b036539649cc1a0c (diff) | |
[ARM] pxa/MioA701: Migrate after pxa27x_udc gpio_pullup functionality.
Signed-off-by: Robert Jarzmik <rjarzmik@free.fr>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
| -rw-r--r-- | arch/arm/mach-pxa/mioa701.c | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index 735cb94c4a1e..025772785d36 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c | |||
| @@ -413,21 +413,6 @@ static void gsm_exit(void) | |||
| 413 | /* | 413 | /* |
| 414 | * USB UDC | 414 | * USB UDC |
| 415 | */ | 415 | */ |
| 416 | static void udc_power_command(int cmd) | ||
| 417 | { | ||
| 418 | switch (cmd) { | ||
| 419 | case PXA2XX_UDC_CMD_DISCONNECT: | ||
| 420 | gpio_set_value(GPIO22_USB_ENABLE, 0); | ||
| 421 | break; | ||
| 422 | case PXA2XX_UDC_CMD_CONNECT: | ||
| 423 | gpio_set_value(GPIO22_USB_ENABLE, 1); | ||
| 424 | break; | ||
| 425 | default: | ||
| 426 | printk(KERN_INFO "udc_control: unknown command (0x%x)!\n", cmd); | ||
| 427 | break; | ||
| 428 | } | ||
| 429 | } | ||
| 430 | |||
| 431 | static int is_usb_connected(void) | 416 | static int is_usb_connected(void) |
| 432 | { | 417 | { |
| 433 | return !gpio_get_value(GPIO13_nUSB_DETECT); | 418 | return !gpio_get_value(GPIO13_nUSB_DETECT); |
| @@ -435,24 +420,9 @@ static int is_usb_connected(void) | |||
| 435 | 420 | ||
| 436 | static struct pxa2xx_udc_mach_info mioa701_udc_info = { | 421 | static struct pxa2xx_udc_mach_info mioa701_udc_info = { |
| 437 | .udc_is_connected = is_usb_connected, | 422 | .udc_is_connected = is_usb_connected, |
| 438 | .udc_command = udc_power_command, | 423 | .gpio_pullup = GPIO22_USB_ENABLE, |
| 439 | }; | 424 | }; |
| 440 | 425 | ||
| 441 | struct gpio_ress udc_gpios[] = { | ||
| 442 | MIO_GPIO_OUT(GPIO22_USB_ENABLE, 0, "USB Vbus enable") | ||
| 443 | }; | ||
| 444 | |||
| 445 | static int __init udc_init(void) | ||
| 446 | { | ||
| 447 | pxa_set_udc_info(&mioa701_udc_info); | ||
| 448 | return mio_gpio_request(ARRAY_AND_SIZE(udc_gpios)); | ||
| 449 | } | ||
| 450 | |||
| 451 | static void udc_exit(void) | ||
| 452 | { | ||
| 453 | mio_gpio_free(ARRAY_AND_SIZE(udc_gpios)); | ||
| 454 | } | ||
| 455 | |||
| 456 | struct gpio_vbus_mach_info gpio_vbus_data = { | 426 | struct gpio_vbus_mach_info gpio_vbus_data = { |
| 457 | .gpio_vbus = GPIO13_nUSB_DETECT, | 427 | .gpio_vbus = GPIO13_nUSB_DETECT, |
| 458 | .gpio_vbus_inverted = 1, | 428 | .gpio_vbus_inverted = 1, |
| @@ -847,7 +817,7 @@ static void __init mioa701_machine_init(void) | |||
| 847 | pxa_set_mci_info(&mioa701_mci_info); | 817 | pxa_set_mci_info(&mioa701_mci_info); |
| 848 | pxa_set_keypad_info(&mioa701_keypad_info); | 818 | pxa_set_keypad_info(&mioa701_keypad_info); |
| 849 | wm97xx_bat_set_pdata(&mioa701_battery_data); | 819 | wm97xx_bat_set_pdata(&mioa701_battery_data); |
| 850 | udc_init(); | 820 | pxa_set_udc_info(&mioa701_udc_info); |
| 851 | pm_power_off = mioa701_poweroff; | 821 | pm_power_off = mioa701_poweroff; |
| 852 | arm_pm_restart = mioa701_restart; | 822 | arm_pm_restart = mioa701_restart; |
| 853 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 823 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
| @@ -860,7 +830,6 @@ static void __init mioa701_machine_init(void) | |||
| 860 | 830 | ||
| 861 | static void mioa701_machine_exit(void) | 831 | static void mioa701_machine_exit(void) |
| 862 | { | 832 | { |
| 863 | udc_exit(); | ||
| 864 | bootstrap_exit(); | 833 | bootstrap_exit(); |
| 865 | gsm_exit(); | 834 | gsm_exit(); |
| 866 | } | 835 | } |
