Commit 57ae1605 authored by Jingoo Han's avatar Jingoo Han Committed by Greg Kroah-Hartman

USB: ehci-s5p: Remove non-DT support

The non-DT for EXYNOS SoCs is not supported from v3.11.
Thus, there is no need to support non-DT for Exynos EHCI driver.

The 'include/linux/platform_data/usb-ehci-s5p.h' file has been
used for non-DT support. Thus, the 'usb-ehci-s5p.h' file can
be removed.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a4b3f029
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_gpio.h> #include <linux/of_gpio.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/platform_data/usb-ehci-s5p.h>
#include <linux/usb/phy.h> #include <linux/usb/phy.h>
#include <linux/usb/samsung_usb_phy.h> #include <linux/usb/samsung_usb_phy.h>
#include <linux/usb.h> #include <linux/usb.h>
...@@ -47,11 +46,8 @@ struct s5p_ehci_hcd { ...@@ -47,11 +46,8 @@ struct s5p_ehci_hcd {
struct clk *clk; struct clk *clk;
struct usb_phy *phy; struct usb_phy *phy;
struct usb_otg *otg; struct usb_otg *otg;
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)
...@@ -75,7 +71,6 @@ static void s5p_setup_vbus_gpio(struct platform_device *pdev) ...@@ -75,7 +71,6 @@ static void s5p_setup_vbus_gpio(struct platform_device *pdev)
static int s5p_ehci_probe(struct platform_device *pdev) static int s5p_ehci_probe(struct platform_device *pdev)
{ {
struct s5p_ehci_platdata *pdata = dev_get_platdata(&pdev->dev);
struct s5p_ehci_hcd *s5p_ehci; struct s5p_ehci_hcd *s5p_ehci;
struct usb_hcd *hcd; struct usb_hcd *hcd;
struct ehci_hcd *ehci; struct ehci_hcd *ehci;
...@@ -105,21 +100,14 @@ static int s5p_ehci_probe(struct platform_device *pdev) ...@@ -105,21 +100,14 @@ static int s5p_ehci_probe(struct platform_device *pdev)
s5p_ehci = to_s5p_ehci(hcd); s5p_ehci = to_s5p_ehci(hcd);
if (of_device_is_compatible(pdev->dev.of_node, if (of_device_is_compatible(pdev->dev.of_node,
"samsung,exynos5440-ehci")) { "samsung,exynos5440-ehci"))
s5p_ehci->pdata = &empty_platdata;
goto skip_phy; 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 */ usb_put_hcd(hcd);
if (!pdata) { dev_warn(&pdev->dev, "no platform data or transceiver defined\n");
usb_put_hcd(hcd); return -EPROBE_DEFER;
dev_warn(&pdev->dev, "no platform data or transceiver defined\n");
return -EPROBE_DEFER;
} else {
s5p_ehci->pdata = pdata;
}
} else { } else {
s5p_ehci->phy = phy; s5p_ehci->phy = phy;
s5p_ehci->otg = phy->otg; s5p_ehci->otg = phy->otg;
...@@ -167,8 +155,6 @@ static int s5p_ehci_probe(struct platform_device *pdev) ...@@ -167,8 +155,6 @@ static int s5p_ehci_probe(struct platform_device *pdev)
if (s5p_ehci->phy) if (s5p_ehci->phy)
usb_phy_init(s5p_ehci->phy); usb_phy_init(s5p_ehci->phy);
else if (s5p_ehci->pdata->phy_init)
s5p_ehci->pdata->phy_init(pdev, USB_PHY_TYPE_HOST);
ehci = hcd_to_ehci(hcd); ehci = hcd_to_ehci(hcd);
ehci->caps = hcd->regs; ehci->caps = hcd->regs;
...@@ -189,8 +175,6 @@ static int s5p_ehci_probe(struct platform_device *pdev) ...@@ -189,8 +175,6 @@ static int s5p_ehci_probe(struct platform_device *pdev)
fail_add_hcd: fail_add_hcd:
if (s5p_ehci->phy) if (s5p_ehci->phy)
usb_phy_shutdown(s5p_ehci->phy); usb_phy_shutdown(s5p_ehci->phy);
else if (s5p_ehci->pdata->phy_exit)
s5p_ehci->pdata->phy_exit(pdev, USB_PHY_TYPE_HOST);
fail_io: fail_io:
clk_disable_unprepare(s5p_ehci->clk); clk_disable_unprepare(s5p_ehci->clk);
fail_clk: fail_clk:
...@@ -210,8 +194,6 @@ static int s5p_ehci_remove(struct platform_device *pdev) ...@@ -210,8 +194,6 @@ static int s5p_ehci_remove(struct platform_device *pdev)
if (s5p_ehci->phy) if (s5p_ehci->phy)
usb_phy_shutdown(s5p_ehci->phy); usb_phy_shutdown(s5p_ehci->phy);
else if (s5p_ehci->pdata->phy_exit)
s5p_ehci->pdata->phy_exit(pdev, USB_PHY_TYPE_HOST);
clk_disable_unprepare(s5p_ehci->clk); clk_disable_unprepare(s5p_ehci->clk);
...@@ -225,7 +207,6 @@ static int s5p_ehci_suspend(struct device *dev) ...@@ -225,7 +207,6 @@ static int s5p_ehci_suspend(struct device *dev)
{ {
struct usb_hcd *hcd = dev_get_drvdata(dev); struct usb_hcd *hcd = dev_get_drvdata(dev);
struct s5p_ehci_hcd *s5p_ehci = to_s5p_ehci(hcd); struct s5p_ehci_hcd *s5p_ehci = to_s5p_ehci(hcd);
struct platform_device *pdev = to_platform_device(dev);
bool do_wakeup = device_may_wakeup(dev); bool do_wakeup = device_may_wakeup(dev);
int rc; int rc;
...@@ -237,8 +218,6 @@ static int s5p_ehci_suspend(struct device *dev) ...@@ -237,8 +218,6 @@ static int s5p_ehci_suspend(struct device *dev)
if (s5p_ehci->phy) if (s5p_ehci->phy)
usb_phy_shutdown(s5p_ehci->phy); usb_phy_shutdown(s5p_ehci->phy);
else if (s5p_ehci->pdata->phy_exit)
s5p_ehci->pdata->phy_exit(pdev, USB_PHY_TYPE_HOST);
clk_disable_unprepare(s5p_ehci->clk); clk_disable_unprepare(s5p_ehci->clk);
...@@ -249,7 +228,6 @@ static int s5p_ehci_resume(struct device *dev) ...@@ -249,7 +228,6 @@ static int s5p_ehci_resume(struct device *dev)
{ {
struct usb_hcd *hcd = dev_get_drvdata(dev); struct usb_hcd *hcd = dev_get_drvdata(dev);
struct s5p_ehci_hcd *s5p_ehci = to_s5p_ehci(hcd); struct s5p_ehci_hcd *s5p_ehci = to_s5p_ehci(hcd);
struct platform_device *pdev = to_platform_device(dev);
clk_prepare_enable(s5p_ehci->clk); clk_prepare_enable(s5p_ehci->clk);
...@@ -258,8 +236,6 @@ static int s5p_ehci_resume(struct device *dev) ...@@ -258,8 +236,6 @@ static int s5p_ehci_resume(struct device *dev)
if (s5p_ehci->phy) if (s5p_ehci->phy)
usb_phy_init(s5p_ehci->phy); usb_phy_init(s5p_ehci->phy);
else if (s5p_ehci->pdata->phy_init)
s5p_ehci->pdata->phy_init(pdev, USB_PHY_TYPE_HOST);
/* DMA burst Enable */ /* DMA burst Enable */
writel(EHCI_INSNREG00_ENABLE_DMA_BURST, EHCI_INSNREG00(hcd->regs)); writel(EHCI_INSNREG00_ENABLE_DMA_BURST, EHCI_INSNREG00(hcd->regs));
......
/*
* Copyright (C) 2011 Samsung Electronics Co.Ltd
* Author: Joonyoung Shim <jy0922.shim@samsung.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
#ifndef __PLAT_SAMSUNG_EHCI_H
#define __PLAT_SAMSUNG_EHCI_H __FILE__
struct s5p_ehci_platdata {
int (*phy_init)(struct platform_device *pdev, int type);
int (*phy_exit)(struct platform_device *pdev, int type);
};
extern void s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd);
#endif /* __PLAT_SAMSUNG_EHCI_H */
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