Commit 2871782a authored by Thomas Abraham's avatar Thomas Abraham Committed by Greg Kroah-Hartman

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: default avatarThomas Abraham <thomas.ab@samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b8a261b5
...@@ -34,7 +34,7 @@ static void exynos_ohci_phy_enable(struct exynos_ohci_hcd *exynos_ohci) ...@@ -34,7 +34,7 @@ static void exynos_ohci_phy_enable(struct exynos_ohci_hcd *exynos_ohci)
if (exynos_ohci->phy) if (exynos_ohci->phy)
usb_phy_init(exynos_ohci->phy); usb_phy_init(exynos_ohci->phy);
else if (exynos_ohci->pdata->phy_init) else if (exynos_ohci->pdata && exynos_ohci->pdata->phy_init)
exynos_ohci->pdata->phy_init(pdev, USB_PHY_TYPE_HOST); exynos_ohci->pdata->phy_init(pdev, USB_PHY_TYPE_HOST);
} }
...@@ -44,7 +44,7 @@ static void exynos_ohci_phy_disable(struct exynos_ohci_hcd *exynos_ohci) ...@@ -44,7 +44,7 @@ static void exynos_ohci_phy_disable(struct exynos_ohci_hcd *exynos_ohci)
if (exynos_ohci->phy) if (exynos_ohci->phy)
usb_phy_shutdown(exynos_ohci->phy); usb_phy_shutdown(exynos_ohci->phy);
else if (exynos_ohci->pdata->phy_exit) else if (exynos_ohci->pdata && exynos_ohci->pdata->phy_exit)
exynos_ohci->pdata->phy_exit(pdev, USB_PHY_TYPE_HOST); exynos_ohci->pdata->phy_exit(pdev, USB_PHY_TYPE_HOST);
} }
...@@ -127,6 +127,10 @@ static int exynos_ohci_probe(struct platform_device *pdev) ...@@ -127,6 +127,10 @@ static int exynos_ohci_probe(struct platform_device *pdev)
if (!exynos_ohci) if (!exynos_ohci)
return -ENOMEM; return -ENOMEM;
if (of_device_is_compatible(pdev->dev.of_node,
"samsung,exynos5440-ohci"))
goto skip_phy;
phy = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2); phy = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2);
if (IS_ERR(phy)) { if (IS_ERR(phy)) {
/* Fallback to pdata */ /* Fallback to pdata */
...@@ -141,6 +145,8 @@ static int exynos_ohci_probe(struct platform_device *pdev) ...@@ -141,6 +145,8 @@ static int exynos_ohci_probe(struct platform_device *pdev)
exynos_ohci->otg = phy->otg; exynos_ohci->otg = phy->otg;
} }
skip_phy:
exynos_ohci->dev = &pdev->dev; exynos_ohci->dev = &pdev->dev;
hcd = usb_create_hcd(&exynos_ohci_hc_driver, &pdev->dev, 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,6 +317,7 @@ static const struct dev_pm_ops exynos_ohci_pm_ops = {
#ifdef CONFIG_OF #ifdef CONFIG_OF
static const struct of_device_id exynos_ohci_match[] = { static const struct of_device_id exynos_ohci_match[] = {
{ .compatible = "samsung,exynos4210-ohci" }, { .compatible = "samsung,exynos4210-ohci" },
{ .compatible = "samsung,exynos5440-ohci" },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, exynos_ohci_match); MODULE_DEVICE_TABLE(of, exynos_ohci_match);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment