From patchwork Mon Mar 14 10:34:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 8578061 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 34F97C0553 for ; Mon, 14 Mar 2016 10:34:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7FA5720377 for ; Mon, 14 Mar 2016 10:34:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B750A20263 for ; Mon, 14 Mar 2016 10:34:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933723AbcCNKei (ORCPT ); Mon, 14 Mar 2016 06:34:38 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:10811 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932256AbcCNKeh (ORCPT ); Mon, 14 Mar 2016 06:34:37 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie3.idc.renesas.com with ESMTP; 14 Mar 2016 19:34:36 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id 8FE0149E4E; Mon, 14 Mar 2016 19:34:36 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 81B4A8002E; Mon, 14 Mar 2016 19:34:36 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 782B180030; Mon, 14 Mar 2016 19:34:36 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac1.idc.renesas.com with ESMTP id VAD31677; Mon, 14 Mar 2016 19:34:36 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="206318446" Received: from mail-pu1apc01lp0020.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.20]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 14 Mar 2016 19:34:35 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesasgroup-onmicrosoft-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=tyhVqlIlg/Ui4Vb4Qek9HqAyGAHRhUWB01pMBCCUbB0=; b=Xt4EXVbHCFsSCfvotd5ARPkwIFShHkBsgz5a47x+nCjKE5XjtfQUIbqNQIe5ULLel1NGYH4TkT4SkSTPg0O99DaQcrPgR1Vwa30DKN7f8vKGpOv51J+PV84mmiqBSFQqOTxV7CkNHfrtQet6xNBe9SKGDk6hHcsa2FAlGTj8ji4= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none; intel.com; dmarc=none action=none header.from=renesas.com; Received: from localhost (211.11.155.144) by TY1PR06MB0928.apcprd06.prod.outlook.com (10.164.99.154) with Microsoft SMTP Server (TLS) id 15.1.434.16; Mon, 14 Mar 2016 10:34:33 +0000 From: Yoshihiro Shimoda To: , CC: , , Yoshihiro Shimoda Subject: [PATCH v3 2/2] usb: host: xhci-plat: fix cannot work if R-Car Gen2/3 run on above 4GB phys Date: Mon, 14 Mar 2016 19:34:13 +0900 Message-ID: <1457951653-7516-3-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.4.msysgit.1 In-Reply-To: <1457951653-7516-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1457951653-7516-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR0201CA0023.apcprd02.prod.outlook.com (25.164.90.161) To TY1PR06MB0928.apcprd06.prod.outlook.com (25.164.99.154) X-MS-Office365-Filtering-Correlation-Id: 69cbcafc-3167-45e1-69c1-08d34bf43bfc X-Microsoft-Exchange-Diagnostics: 1; TY1PR06MB0928; 2:oE4cFcHUfdOn5efM+Fc5BE5wnefeyotWMgkA2GON2S/qO/Z5O8F16nlUkzZV4wLfv6oxy3fdlvceVogJSJo4JlA8j9xkQMR6L9vg/U0OKzADMSXeHX8pFuegKSXI085hrszdB1F2SPMAZdDf0Foth382PPYOmEF8hy8A1IHSzprHe0z/PrXTyLGQzvJqopI7; 3:xOrXNvcluFCocID9GwBLnqm1NZK6b94wXsXKZq4Uevtgwt5fW8K+0G/MUyogqHhq6Ye4P8zUdy3/lGpGMPI31V1cjgFxgw+vedQ8jBb8ACqkahnQcmDyD4WSo2WgU9l1; 25:VWcpZ9cGoN1zGas35GX2W6nse/IwyjJEb8x3wKA8l4E/AVMHuVtqyhhlDPijX1PVG7jPm/p5tEodnS58nSuU/JaA3ba9/x9s9QAqFe1rLjecQvVVF5s1LUE2Q6eif50d4S/gTVFwz2Df6EeCobeXBlb1PFPmk7nZGV1pFkFNyHPuZ9ZWmsfygiSJUL2M6ugOCmmO0IPt6Nzs9c34rdqSEUErzZ8DT4VHiVqeWRlIVV7HF2Tf3s+NLZmmDEbrU/xIzS9Zlhe+P/7ss3uzlHmunzct+URIi+DIyZ5uzPazrPubhX/M1tsh71fh2ktJAX++5AFI/zQ/ymAkIBLlPL2DCqPi2enZniji0kaQzg12VBZvkznjLFVj9EJnz52gUdoO2YeSTZEh7Ry/J0J6hbTaiQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:TY1PR06MB0928; X-Microsoft-Exchange-Diagnostics: 1; TY1PR06MB0928; 20:Br8nxXwQmPvRsKZlFEUEiEOL31jmtYWlGNwIDVXiJ7Y8dLgq+eruunKmCr0WzR6SNTISGiLRky0yy5pGUHMAHNzHSU2DEnThlaOweZOp3E9DXzihJQkwzGm5UMDs7IXy4DiGYlzo9aXk/7VPrNJeqQGuudFox9b6aKI7896gMLfo+GE6cYsLOHZGZriBJQYW/BSqHm1ijFjY7SJWxqT/iu8zC0dRRKT5lA+GpEPvKx+YW9hUs8D6mN1YCi3q/ATvwhmLUqPWb3D6IQdMCkv61f8Gt3ioBaRdSKiGcupGIlzAPN3b0GPm0H3Ys86WscBPdsnOd93MDksUdHE2lb7iM+Yp6U1B2kGmNvu5WF8r2HLBLgv+sg8Vbsjy5jVT6MpzsSlO52ZrMr9zb+4T7LwlZEKUd23UhqKx2kCv21Vz1poY8epQMGvjDcqiBOm15WggNQJuHDX0XVPDjvu7hWwOyNvq1wEyyT1xbGkyVIPvWnjvdgR5BXLwdEtkMES+4fCp; 4:jAa4o2qnWcbP4gr0f3Jxyi/qjCL9cqGIzfIdlKbVz1WXXIny4/rDHjvQJl9L+lAfIGn88ARJk1j4eursIyoRCkEfXPgE7K+UMldkGxt6XU8Zo3oNnWxQX9NYZRMv4Utm2VbX+Z4iPWqmZl13l0yd0La0GBcKVQT6Lwu0naOYaYicrnC7mn2hxG+Vb9LD4Tfe4CEOt205WksjnUsYidVQJ2Hoyab55tVuh+ZFOu/E7kbhPLfY9LxsaeQFI5X1yAFcFWmSF6Icklx2Vb+z0IfInnbKppth/6G4W1lL2hmmInboINbWR/6SozD0TBYm4S0VhZ9FwghKRhwC2vmWJMVWhXU3RR7R8S40h0P3i4tC3xcmPjbAVmqrMkITJXrBKGMq X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:TY1PR06MB0928; BCL:0; PCL:0; RULEID:; SRVR:TY1PR06MB0928; X-Forefront-PRVS: 0881A7A935 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(6069001)(76506005)(42186005)(47776003)(66066001)(50986999)(5004730100002)(92566002)(77096005)(81166005)(2950100001)(5003940100001)(5001770100001)(189998001)(107886002)(19580395003)(229853001)(586003)(6116002)(3846002)(1096002)(78352003)(76176999)(36756003)(4001430100002)(5008740100001)(2906002)(4326007)(33646002)(48376002)(50466002)(50226001)(42382002); DIR:OUT; SFP:1102; SCL:1; SRVR:TY1PR06MB0928; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; TY1PR06MB0928; 23:AXowaXIqK70DV5uEC4/pu6MDBg78D/flWo24rCB4J?= =?us-ascii?Q?VyxneTJ3NEaB1Livhq9TXHnRgks8wdjx4ig3wubnmJPxC9oMeW15jRhgjU11?= =?us-ascii?Q?d8Kpb3QqZnigApPIEK7TbqABcG/nuTaRDpNP/vXkVw3ZsceUgGHjyEyNb9nW?= =?us-ascii?Q?zmQLjR8z9npg3xH38uodbk7vC0ZDqO1U/rkdS78vfBlKxvm4GzL1GNqiRB5X?= =?us-ascii?Q?mTZNKTzQdLYILkqDElzhMmIMeGdQktfLJm2yHhrnn6bSfi79zvKyvckfj7sx?= =?us-ascii?Q?U/VJ4D/sVKQcUh9KbqY3FmPVVnacOTXO3kpaaagFaGKLIKFT/pB9THR0fG6y?= =?us-ascii?Q?OuZKjgrMbcR2g8q3kTx/zR3YozsfIal5xIYoeSttveHATPN/LJ/anh2mqJJ7?= =?us-ascii?Q?GLLj+OfeYvgdXugsvfpyZLVSdAf1t8InckbLxFbOZlZ+2Z9XP4QF973Yf5Z1?= =?us-ascii?Q?6MvehBrPdfKorT08sR1NYMkAzxa0+oZ2GIDF7AC5U6uKtKZfkQFVdDTQd/mo?= =?us-ascii?Q?HQy4XjH2nk0iGz15BIn22Nn7SDKSCyPJgIms7g2AbgJGwO1LNwcwSEIFFntO?= =?us-ascii?Q?1VZkjEez8jh03Xe8zHHP/bTqpodvyomVggT/eI/9qHkNG9iS0lP8sTzw95WJ?= =?us-ascii?Q?+KjDDaeoErhDCs6u/hTQ0TGU5gBjZfQeBW36GsCsb93BlFZaRYUzusxRK9Cv?= =?us-ascii?Q?5rFLzoc/cFksbmXhIiZW8nWMt6a2Qtaj4ac7LZele/poGDkpXTiglgIBuGbQ?= =?us-ascii?Q?qB+INkV5JRmFuo2eVo2Js+0hrJjPqHnIqiq+QyeCzHvfXP3CJY3Gz+vMdoh3?= =?us-ascii?Q?5nE4dPx2DlyKoqN8o1NGSkYEwvOBQLSJLYqMcU3d4fA2d4OMRXaItq51fmQu?= =?us-ascii?Q?QOA8VaWkdmGWcInMEiWUYrAEtEevrEZE1JTMfOBgC11lbZ3y+9hmhrUJ6uLc?= =?us-ascii?Q?98tlzyf0yGNo25mx5F3fAE1fEGlV08/LXcpkR6UwQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; TY1PR06MB0928; 5:Nj7462zSlEsDW6tIx57V1e7e+JDDMIFblllSEkX6cm/7pfKG3LWZJ2YnmJZyFnLPLw4IXxs6H+n/ZlZgwp5QcNPUzaiVq3lRlBTgv4fwKJAiu+XW8dHTCnKsZVjLKilEyarKQyuQEUByo0Mh/hD34w==; 24:8kpRVaHfLL0FGZrGdzb+FgvAs1KiNjKlBvRRkmiPf3BoMPjD+sY0Qk8kY9gQUpptnDN9dIdicnzQjdO0gGwSIl9eePQcbovFa0RETYfiDqE=; 20:XfvcdLZyhj+Ga8xpqQ1loNb802CNcEU4pTRiYZjg1ANr8CXI9JYIeMmVR2SbYb6tf5RkAHHDi0KS5+w74yO38RwgPMsc1+i+rIgfBmVk1CqRELApaoyWmpycQ9+D4SVUdl3UwMj1mhXcxuCDptWWp84T735mIa2U6bnqxgfOJtk= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2016 10:34:33.7529 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY1PR06MB0928 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 This patch fixes an issue that cannot work if R-Car Gen2/3 run on above 4GB physical memory environment to use a quirk XHCI_NO_64BIT_SUPPORT. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/host/xhci-plat.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 5c15e9b..474b5fa 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -39,12 +39,25 @@ static const struct xhci_driver_overrides xhci_plat_overrides __initconst = { static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci) { + struct usb_hcd *hcd = xhci_to_hcd(xhci); + /* * As of now platform drivers don't provide MSI support so we ensure * here that the generic code does not try to make a pci_dev from our * dev struct in order to setup MSI */ xhci->quirks |= XHCI_PLAT; + + /* + * On R-Car Gen2 and Gen3, the AC64 bit (bit 0) of HCCPARAMS1 is set + * to 1. However, these SoCs don't support 64-bit address memory + * pointers. So, this driver clears the AC64 bit of xhci->hcc_params + * to call dma_set_coherent_mask(dev, DMA_BIT_MASK(32)) in + * xhci_gen_setup(). + */ + if (xhci_plat_type_is(hcd, XHCI_PLAT_TYPE_RENESAS_RCAR_GEN2) || + xhci_plat_type_is(hcd, XHCI_PLAT_TYPE_RENESAS_RCAR_GEN3)) + xhci->quirks |= XHCI_NO_64BIT_SUPPORT; } /* called during probe() after chip reset completes */