aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Abraham <thomas.ab@samsung.com>2013-04-11 07:42:30 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-11 11:56:58 -0400
commit2871782ae1cbca372eabf599576d611d861310e6 (patch)
treefe63fb45b758013d311a3f9a5e40c44c72d981c3
parentb8a261b59c8c6014d7dc984811ec81f14ef6f767 (diff)
usb: ohci-exynos: skip phy setup for Exynos5440 based platforms
Exynos5440 does not require any explict USB phy configuration. So skip the USB phy configuration for Exynos5440 based platforms. Signed-off-by: Thomas Abraham <thomas.ab@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/host/ohci-exynos.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c
index 4b469e050208..509fa515248c 100644
--- a/drivers/usb/host/ohci-exynos.c
+++ b/drivers/usb/host/ohci-exynos.c
@@ -34,7 +34,7 @@ static void exynos_ohci_phy_enable(struct exynos_ohci_hcd *exynos_ohci)
34 34
35 if (exynos_ohci->phy) 35 if (exynos_ohci->phy)
36 usb_phy_init(exynos_ohci->phy); 36 usb_phy_init(exynos_ohci->phy);
37 else if (exynos_ohci->pdata->phy_init) 37 else if (exynos_ohci->pdata && exynos_ohci->pdata->phy_init)
38 exynos_ohci->pdata->phy_init(pdev, USB_PHY_TYPE_HOST); 38 exynos_ohci->pdata->phy_init(pdev, USB_PHY_TYPE_HOST);
39} 39}
40 40
@@ -44,7 +44,7 @@ static void exynos_ohci_phy_disable(struct exynos_ohci_hcd *exynos_ohci)
44 44
45 if (exynos_ohci->phy) 45 if (exynos_ohci->phy)
46 usb_phy_shutdown(exynos_ohci->phy); 46 usb_phy_shutdown(exynos_ohci->phy);
47 else if (exynos_ohci->pdata->phy_exit) 47 else if (exynos_ohci->pdata && exynos_ohci->pdata->phy_exit)
48 exynos_ohci->pdata->phy_exit(pdev, USB_PHY_TYPE_HOST); 48 exynos_ohci->pdata->phy_exit(pdev, USB_PHY_TYPE_HOST);
49} 49}
50 50
@@ -127,6 +127,10 @@ static int exynos_ohci_probe(struct platform_device *pdev)
127 if (!exynos_ohci) 127 if (!exynos_ohci)
128 return -ENOMEM; 128 return -ENOMEM;
129 129
130 if (of_device_is_compatible(pdev->dev.of_node,
131 "samsung,exynos5440-ohci"))
132 goto skip_phy;
133
130 phy = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2); 134 phy = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2);
131 if (IS_ERR(phy)) { 135 if (IS_ERR(phy)) {
132 /* Fallback to pdata */ 136 /* Fallback to pdata */
@@ -141,6 +145,8 @@ static int exynos_ohci_probe(struct platform_device *pdev)
141 exynos_ohci->otg = phy->otg; 145 exynos_ohci->otg = phy->otg;
142 } 146 }
143 147
148skip_phy:
149
144 exynos_ohci->dev = &pdev->dev; 150 exynos_ohci->dev = &pdev->dev;
145 151
146 hcd = usb_create_hcd(&exynos_ohci_hc_driver, &pdev->dev, 152 hcd = usb_create_hcd(&exynos_ohci_hc_driver, &pdev->dev,
@@ -311,6 +317,7 @@ static const struct dev_pm_ops exynos_ohci_pm_ops = {
311#ifdef CONFIG_OF 317#ifdef CONFIG_OF
312static const struct of_device_id exynos_ohci_match[] = { 318static const struct of_device_id exynos_ohci_match[] = {
313 { .compatible = "samsung,exynos4210-ohci" }, 319 { .compatible = "samsung,exynos4210-ohci" },
320 { .compatible = "samsung,exynos5440-ohci" },
314 {}, 321 {},
315}; 322};
316MODULE_DEVICE_TABLE(of, exynos_ohci_match); 323MODULE_DEVICE_TABLE(of, exynos_ohci_match);