Skip to content

Commit

Permalink
usb: ehci-s5p: skip phy setup for Exynos5440 based platforms
Browse files Browse the repository at this point in the history
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>
Ackked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Thomas Abraham authored and Greg Kroah-Hartman committed May 30, 2013
1 parent 715cf92 commit e6b0166
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/usb/host/ehci-s5p.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ struct s5p_ehci_hcd {
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)

static void s5p_setup_vbus_gpio(struct platform_device *pdev)
Expand Down Expand Up @@ -101,6 +103,13 @@ static int s5p_ehci_probe(struct platform_device *pdev)
return -ENOMEM;
}
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);
if (IS_ERR(phy)) {
/* Fallback to pdata */
Expand All @@ -116,6 +125,8 @@ static int s5p_ehci_probe(struct platform_device *pdev)
s5p_ehci->otg = phy->otg;
}

skip_phy:

s5p_ehci->clk = devm_clk_get(&pdev->dev, "usbhost");

if (IS_ERR(s5p_ehci->clk)) {
Expand Down Expand Up @@ -277,6 +288,7 @@ static const struct dev_pm_ops s5p_ehci_pm_ops = {
#ifdef CONFIG_OF
static const struct of_device_id exynos_ehci_match[] = {
{ .compatible = "samsung,exynos4210-ehci" },
{ .compatible = "samsung,exynos5440-ehci" },
{},
};
MODULE_DEVICE_TABLE(of, exynos_ehci_match);
Expand Down

0 comments on commit e6b0166

Please sign in to comment.