aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/host/ohci-exynos.c18
-rw-r--r--include/linux/platform_data/usb-ohci-exynos.h21
2 files changed, 3 insertions, 36 deletions
diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c
index 17f46fbf047d..a87baedc0aa7 100644
--- a/drivers/usb/host/ohci-exynos.c
+++ b/drivers/usb/host/ohci-exynos.c
@@ -18,7 +18,6 @@
18#include <linux/module.h> 18#include <linux/module.h>
19#include <linux/of.h> 19#include <linux/of.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/platform_data/usb-ohci-exynos.h>
22#include <linux/usb/phy.h> 21#include <linux/usb/phy.h>
23#include <linux/usb/samsung_usb_phy.h> 22#include <linux/usb/samsung_usb_phy.h>
24#include <linux/usb.h> 23#include <linux/usb.h>
@@ -38,7 +37,6 @@ struct exynos_ohci_hcd {
38 struct clk *clk; 37 struct clk *clk;
39 struct usb_phy *phy; 38 struct usb_phy *phy;
40 struct usb_otg *otg; 39 struct usb_otg *otg;
41 struct exynos4_ohci_platdata *pdata;
42}; 40};
43 41
44static void exynos_ohci_phy_enable(struct platform_device *pdev) 42static void exynos_ohci_phy_enable(struct platform_device *pdev)
@@ -48,8 +46,6 @@ static void exynos_ohci_phy_enable(struct platform_device *pdev)
48 46
49 if (exynos_ohci->phy) 47 if (exynos_ohci->phy)
50 usb_phy_init(exynos_ohci->phy); 48 usb_phy_init(exynos_ohci->phy);
51 else if (exynos_ohci->pdata && exynos_ohci->pdata->phy_init)
52 exynos_ohci->pdata->phy_init(pdev, USB_PHY_TYPE_HOST);
53} 49}
54 50
55static void exynos_ohci_phy_disable(struct platform_device *pdev) 51static void exynos_ohci_phy_disable(struct platform_device *pdev)
@@ -59,13 +55,10 @@ static void exynos_ohci_phy_disable(struct platform_device *pdev)
59 55
60 if (exynos_ohci->phy) 56 if (exynos_ohci->phy)
61 usb_phy_shutdown(exynos_ohci->phy); 57 usb_phy_shutdown(exynos_ohci->phy);
62 else if (exynos_ohci->pdata && exynos_ohci->pdata->phy_exit)
63 exynos_ohci->pdata->phy_exit(pdev, USB_PHY_TYPE_HOST);
64} 58}
65 59
66static int exynos_ohci_probe(struct platform_device *pdev) 60static int exynos_ohci_probe(struct platform_device *pdev)
67{ 61{
68 struct exynos4_ohci_platdata *pdata = dev_get_platdata(&pdev->dev);
69 struct exynos_ohci_hcd *exynos_ohci; 62 struct exynos_ohci_hcd *exynos_ohci;
70 struct usb_hcd *hcd; 63 struct usb_hcd *hcd;
71 struct resource *res; 64 struct resource *res;
@@ -98,14 +91,9 @@ static int exynos_ohci_probe(struct platform_device *pdev)
98 91
99 phy = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2); 92 phy = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2);
100 if (IS_ERR(phy)) { 93 if (IS_ERR(phy)) {
101 /* Fallback to pdata */ 94 usb_put_hcd(hcd);
102 if (!pdata) { 95 dev_warn(&pdev->dev, "no platform data or transceiver defined\n");
103 usb_put_hcd(hcd); 96 return -EPROBE_DEFER;
104 dev_warn(&pdev->dev, "no platform data or transceiver defined\n");
105 return -EPROBE_DEFER;
106 } else {
107 exynos_ohci->pdata = pdata;
108 }
109 } else { 97 } else {
110 exynos_ohci->phy = phy; 98 exynos_ohci->phy = phy;
111 exynos_ohci->otg = phy->otg; 99 exynos_ohci->otg = phy->otg;
diff --git a/include/linux/platform_data/usb-ohci-exynos.h b/include/linux/platform_data/usb-ohci-exynos.h
deleted file mode 100644
index c256c595be5e..000000000000
--- a/include/linux/platform_data/usb-ohci-exynos.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * Copyright (C) 2011 Samsung Electronics Co.Ltd
3 * http://www.samsung.com/
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 */
10
11#ifndef __MACH_EXYNOS_OHCI_H
12#define __MACH_EXYNOS_OHCI_H
13
14struct exynos4_ohci_platdata {
15 int (*phy_init)(struct platform_device *pdev, int type);
16 int (*phy_exit)(struct platform_device *pdev, int type);
17};
18
19extern void exynos4_ohci_set_platdata(struct exynos4_ohci_platdata *pd);
20
21#endif /* __MACH_EXYNOS_OHCI_H */