From patchwork Mon Apr 8 21:22:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2411651 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id D3890DFB78 for ; Mon, 8 Apr 2013 21:23:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936216Ab3DHVX6 (ORCPT ); Mon, 8 Apr 2013 17:23:58 -0400 Received: from mail-la0-f49.google.com ([209.85.215.49]:49718 "EHLO mail-la0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762574Ab3DHVX5 (ORCPT ); Mon, 8 Apr 2013 17:23:57 -0400 Received: by mail-la0-f49.google.com with SMTP id fs12so1121990lab.22 for ; Mon, 08 Apr 2013 14:23:53 -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=Toz/JdJEKJWovWA88qtIsKUWneMkA+JIXO5zj35ZXc4=; b=FNgDErmrQFc1F8MJ+oDq42mRJqWOy6TF2HGx/NqB6REEZk7tOwYUONkjhBEURFHaBf 1z8fWMyZp+mDHnKhEZdI2GgoEDp5Feb6TtCeqnpRR5mAoVFbdTAkdEHYPXWwL8w8jYbd 5Nmg/gjmT0wnP3kk4mgSOEUEmeacqHSH3/9QwUhabk95uhS9rGGUGtzEzHHcmUaF0xhJ 0PwMauZZWdlPRMj6hNPs+CXU9SdpY8NhUfIyjWRkYeEPzuZJcI+5QYD7JGSch+NS6Mth nGCuA4ePEK9RzQTiQ+1+z3SyWGZpOK1/ckv4/n9zqlqr8g0Sr0fIZW3R4Tm1zZMw2W0T xBfQ== X-Received: by 10.112.146.198 with SMTP id te6mr2759890lbb.133.1365456233852; Mon, 08 Apr 2013 14:23:53 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-79-99-249.pppoe.mtu-net.ru. [91.79.99.249]) by mx.google.com with ESMTPS id fz10sm11361622lbb.12.2013.04.08.14.23.51 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 08 Apr 2013 14:23:52 -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 v2 4/9] rcar-phy: remove EHCI internal buffer setup From: Sergei Shtylyov Organization: Cogent Embedded Date: Tue, 9 Apr 2013 01:22:49 +0400 MIME-Version: 1.0 Message-Id: <201304090122.49969.sergei.shtylyov@cogentembedded.com> X-Gm-Message-State: ALoCoQmqBAyGfhq6dky7aZnXAqwYgMSffJkp8YVIl1NTIVLhffugPe2SZeP/KALIn8MJnlhMuEq0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.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 --- Changes since the original posting: - split R8A7779 SoC file change to a separate patch. drivers/usb/phy/rcar-phy.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);