From patchwork Wed May 14 20:30:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 30196 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 683EC208CF for ; Wed, 14 May 2014 20:31:09 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id pa12sf366980veb.11 for ; Wed, 14 May 2014 13:31:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:date :message-id:subject:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=EO8hlODYh5r5Lqt5pYATtfSuFW3pf6cgKrTe4OAp7Ls=; b=lUN3BmMSwIHBP0R0g0sS7cUS17DtbWreAtpbnTXSTk+uH8agi4DBqvnFdFcxdieQ4V HVf8wKloynlp+h9ZvRE70VMfNKeKy0LQkjAzO5f34NSWiB+toJk3Wqw3JIktvfT8mypz rSHRwNshlK6YHfmQATAQqCgcNZXwZKVOayRggzPBY/ak5ZTFld61B7NAo1S/U4pjrhis d4iexGPj48dYnC+9RCjJ3dHWfZ0UQeDOi4nhYTQHDTp6eNXQNKDcbGlKNHMgUcxOP8gw Ma8jMEzVjvDA1bS8PDMMMDBEntoLuAx12YZE7u6DI5Wwmv4Hxk7FKlrtSsKBTBOubKOV dQ6g== X-Gm-Message-State: ALoCoQmgefbIu5adrocl1QL4P9yxcxtdZz6oIQSrzsJ20Gcz7KJ5MfXCSy+20m81SvQOuUTt/6my X-Received: by 10.58.22.70 with SMTP id b6mr2792453vef.13.1400099469216; Wed, 14 May 2014 13:31:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.107.247 with SMTP id h110ls2653337qgf.44.gmail; Wed, 14 May 2014 13:31:09 -0700 (PDT) X-Received: by 10.58.84.65 with SMTP id w1mr4632669vey.8.1400099469119; Wed, 14 May 2014 13:31:09 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id rz3si513743veb.187.2014.05.14.13.31.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 May 2014 13:31:09 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id if17so3160664vcb.36 for ; Wed, 14 May 2014 13:31:09 -0700 (PDT) X-Received: by 10.221.64.80 with SMTP id xh16mr3024685vcb.35.1400099468962; Wed, 14 May 2014 13:31:08 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp269418vcb; Wed, 14 May 2014 13:31:08 -0700 (PDT) X-Received: by 10.66.148.134 with SMTP id ts6mr7044835pab.113.1400099467513; Wed, 14 May 2014 13:31:07 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wf9si2981062pab.230.2014.05.14.13.31.06; Wed, 14 May 2014 13:31:06 -0700 (PDT) Received-SPF: none (google.com: linux-usb-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751951AbaENUbE (ORCPT + 3 others); Wed, 14 May 2014 16:31:04 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:44867 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751640AbaENUbD (ORCPT ); Wed, 14 May 2014 16:31:03 -0400 Received: from cpc11-sgyl31-2-0-cust672.sgyl.cable.virginm.net ([94.175.94.161] helo=debutante.sirena.org.uk) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1WkfpG-0002Dq-CE; Wed, 14 May 2014 20:30:58 +0000 Received: from broonie by debutante.sirena.org.uk with local (Exim 4.82) (envelope-from ) id 1WkfpD-0006Jm-8h; Wed, 14 May 2014 21:30:51 +0100 From: Mark Brown To: Alan Stern , Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org, linaro-kernel@lists.linaro.org, Liviu Dudau , Ryan Harkin , Mark Brown Date: Wed, 14 May 2014 21:30:48 +0100 Message-Id: <1400099448-24222-1-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 2.0.0.rc2 X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mezzanine.sirena.org.uk X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.2 Subject: [PATCH] usb: ehci: Enable support for 64bit EHCI host controllers in arm64 X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: broonie@kernel.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Liviu Dudau arm64 architecture handles correctly 64bit DMAs and can enable support for 64bit EHCI host controllers. Signed-off-by: Liviu Dudau Signed-off-by: Ryan Harkin Signed-off-by: Mark Brown --- drivers/usb/host/ehci-hcd.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 81cda09b47e3..e704d403beae 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -590,11 +590,17 @@ static int ehci_run (struct usb_hcd *hcd) */ hcc_params = ehci_readl(ehci, &ehci->caps->hcc_params); if (HCC_64BIT_ADDR(hcc_params)) { - ehci_writel(ehci, 0, &ehci->regs->segment); -#if 0 -// this is deeply broken on almost all architectures +#if CONFIG_ARM64 + ehci_writel(ehci, ehci->periodic_dma >> 32, + &ehci->regs->segment); + /* + * this is deeply broken on almost all architectures + * but arm64 can use it so enable it + */ if (!dma_set_mask(hcd->self.controller, DMA_BIT_MASK(64))) ehci_info(ehci, "enabled 64bit DMA\n"); +#else + ehci_writel(ehci, 0, &ehci->regs->segment); #endif }