From patchwork Thu Apr 4 23:03:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2396611 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 6091FDF2E5 for ; Fri, 5 Apr 2013 04:32:54 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UNyKZ-0008BY-G3 for patchwork-linux-arm@patchwork.kernel.org; Fri, 05 Apr 2013 04:32:51 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UNtDX-0006Xn-5u; Thu, 04 Apr 2013 23:05:15 +0000 Received: from mail-lb0-f171.google.com ([209.85.217.171]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UNtDT-0006WW-Mn for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2013 23:05:12 +0000 Received: by mail-lb0-f171.google.com with SMTP id v10so3197175lbd.2 for ; Thu, 04 Apr 2013 16:05:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:to:subject:from:organization:date:mime-version :content-type:content-transfer-encoding:message-id :x-gm-message-state; bh=krhQGh9YrHJwGTt/22wVnDwfLfdLXtGmDA1PMcLx88I=; b=kO0W8ObtUo7SIw7EOCJem2zC6F3lril3ILS8KXTisv6PbBFF8lGhbXLUTjjqMQxCnO EmjYO7b6/ABDlDbju/fstC8stCc3Gcjysf+KXwGC6u4itWHSZoFTukxonkaDFMCpxrl6 BAeMYjMTjkAaacg4876PdyH+hY321xT5u2AftO98MnP63DXKA0+jnhsFdo2+TXOcfT5m oRE/uU4AiBPP+p7UX/Nv1gX1blbBMBklszZ5+hK0eHi5TwSJRkITfohoD4EnZ4SsM8c7 YLZpgpsbXSMULszowzy9uW9gdIJig5GhuxUv7zA9L5smuC6oC8/w2ccVfpYx+qLb1IcY vXog== X-Received: by 10.112.168.97 with SMTP id zv1mr4653016lbb.25.1365116709460; Thu, 04 Apr 2013 16:05:09 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-79-100-82.pppoe.mtu-net.ru. [91.79.100.82]) by mx.google.com with ESMTPS id w6sm1884612lad.5.2013.04.04.16.05.07 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 04 Apr 2013 16:05:08 -0700 (PDT) To: horms@verge.net.au, magnus.damm@gmail.com, linux@arm.linux.org.uk, linux-sh@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, gregkh@linuxfoundation.org, balbi@ti.com Subject: [PATCH 4/8] rcar-phy: remove EHCI internal buffer setup From: Sergei Shtylyov Organization: Cogent Embedded Date: Fri, 5 Apr 2013 03:03:55 +0400 MIME-Version: 1.0 Message-Id: <201304050303.56515.sergei.shtylyov@cogentembedded.com> X-Gm-Message-State: ALoCoQlAmfz3DdxVcnIojFeMDOSKvsydwil8I7ppRRnMZAzSAxaCqON/94V3c2eJlSMzp1med9TY X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130404_190511_922092_382122A3 X-CRM114-Status: GOOD ( 14.38 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.217.171 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Now that the EHCI internal buffer setup is done by the platform code, we can remove such code from this driver as it never really belonged here. We also no longer need the 2nd memory region now (2nd EHCI controller is simply missing in e.g. R8A7778 SoC). Signed-off-by: Sergei Shtylyov --- arch/arm/mach-shmobile/setup-r8a7779.c | 5 ----- drivers/usb/phy/rcar-phy.c | 28 ++++------------------------ 2 files changed, 4 insertions(+), 29 deletions(-) Index: renesas/arch/arm/mach-shmobile/setup-r8a7779.c =================================================================== --- renesas.orig/arch/arm/mach-shmobile/setup-r8a7779.c +++ renesas/arch/arm/mach-shmobile/setup-r8a7779.c @@ -405,11 +405,6 @@ static struct resource usb_phy_resources .end = 0xffe70900 - 1, .flags = IORESOURCE_MEM, }, - [1] = { - .start = 0xfff70000, - .end = 0xfff70900 - 1, - .flags = IORESOURCE_MEM, - }, }; static struct platform_device usb_phy_device = { Index: renesas/drivers/usb/phy/rcar-phy.c =================================================================== --- renesas.orig/drivers/usb/phy/rcar-phy.c +++ renesas/drivers/usb/phy/rcar-phy.c @@ -23,8 +23,6 @@ #define USBEH0 0x080C #define USBOH0 0x081C #define USBCTL0 0x0858 -#define EIIBC1 0x0094 -#define EIIBC2 0x009C /* USBPCTRL1 */ #define PHY_RST (1 << 2) @@ -40,7 +38,6 @@ struct rcar_usb_phy_priv { spinlock_t lock; void __iomem *reg0; - void __iomem *reg1; int counter; }; @@ -59,7 +56,6 @@ static int rcar_usb_phy_init(struct usb_ struct rcar_usb_phy_priv *priv = usb_phy_to_priv(phy); struct device *dev = phy->dev; void __iomem *reg0 = priv->reg0; - void __iomem *reg1 = priv->reg1; int i; u32 val; unsigned long flags; @@ -97,19 +93,6 @@ static int rcar_usb_phy_init(struct usb_ iowrite32(0x00000000, (reg0 + USBPCTRL0)); /* - * EHCI IP internal buffer setting - * EHCI IP internal buffer enable - * - * These are recommended value of a datasheet - * see [USB :: EHCI internal buffer setting] - */ - iowrite32(0x00ff0040, (reg0 + EIIBC1)); - iowrite32(0x00ff0040, (reg1 + EIIBC1)); - - iowrite32(0x00000001, (reg0 + EIIBC2)); - iowrite32(0x00000001, (reg1 + EIIBC2)); - - /* * Bus alignment settings */ @@ -145,14 +128,13 @@ static void rcar_usb_phy_shutdown(struct static int rcar_usb_phy_probe(struct platform_device *pdev) { struct rcar_usb_phy_priv *priv; - struct resource *res0, *res1; + struct resource *res0; struct device *dev = &pdev->dev; - void __iomem *reg0, *reg1; + void __iomem *reg0; int ret; res0 = platform_get_resource(pdev, IORESOURCE_MEM, 0); - res1 = platform_get_resource(pdev, IORESOURCE_MEM, 1); - if (!res0 || !res1) { + if (!res0) { dev_err(dev, "Not enough platform resources\n"); return -EINVAL; } @@ -164,8 +146,7 @@ static int rcar_usb_phy_probe(struct pla * this driver can't use devm_request_and_ioremap(dev, res) here */ reg0 = devm_ioremap_nocache(dev, res0->start, resource_size(res0)); - reg1 = devm_ioremap_nocache(dev, res1->start, resource_size(res1)); - if (!reg0 || !reg1) { + if (!reg0) { dev_err(dev, "ioremap error\n"); return -ENOMEM; } @@ -177,7 +158,6 @@ static int rcar_usb_phy_probe(struct pla } priv->reg0 = reg0; - priv->reg1 = reg1; priv->counter = 0; priv->phy.dev = dev; priv->phy.label = dev_name(dev);