From patchwork Thu Oct 10 07:42:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 3014661 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 97D0FBF924 for ; Thu, 10 Oct 2013 07:42:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A04EE20163 for ; Thu, 10 Oct 2013 07:42:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CFBB320154 for ; Thu, 10 Oct 2013 07:42:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752878Ab3JJHmu (ORCPT ); Thu, 10 Oct 2013 03:42:50 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:54263 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752811Ab3JJHmt (ORCPT ); Thu, 10 Oct 2013 03:42:49 -0400 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MUG00CIP02RAGJ0@mailout1.samsung.com>; Thu, 10 Oct 2013 16:42:48 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.49]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id B4.F5.17682.87A56525; Thu, 10 Oct 2013 16:42:48 +0900 (KST) X-AuditID: cbfee68e-b7f756d000004512-17-52565a7838bc Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id ED.12.09055.77A56525; Thu, 10 Oct 2013 16:42:48 +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 <0MUG0064E03B61U0@mmp2.samsung.com>; Thu, 10 Oct 2013 16:42:47 +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' , 'Sachin Kamat' , 'Jingoo Han' References: <000101cec58b$ee8bd2f0$cba378d0$%han@samsung.com> In-reply-to: <000101cec58b$ee8bd2f0$cba378d0$%han@samsung.com> Subject: [PATCH V2 5/5] USB: host: Rename ehci-s5p to ehci-exynos Date: Thu, 10 Oct 2013 16:42:47 +0900 Message-id: <000601cec58c$50988830$f1c99890$%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: Ac7Fi+5bS2rX9cS6SFqxMcDwCOMqpwAAFRxw Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLIsWRmVeSWpSXmKPExsVy+t8zQ92KqLAgg/7PPBbNi9ezWVxeeInV onfBVTaLGef3MVksWtbKbHH4TTurxck/vYwWE35fYLNYP+M1iwOnx51re9g89s9dw+4x++4P Ro++LasYPT5vkgtgjeKySUnNySxLLdK3S+DKmNd8n7HgUXDFzwcn2RoYW9y6GDk5JARMJB5u uMMMYYtJXLi3nq2LkYtDSGAZo0TPno3MMEVLVt5hhEhMZ5TYsmArE4Tzi1Fi28EjYFVsAmoS X74cZgexRQRMJTa+nwLWwSywm0ni0Yq7rCAJIQFbiVM3b4AVcQrYSWyeM4sFxBYWcJQ40TMR LM4ioCox/edDMJsXqL55yUkmCFtQ4sfke2D1zAJaEut3HmeCsOUlNq95C3QEB9Cp6hKP/upC 3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WiQEGtiWXFl7iFGCQ5mJRHe 6SeBQrwpiZVVqUX58UWlOanFhxiTgR6dyCwlmpwPTGd5JfGGxiZmRpZGZhZGJubmpAkrifMe aLUOFBJITyxJzU5NLUgtgtnCxMEp1cAosDv3w9mr8ZfixMLqWubxsV6U/djm22t7uqn59wZ9 VpH7rTkT8wWnvZx4Ic3o4KftlS9y1Y+HT/t8p/bfspv3znDypC72YS5InJcRre299MUNTzdz zh/fciIuX/k4vUB24nGuzRnz9P06DufuXs9cnbj0jI8W23mDWzKPL7exl59hfKmvwrpdiaU4 I9FQi7moOBEA7vNcol0DAAA= 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 Currently, Samsung is using 'EXYNOS' as the name of Samsung SoCs. Thus, ehci-exynos is preferred than ehci-s5p. Signed-off-by: Jingoo Han --- drivers/usb/host/Kconfig | 5 +- drivers/usb/host/Makefile | 2 +- drivers/usb/host/{ehci-s5p.c => ehci-exynos.c} | 132 ++++++++++++------------ 3 files changed, 69 insertions(+), 70 deletions(-) rename drivers/usb/host/{ehci-s5p.c => ehci-exynos.c} (62%) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 70cb1a9..80e72fb 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -203,12 +203,11 @@ config USB_EHCI_SH Enables support for the on-chip EHCI controller on the SuperH. If you use the PCI EHCI controller, this option is not necessary. -config USB_EHCI_S5P +config USB_EHCI_EXYNOS tristate "EHCI support for Samsung S5P/EXYNOS SoC Series" depends on PLAT_S5P || ARCH_EXYNOS help - Enable support for the Samsung S5Pxxxx and Exynos3/4/5 SOC's - on-chip EHCI controller. + Enable support for the Samsung Exynos SOC's on-chip EHCI controller. config USB_EHCI_MV bool "EHCI support for Marvell PXA/MMP USB controller" diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index 0b9fdee..9dc11c2 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -34,7 +34,7 @@ obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o obj-$(CONFIG_USB_EHCI_HCD_OMAP) += ehci-omap.o obj-$(CONFIG_USB_EHCI_HCD_ORION) += ehci-orion.o obj-$(CONFIG_USB_EHCI_HCD_SPEAR) += ehci-spear.o -obj-$(CONFIG_USB_EHCI_S5P) += ehci-s5p.o +obj-$(CONFIG_USB_EHCI_EXYNOS) += ehci-exynos.o obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o obj-$(CONFIG_USB_EHCI_MSM) += ehci-msm.o obj-$(CONFIG_USB_EHCI_TEGRA) += ehci-tegra.o diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-exynos.c similarity index 62% rename from drivers/usb/host/ehci-s5p.c rename to drivers/usb/host/ehci-exynos.c index 45e1ad3..016352e 100644 --- a/drivers/usb/host/ehci-s5p.c +++ b/drivers/usb/host/ehci-exynos.c @@ -1,5 +1,5 @@ /* - * SAMSUNG S5P USB HOST EHCI Controller + * SAMSUNG EXYNOS USB HOST EHCI Controller * * Copyright (C) 2011 Samsung Electronics Co.Ltd * Author: Jingoo Han @@ -28,7 +28,7 @@ #include "ehci.h" -#define DRIVER_DESC "EHCI s5p driver" +#define DRIVER_DESC "EHCI EXYNOS driver" #define EHCI_INSNREG00(base) (base + 0x90) #define EHCI_INSNREG00_ENA_INCR16 (0x1 << 25) @@ -39,18 +39,18 @@ (EHCI_INSNREG00_ENA_INCR16 | EHCI_INSNREG00_ENA_INCR8 | \ EHCI_INSNREG00_ENA_INCR4 | EHCI_INSNREG00_ENA_INCRX_ALIGN) -static const char hcd_name[] = "ehci-s5p"; -static struct hc_driver __read_mostly s5p_ehci_hc_driver; +static const char hcd_name[] = "ehci-exynos"; +static struct hc_driver __read_mostly exynos_ehci_hc_driver; -struct s5p_ehci_hcd { +struct exynos_ehci_hcd { struct clk *clk; struct usb_phy *phy; struct usb_otg *otg; }; -#define to_s5p_ehci(hcd) (struct s5p_ehci_hcd *)(hcd_to_ehci(hcd)->priv) +#define to_exynos_ehci(hcd) (struct exynos_ehci_hcd *)(hcd_to_ehci(hcd)->priv) -static void s5p_setup_vbus_gpio(struct platform_device *pdev) +static void exynos_setup_vbus_gpio(struct platform_device *pdev) { struct device *dev = &pdev->dev; int err; @@ -69,9 +69,9 @@ static void s5p_setup_vbus_gpio(struct platform_device *pdev) dev_err(dev, "can't request ehci vbus gpio %d", gpio); } -static int s5p_ehci_probe(struct platform_device *pdev) +static int exynos_ehci_probe(struct platform_device *pdev) { - struct s5p_ehci_hcd *s5p_ehci; + struct exynos_ehci_hcd *exynos_ehci; struct usb_hcd *hcd; struct ehci_hcd *ehci; struct resource *res; @@ -89,15 +89,15 @@ static int s5p_ehci_probe(struct platform_device *pdev) if (!pdev->dev.coherent_dma_mask) pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); - s5p_setup_vbus_gpio(pdev); + exynos_setup_vbus_gpio(pdev); - hcd = usb_create_hcd(&s5p_ehci_hc_driver, + hcd = usb_create_hcd(&exynos_ehci_hc_driver, &pdev->dev, dev_name(&pdev->dev)); if (!hcd) { dev_err(&pdev->dev, "Unable to create HCD\n"); return -ENOMEM; } - s5p_ehci = to_s5p_ehci(hcd); + exynos_ehci = to_exynos_ehci(hcd); if (of_device_is_compatible(pdev->dev.of_node, "samsung,exynos5440-ehci")) @@ -109,21 +109,21 @@ static int s5p_ehci_probe(struct platform_device *pdev) dev_warn(&pdev->dev, "no platform data or transceiver defined\n"); return -EPROBE_DEFER; } else { - s5p_ehci->phy = phy; - s5p_ehci->otg = phy->otg; + exynos_ehci->phy = phy; + exynos_ehci->otg = phy->otg; } skip_phy: - s5p_ehci->clk = devm_clk_get(&pdev->dev, "usbhost"); + exynos_ehci->clk = devm_clk_get(&pdev->dev, "usbhost"); - if (IS_ERR(s5p_ehci->clk)) { + if (IS_ERR(exynos_ehci->clk)) { dev_err(&pdev->dev, "Failed to get usbhost clock\n"); - err = PTR_ERR(s5p_ehci->clk); + err = PTR_ERR(exynos_ehci->clk); goto fail_clk; } - err = clk_prepare_enable(s5p_ehci->clk); + err = clk_prepare_enable(exynos_ehci->clk); if (err) goto fail_clk; @@ -150,11 +150,11 @@ skip_phy: goto fail_io; } - if (s5p_ehci->otg) - s5p_ehci->otg->set_host(s5p_ehci->otg, &hcd->self); + if (exynos_ehci->otg) + exynos_ehci->otg->set_host(exynos_ehci->otg, &hcd->self); - if (s5p_ehci->phy) - usb_phy_init(s5p_ehci->phy); + if (exynos_ehci->phy) + usb_phy_init(exynos_ehci->phy); ehci = hcd_to_ehci(hcd); ehci->caps = hcd->regs; @@ -173,29 +173,29 @@ skip_phy: return 0; fail_add_hcd: - if (s5p_ehci->phy) - usb_phy_shutdown(s5p_ehci->phy); + if (exynos_ehci->phy) + usb_phy_shutdown(exynos_ehci->phy); fail_io: - clk_disable_unprepare(s5p_ehci->clk); + clk_disable_unprepare(exynos_ehci->clk); fail_clk: usb_put_hcd(hcd); return err; } -static int s5p_ehci_remove(struct platform_device *pdev) +static int exynos_ehci_remove(struct platform_device *pdev) { struct usb_hcd *hcd = platform_get_drvdata(pdev); - struct s5p_ehci_hcd *s5p_ehci = to_s5p_ehci(hcd); + struct exynos_ehci_hcd *exynos_ehci = to_exynos_ehci(hcd); usb_remove_hcd(hcd); - if (s5p_ehci->otg) - s5p_ehci->otg->set_host(s5p_ehci->otg, &hcd->self); + if (exynos_ehci->otg) + exynos_ehci->otg->set_host(exynos_ehci->otg, &hcd->self); - if (s5p_ehci->phy) - usb_phy_shutdown(s5p_ehci->phy); + if (exynos_ehci->phy) + usb_phy_shutdown(exynos_ehci->phy); - clk_disable_unprepare(s5p_ehci->clk); + clk_disable_unprepare(exynos_ehci->clk); usb_put_hcd(hcd); @@ -203,39 +203,39 @@ static int s5p_ehci_remove(struct platform_device *pdev) } #ifdef CONFIG_PM -static int s5p_ehci_suspend(struct device *dev) +static int exynos_ehci_suspend(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); - struct s5p_ehci_hcd *s5p_ehci = to_s5p_ehci(hcd); + struct exynos_ehci_hcd *exynos_ehci = to_exynos_ehci(hcd); bool do_wakeup = device_may_wakeup(dev); int rc; rc = ehci_suspend(hcd, do_wakeup); - if (s5p_ehci->otg) - s5p_ehci->otg->set_host(s5p_ehci->otg, &hcd->self); + if (exynos_ehci->otg) + exynos_ehci->otg->set_host(exynos_ehci->otg, &hcd->self); - if (s5p_ehci->phy) - usb_phy_shutdown(s5p_ehci->phy); + if (exynos_ehci->phy) + usb_phy_shutdown(exynos_ehci->phy); - clk_disable_unprepare(s5p_ehci->clk); + clk_disable_unprepare(exynos_ehci->clk); return rc; } -static int s5p_ehci_resume(struct device *dev) +static int exynos_ehci_resume(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); - struct s5p_ehci_hcd *s5p_ehci = to_s5p_ehci(hcd); + struct exynos_ehci_hcd *exynos_ehci = to_exynos_ehci(hcd); - clk_prepare_enable(s5p_ehci->clk); + clk_prepare_enable(exynos_ehci->clk); - if (s5p_ehci->otg) - s5p_ehci->otg->set_host(s5p_ehci->otg, &hcd->self); + if (exynos_ehci->otg) + exynos_ehci->otg->set_host(exynos_ehci->otg, &hcd->self); - if (s5p_ehci->phy) - usb_phy_init(s5p_ehci->phy); + if (exynos_ehci->phy) + usb_phy_init(exynos_ehci->phy); /* DMA burst Enable */ writel(EHCI_INSNREG00_ENABLE_DMA_BURST, EHCI_INSNREG00(hcd->regs)); @@ -244,13 +244,13 @@ static int s5p_ehci_resume(struct device *dev) return 0; } #else -#define s5p_ehci_suspend NULL -#define s5p_ehci_resume NULL +#define exynos_ehci_suspend NULL +#define exynos_ehci_resume NULL #endif -static const struct dev_pm_ops s5p_ehci_pm_ops = { - .suspend = s5p_ehci_suspend, - .resume = s5p_ehci_resume, +static const struct dev_pm_ops exynos_ehci_pm_ops = { + .suspend = exynos_ehci_suspend, + .resume = exynos_ehci_resume, }; #ifdef CONFIG_OF @@ -262,40 +262,40 @@ static const struct of_device_id exynos_ehci_match[] = { MODULE_DEVICE_TABLE(of, exynos_ehci_match); #endif -static struct platform_driver s5p_ehci_driver = { - .probe = s5p_ehci_probe, - .remove = s5p_ehci_remove, +static struct platform_driver exynos_ehci_driver = { + .probe = exynos_ehci_probe, + .remove = exynos_ehci_remove, .shutdown = usb_hcd_platform_shutdown, .driver = { - .name = "s5p-ehci", + .name = "exynos-ehci", .owner = THIS_MODULE, - .pm = &s5p_ehci_pm_ops, + .pm = &exynos_ehci_pm_ops, .of_match_table = of_match_ptr(exynos_ehci_match), } }; -static const struct ehci_driver_overrides s5p_overrides __initdata = { - .extra_priv_size = sizeof(struct s5p_ehci_hcd), +static const struct ehci_driver_overrides exynos_overrides __initdata = { + .extra_priv_size = sizeof(struct exynos_ehci_hcd), }; -static int __init ehci_s5p_init(void) +static int __init ehci_exynos_init(void) { if (usb_disabled()) return -ENODEV; pr_info("%s: " DRIVER_DESC "\n", hcd_name); - ehci_init_driver(&s5p_ehci_hc_driver, &s5p_overrides); - return platform_driver_register(&s5p_ehci_driver); + ehci_init_driver(&exynos_ehci_hc_driver, &exynos_overrides); + return platform_driver_register(&exynos_ehci_driver); } -module_init(ehci_s5p_init); +module_init(ehci_exynos_init); -static void __exit ehci_s5p_cleanup(void) +static void __exit ehci_exynos_cleanup(void) { - platform_driver_unregister(&s5p_ehci_driver); + platform_driver_unregister(&exynos_ehci_driver); } -module_exit(ehci_s5p_cleanup); +module_exit(ehci_exynos_cleanup); MODULE_DESCRIPTION(DRIVER_DESC); -MODULE_ALIAS("platform:s5p-ehci"); +MODULE_ALIAS("platform:exynos-ehci"); MODULE_AUTHOR("Jingoo Han"); MODULE_AUTHOR("Joonyoung Shim"); MODULE_LICENSE("GPL v2");