From patchwork Thu Apr 4 23:01:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2395371 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id AB1633FD1A for ; Thu, 4 Apr 2013 23:03:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763424Ab3DDXDP (ORCPT ); Thu, 4 Apr 2013 19:03:15 -0400 Received: from mail-la0-f51.google.com ([209.85.215.51]:53381 "EHLO mail-la0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763181Ab3DDXDO (ORCPT ); Thu, 4 Apr 2013 19:03:14 -0400 Received: by mail-la0-f51.google.com with SMTP id fo13so2909475lab.24 for ; Thu, 04 Apr 2013 16:03:12 -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:cc:date:mime-version :content-type:content-transfer-encoding:message-id :x-gm-message-state; bh=Yk0ZkilpFyWtplB2MR7DLyHNlRwcuNSN0b1GlilK5uI=; b=nWWUNwnNtWQZgw03xJRuheNoDyKPs+GrZTijkYqjBbPo0ZgCq+gippqlca3QpX8Aap aoURyj8PefABAju4liPPGhwsgHv4pspzjteZ+2M2pK/uLxfQFgmRI/IHYE2Z66nPgf1T ycwi1HYfOuNUcm65YS29Ai9P8z1k6didtPCTFqJ6CV2649cuOr8XYLY4NhXp8B6rUiSY QG9E8ZuJ6ouV7LnVI9mEVyr8WmSuQZiAjqyNzloX5TrOy+86ZKVuSTFS0Bcsvx/EGCdF ujEPbjFizzFw0TmfqQTSa+xQ/+I3hCte3j1xXvRICG9gdiDOw8GayQhohdyQWWuYzqKY HeHA== X-Received: by 10.152.132.170 with SMTP id ov10mr4583545lab.21.1365116592741; Thu, 04 Apr 2013 16:03:12 -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 fl9sm4602802lbb.9.2013.04.04.16.03.10 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 04 Apr 2013 16:03:11 -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 Subject: [PATCH 3/8] ARM: shmobile: R8A7779: setup EHCI internal buffer From: Sergei Shtylyov Organization: Cogent Embedded Cc: linux-usb@vger.kernel.org Date: Fri, 5 Apr 2013 03:01:59 +0400 MIME-Version: 1.0 Message-Id: <201304050301.59961.sergei.shtylyov@cogentembedded.com> X-Gm-Message-State: ALoCoQnGw54X44q8WkcjggNgBKepbVVDdcNCRfwJVIX/h4kzRi2l2p/N2mzy0e4UD2/Fttm596OR Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Setup the EHCI internal buffer (before EHCI driver has a chance to touch the registers) using the init() method in 'struct usb_ehci_pdata'. Signed-off-by: Sergei Shtylyov --- arch/arm/mach-shmobile/setup-r8a7779.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- 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/arch/arm/mach-shmobile/setup-r8a7779.c =================================================================== --- renesas.orig/arch/arm/mach-shmobile/setup-r8a7779.c +++ renesas/arch/arm/mach-shmobile/setup-r8a7779.c @@ -445,10 +445,26 @@ static void usb_power_off(struct platfor pm_runtime_disable(&pdev->dev); } +static int ehci_init_internal_buffer(struct platform_device *pdev, + void __iomem *regs) +{ + /* + * Below are recommended values from the datasheet; + * see [USB :: Setting of EHCI Internal Buffer]. + */ + /* EHCI IP internal buffer setting */ + iowrite32(0x00ff0040, regs + 0x0094); + /* EHCI IP internal buffer enable */ + iowrite32(0x00000001, regs + 0x009C); + + return 0; +} + static struct usb_ehci_pdata ehcix_pdata = { .power_on = usb_power_on, .power_off = usb_power_off, .power_suspend = usb_power_off, + .init = ehci_init_internal_buffer, }; static struct resource ehci0_resources[] = {