From c04d3e64404d9090468ee23f6bf92d77584b8b2c Mon Sep 17 00:00:00 2001 From: Thomas Abraham Date: Thu, 11 Apr 2013 17:12:30 +0530 Subject: [PATCH] --- yaml --- r: 364851 b: refs/heads/master c: 2871782ae1cbca372eabf599576d611d861310e6 h: refs/heads/master i: 364849: 7da48603d7eda62b321166653c5855e39b69fd36 364847: 41e295bc645f7214fe49a9607b394d0b967267db v: v3 --- [refs] | 2 +- trunk/drivers/usb/host/ohci-exynos.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 253b4f4386d1..c2a3c43ba142 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b8a261b59c8c6014d7dc984811ec81f14ef6f767 +refs/heads/master: 2871782ae1cbca372eabf599576d611d861310e6 diff --git a/trunk/drivers/usb/host/ohci-exynos.c b/trunk/drivers/usb/host/ohci-exynos.c index 4b469e050208..509fa515248c 100644 --- a/trunk/drivers/usb/host/ohci-exynos.c +++ b/trunk/drivers/usb/host/ohci-exynos.c @@ -34,7 +34,7 @@ static void exynos_ohci_phy_enable(struct exynos_ohci_hcd *exynos_ohci) if (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); } @@ -44,7 +44,7 @@ static void exynos_ohci_phy_disable(struct exynos_ohci_hcd *exynos_ohci) if (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); } @@ -127,6 +127,10 @@ static int exynos_ohci_probe(struct platform_device *pdev) if (!exynos_ohci) 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); if (IS_ERR(phy)) { /* Fallback to pdata */ @@ -141,6 +145,8 @@ static int exynos_ohci_probe(struct platform_device *pdev) exynos_ohci->otg = phy->otg; } +skip_phy: + exynos_ohci->dev = &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 = { #ifdef CONFIG_OF static const struct of_device_id exynos_ohci_match[] = { { .compatible = "samsung,exynos4210-ohci" }, + { .compatible = "samsung,exynos5440-ohci" }, {}, }; MODULE_DEVICE_TABLE(of, exynos_ohci_match);