From patchwork Thu Oct 10 06:31:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 3014261 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9A3909F245 for ; Thu, 10 Oct 2013 06:32:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 968EE20142 for ; Thu, 10 Oct 2013 06:32:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 40F732013B for ; Thu, 10 Oct 2013 06:32:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751865Ab3JJGcA (ORCPT ); Thu, 10 Oct 2013 02:32:00 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:40103 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751569Ab3JJGb7 (ORCPT ); Thu, 10 Oct 2013 02:31:59 -0400 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MUF00CQ9WTAAGF0@mailout1.samsung.com>; Thu, 10 Oct 2013 15:31:58 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.47]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 7D.3D.31253.ED946525; Thu, 10 Oct 2013 15:31:58 +0900 (KST) X-AuditID: cbfee690-b7f3b6d000007a15-26-525649def558 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id BB.D5.05832.ED946525; Thu, 10 Oct 2013 15:31:58 +0900 (KST) Received: from DOJG1HAN03 ([12.23.120.99]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MUF008C3WTA2X10@mmp2.samsung.com>; Thu, 10 Oct 2013 15:31:58 +0900 (KST) From: Jingoo Han To: 'Greg Kroah-Hartman' Cc: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org, 'Kukjin Kim' , 'Alan Stern' , 'Sylwester Nawrocki' , 'Tomasz Figa' , 'Jingoo Han' References: <000001cec582$02a6cfb0$07f46f10$%han@samsung.com> In-reply-to: <000001cec582$02a6cfb0$07f46f10$%han@samsung.com> Subject: [PATCH 3/5] USB: ehci-exynos: Remove non-DT support Date: Thu, 10 Oct 2013 15:31:58 +0900 Message-id: <000901cec582$6ba1f6c0$42e5e440$%han@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac7FggI+9Gc/UHTXR/6J62TM6wkGowAAF0PQ Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrIIsWRmVeSWpSXmKPExsVy+t8zfd17nmFBBpf2S1s0L17PZnF54SVW i94FV9ksZpzfx2SxaFkrs8XhN+2sFhN+X2CzWD/jNYsDh8f+uWvYPWbf/cHo0bdlFaPH501y ASxRXDYpqTmZZalF+nYJXBlTJl1lLTipXfHw2RG2BsYjKl2MnBwSAiYSz1raGCFsMYkL99az dTFycQgJLGOUuLt+KhNM0aKmf0wQiemMEm9XnGOBcH4xSsydf48NpIpNQE3iy5fD7CC2iICp xMb3U8DGMgv0M0lcPZIGYgsJ2Ep8/b+aBcTmFLCTmN69CaxeWMBG4uvly2DbWARUJd5PfMoM YvMC1W+bPAXKFpT4MfkeC8RMLYn1O48zQdjyEpvXvAWq4QC6VF3i0V9diBOMJF487IAqF5HY 9+Id1Jcv2SW6vnNAr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Yk4EencgsJZqcD0xceSXxhsYmZkaWRmYWRibm5qQJK4nzHmy1DhQSSE8sSc1OTS1I LYLZwsTBKdXAOM1pv7Oa2knWA2zn5PvrpS4IlP7KnbHvUZXNq/MfnZ01VCMu3WFj+zzj4qb5 nKcfHLK33/OsY6nyDtOaPv8cc84NyR0PfHUi97ywjs1Ys+XjG4lPB52beK5Mv6qw4v3e0tmm Djd4zcU0D7+dfzhvbri3/V3ZHwtn2M1+ZpVpa/xriZR+u371eiWW4oxEQy3mouJEAKpyoc5S AwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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-exynos.h' file has been used for non-DT support. Thus, the 'usb-ehci-exynos.h' file can be removed. Signed-off-by: Jingoo Han --- drivers/usb/host/ehci-exynos.c | 33 +++---------------------- include/linux/platform_data/usb-ehci-exynos.h | 21 ---------------- 2 files changed, 4 insertions(+), 50 deletions(-) delete mode 100644 include/linux/platform_data/usb-ehci-exynos.h diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c index 42b5fb8..80c6a91 100644 --- a/drivers/usb/host/ehci-exynos.c +++ b/drivers/usb/host/ehci-exynos.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -47,11 +46,8 @@ struct exynos_ehci_hcd { struct clk *clk; struct usb_phy *phy; struct usb_otg *otg; - struct exynos_ehci_platdata *pdata; }; -static struct exynos_ehci_platdata empty_platdata; - #define to_exynos_ehci(hcd) (struct exynos_ehci_hcd *)(hcd_to_ehci(hcd)->priv) static void exynos_setup_vbus_gpio(struct platform_device *pdev) @@ -75,7 +71,6 @@ static void exynos_setup_vbus_gpio(struct platform_device *pdev) static int exynos_ehci_probe(struct platform_device *pdev) { - struct exynos_ehci_platdata *pdata = dev_get_platdata(&pdev->dev); struct exynos_ehci_hcd *exynos_ehci; struct usb_hcd *hcd; struct ehci_hcd *ehci; @@ -105,21 +100,14 @@ static int exynos_ehci_probe(struct platform_device *pdev) exynos_ehci = to_exynos_ehci(hcd); if (of_device_is_compatible(pdev->dev.of_node, - "samsung,exynos5440-ehci")) { - exynos_ehci->pdata = &empty_platdata; + "samsung,exynos5440-ehci")) goto skip_phy; - } phy = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2); if (IS_ERR(phy)) { - /* Fallback to pdata */ - if (!pdata) { - usb_put_hcd(hcd); - dev_warn(&pdev->dev, "no platform data or transceiver defined\n"); - return -EPROBE_DEFER; - } else { - exynos_ehci->pdata = pdata; - } + usb_put_hcd(hcd); + dev_warn(&pdev->dev, "no platform data or transceiver defined\n"); + return -EPROBE_DEFER; } else { exynos_ehci->phy = phy; exynos_ehci->otg = phy->otg; @@ -167,8 +155,6 @@ skip_phy: if (exynos_ehci->phy) usb_phy_init(exynos_ehci->phy); - else if (exynos_ehci->pdata->phy_init) - exynos_ehci->pdata->phy_init(pdev, USB_PHY_TYPE_HOST); ehci = hcd_to_ehci(hcd); ehci->caps = hcd->regs; @@ -189,8 +175,6 @@ skip_phy: fail_add_hcd: if (exynos_ehci->phy) usb_phy_shutdown(exynos_ehci->phy); - else if (exynos_ehci->pdata->phy_exit) - exynos_ehci->pdata->phy_exit(pdev, USB_PHY_TYPE_HOST); fail_io: clk_disable_unprepare(exynos_ehci->clk); fail_clk: @@ -210,8 +194,6 @@ static int exynos_ehci_remove(struct platform_device *pdev) if (exynos_ehci->phy) usb_phy_shutdown(exynos_ehci->phy); - else if (exynos_ehci->pdata->phy_exit) - exynos_ehci->pdata->phy_exit(pdev, USB_PHY_TYPE_HOST); clk_disable_unprepare(exynos_ehci->clk); @@ -225,8 +207,6 @@ static int exynos_ehci_suspend(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); struct exynos_ehci_hcd *exynos_ehci = to_exynos_ehci(hcd); - struct platform_device *pdev = to_platform_device(dev); - bool do_wakeup = device_may_wakeup(dev); int rc; @@ -237,8 +217,6 @@ static int exynos_ehci_suspend(struct device *dev) if (exynos_ehci->phy) usb_phy_shutdown(exynos_ehci->phy); - else if (exynos_ehci->pdata->phy_exit) - exynos_ehci->pdata->phy_exit(pdev, USB_PHY_TYPE_HOST); clk_disable_unprepare(exynos_ehci->clk); @@ -249,7 +227,6 @@ static int exynos_ehci_resume(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); struct exynos_ehci_hcd *exynos_ehci = to_exynos_ehci(hcd); - struct platform_device *pdev = to_platform_device(dev); clk_prepare_enable(exynos_ehci->clk); @@ -258,8 +235,6 @@ static int exynos_ehci_resume(struct device *dev) if (exynos_ehci->phy) usb_phy_init(exynos_ehci->phy); - else if (exynos_ehci->pdata->phy_init) - exynos_ehci->pdata->phy_init(pdev, USB_PHY_TYPE_HOST); /* DMA burst Enable */ writel(EHCI_INSNREG00_ENABLE_DMA_BURST, EHCI_INSNREG00(hcd->regs)); diff --git a/include/linux/platform_data/usb-ehci-exynos.h b/include/linux/platform_data/usb-ehci-exynos.h deleted file mode 100644 index 5413745..0000000 --- a/include/linux/platform_data/usb-ehci-exynos.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (C) 2011 Samsung Electronics Co.Ltd - * Author: Joonyoung Shim - * - * 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 __USB_EHCI_EXYNOS_H -#define __USB_EHCI_EXYNOS_H __FILE__ - -struct exynos_ehci_platdata { - int (*phy_init)(struct platform_device *pdev, int type); - int (*phy_exit)(struct platform_device *pdev, int type); -}; - -extern void exynos_ehci_set_platdata(struct exynos_ehci_platdata *pd); - -#endif /* __USB_EHCI_EXYNOS_H */