diff options
Diffstat (limited to 'drivers/mfd/omap-usb-host.c')
| -rw-r--r-- | drivers/mfd/omap-usb-host.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index 53450f433f10..3ab9ffa00aad 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c | |||
| @@ -25,7 +25,6 @@ | |||
| 25 | #include <linux/dma-mapping.h> | 25 | #include <linux/dma-mapping.h> |
| 26 | #include <linux/spinlock.h> | 26 | #include <linux/spinlock.h> |
| 27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
| 28 | #include <linux/regulator/consumer.h> | ||
| 29 | #include <plat/usb.h> | 28 | #include <plat/usb.h> |
| 30 | 29 | ||
| 31 | #define USBHS_DRIVER_NAME "usbhs-omap" | 30 | #define USBHS_DRIVER_NAME "usbhs-omap" |
| @@ -700,8 +699,7 @@ static int usbhs_enable(struct device *dev) | |||
| 700 | dev_dbg(dev, "starting TI HSUSB Controller\n"); | 699 | dev_dbg(dev, "starting TI HSUSB Controller\n"); |
| 701 | if (!pdata) { | 700 | if (!pdata) { |
| 702 | dev_dbg(dev, "missing platform_data\n"); | 701 | dev_dbg(dev, "missing platform_data\n"); |
| 703 | ret = -ENODEV; | 702 | return -ENODEV; |
| 704 | goto end_enable; | ||
| 705 | } | 703 | } |
| 706 | 704 | ||
| 707 | spin_lock_irqsave(&omap->lock, flags); | 705 | spin_lock_irqsave(&omap->lock, flags); |
| @@ -719,14 +717,14 @@ static int usbhs_enable(struct device *dev) | |||
| 719 | gpio_request(pdata->ehci_data->reset_gpio_port[0], | 717 | gpio_request(pdata->ehci_data->reset_gpio_port[0], |
| 720 | "USB1 PHY reset"); | 718 | "USB1 PHY reset"); |
| 721 | gpio_direction_output | 719 | gpio_direction_output |
| 722 | (pdata->ehci_data->reset_gpio_port[0], 1); | 720 | (pdata->ehci_data->reset_gpio_port[0], 0); |
| 723 | } | 721 | } |
| 724 | 722 | ||
| 725 | if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1])) { | 723 | if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1])) { |
| 726 | gpio_request(pdata->ehci_data->reset_gpio_port[1], | 724 | gpio_request(pdata->ehci_data->reset_gpio_port[1], |
| 727 | "USB2 PHY reset"); | 725 | "USB2 PHY reset"); |
| 728 | gpio_direction_output | 726 | gpio_direction_output |
| 729 | (pdata->ehci_data->reset_gpio_port[1], 1); | 727 | (pdata->ehci_data->reset_gpio_port[1], 0); |
| 730 | } | 728 | } |
| 731 | 729 | ||
| 732 | /* Hold the PHY in RESET for enough time till DIR is high */ | 730 | /* Hold the PHY in RESET for enough time till DIR is high */ |
| @@ -906,16 +904,17 @@ static int usbhs_enable(struct device *dev) | |||
| 906 | 904 | ||
| 907 | if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0])) | 905 | if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0])) |
| 908 | gpio_set_value | 906 | gpio_set_value |
| 909 | (pdata->ehci_data->reset_gpio_port[0], 0); | 907 | (pdata->ehci_data->reset_gpio_port[0], 1); |
| 910 | 908 | ||
| 911 | if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1])) | 909 | if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1])) |
| 912 | gpio_set_value | 910 | gpio_set_value |
| 913 | (pdata->ehci_data->reset_gpio_port[1], 0); | 911 | (pdata->ehci_data->reset_gpio_port[1], 1); |
| 914 | } | 912 | } |
| 915 | 913 | ||
| 916 | end_count: | 914 | end_count: |
| 917 | omap->count++; | 915 | omap->count++; |
| 918 | goto end_enable; | 916 | spin_unlock_irqrestore(&omap->lock, flags); |
| 917 | return 0; | ||
| 919 | 918 | ||
| 920 | err_tll: | 919 | err_tll: |
| 921 | if (pdata->ehci_data->phy_reset) { | 920 | if (pdata->ehci_data->phy_reset) { |
| @@ -931,8 +930,6 @@ err_tll: | |||
| 931 | clk_disable(omap->usbhost_fs_fck); | 930 | clk_disable(omap->usbhost_fs_fck); |
| 932 | clk_disable(omap->usbhost_hs_fck); | 931 | clk_disable(omap->usbhost_hs_fck); |
| 933 | clk_disable(omap->usbhost_ick); | 932 | clk_disable(omap->usbhost_ick); |
| 934 | |||
| 935 | end_enable: | ||
| 936 | spin_unlock_irqrestore(&omap->lock, flags); | 933 | spin_unlock_irqrestore(&omap->lock, flags); |
| 937 | return ret; | 934 | return ret; |
| 938 | } | 935 | } |
