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

usb: ehci-s5p: 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>
Ackked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 715cf92a
...@@ -50,6 +50,8 @@ struct s5p_ehci_hcd { ...@@ -50,6 +50,8 @@ struct s5p_ehci_hcd {
struct s5p_ehci_platdata *pdata; struct s5p_ehci_platdata *pdata;
}; };
static struct s5p_ehci_platdata empty_platdata;
#define to_s5p_ehci(hcd) (struct s5p_ehci_hcd *)(hcd_to_ehci(hcd)->priv) #define to_s5p_ehci(hcd) (struct s5p_ehci_hcd *)(hcd_to_ehci(hcd)->priv)
static void s5p_setup_vbus_gpio(struct platform_device *pdev) static void s5p_setup_vbus_gpio(struct platform_device *pdev)
...@@ -101,6 +103,13 @@ static int s5p_ehci_probe(struct platform_device *pdev) ...@@ -101,6 +103,13 @@ static int s5p_ehci_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
} }
s5p_ehci = to_s5p_ehci(hcd); s5p_ehci = to_s5p_ehci(hcd);
if (of_device_is_compatible(pdev->dev.of_node,
"samsung,exynos5440-ehci")) {
s5p_ehci->pdata = &empty_platdata;
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 */
...@@ -116,6 +125,8 @@ static int s5p_ehci_probe(struct platform_device *pdev) ...@@ -116,6 +125,8 @@ static int s5p_ehci_probe(struct platform_device *pdev)
s5p_ehci->otg = phy->otg; s5p_ehci->otg = phy->otg;
} }
skip_phy:
s5p_ehci->clk = devm_clk_get(&pdev->dev, "usbhost"); s5p_ehci->clk = devm_clk_get(&pdev->dev, "usbhost");
if (IS_ERR(s5p_ehci->clk)) { if (IS_ERR(s5p_ehci->clk)) {
...@@ -277,6 +288,7 @@ static const struct dev_pm_ops s5p_ehci_pm_ops = { ...@@ -277,6 +288,7 @@ static const struct dev_pm_ops s5p_ehci_pm_ops = {
#ifdef CONFIG_OF #ifdef CONFIG_OF
static const struct of_device_id exynos_ehci_match[] = { static const struct of_device_id exynos_ehci_match[] = {
{ .compatible = "samsung,exynos4210-ehci" }, { .compatible = "samsung,exynos4210-ehci" },
{ .compatible = "samsung,exynos5440-ehci" },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, exynos_ehci_match); MODULE_DEVICE_TABLE(of, exynos_ehci_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