Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp302785lqp; Mon, 10 Jun 2024 04:58:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVNsL7Xs/9jiN0r2YidyOmpo8qci+uLu47DLwcPFsZzKw2MVjvdeebZlYxd3eDazF2VVMkcXVx8QZDqj4W3DI5ZIO7L0XXYDoIyWggE0Q== X-Google-Smtp-Source: AGHT+IHm9THqhvB4w/Pc6DkpK+XKh1JbOY7oToqPPC9NZaP8OH09wD89yC8T0axBGE/0OLCbUNU9 X-Received: by 2002:a17:90a:950d:b0:2c0:36ac:a406 with SMTP id 98e67ed59e1d1-2c2bcc0baaamr8385325a91.27.1718020707345; Mon, 10 Jun 2024 04:58:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718020707; cv=pass; d=google.com; s=arc-20160816; b=S75cZQp0y/Y5R8H0QD8OaxwJlCHifyR1vspj/SXgmEBLWtGOx9NcY8NOeup0L6A7Cg uLJZuuj2Pmj1l/LsHTW9WTrlMJ4x4HHudoQkF2fxfFzLNrqar64ChZtQ+eUM/r0QbRkc W60pFlFKfjVRRVSvNeW9VIKt8XQcj5e+CbpZTe/4c8V8/cqlFQYlzdNL5L0ejBdeycVa DMA6I6+auMH4Ia+WnAuNknUpJnyCdQRwq7N/llfpYRBu/4DxnnD3uRGWTJMSy/pbgFtJ MQcsnnFFp+JoEqlz/USU8AxTZJifMNpXN/G08H6dbtHXgkhKtvhW8/wRNu2Ls/hPUMYq wK6A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:references :dlp-filter:cms-type:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=CYNsfsElRoaTG9v3KypueJ6qSMPhqLeAdpy+lkpm4r0=; fh=cW6h/k464pGBgZ2dtI2RmeWjs9UiNKyysxpqVafj99o=; b=BLHQpvw+vsnEyWeTjWaEpiIUsbfMOmqgz53rHzPVJM8/T4bQ+3qqGo9tOWsGeEBjVH wFGBSMIH+pAGd8RkU9o+eBhxbdgpwu5W4BUakj8qxDtkjixduitA3E+jKxAZC5+MB6p/ MFcFb9kLPZHNsykBgXSzbjxKROycAZHoy0hUcu2ngxX+rEJXqmGpVjINUkAGo1kN3j2z vLb7Gb2ZhGCjdxUsZHrSoqWGl4k4ZAcTMOb8GLVmREUKY0yCT5vcN3fa4jAf0cxl2OJr 9nrDibi13cVQgGb2uSURPvzgW/bHB9ghlpfAKYlZKXMrvIsF9aUC5MLYm/hNTtXp+GtT 4U8g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=t55c8XQt; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-208090-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208090-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e7d7a4eaf3si4093050a12.275.2024.06.10.04.58.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 04:58:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208090-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=t55c8XQt; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-208090-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208090-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 3C24CB25247 for ; Mon, 10 Jun 2024 11:40:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7386780C0A; Mon, 10 Jun 2024 11:39:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="t55c8XQt" Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F5D17EF09 for ; Mon, 10 Jun 2024 11:38:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.25 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718019540; cv=none; b=NEl4IwlFnkk78FtGVUrqpAq0dtW8puyho/UifZL/9nqttNwyhhfLqEkBbgeR5tbSwNVdwTN4ZtdFbtTPs8BuoWWTrmwzYUTVYzNxcyqHXYuq4DmFppOJQnvOr4uHir1bmt2qOBrFYbsJtuL0V6/3Ytco83U214OT9+NfNGozp9k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718019540; c=relaxed/simple; bh=4g0jh8mVTXXIWWd6K8v/g22BWViRX2KKtDtoBlE5OWo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:Content-Type: References; b=bxORjaa7pWDqPTw00jH3G2wSOygFSa6uxLbTk2I5eV7yW0DKw8/vGVfn8sO99zo+dFN4jvFZSZbGAzZDtpTvU6XfSgn7mEIqT0Rr/CaZHnUr4pncd86EKt9cnvVw6soRSYzG0bCCTwtZVIpYmQSV8WgyvxOnpiJ4sYBn+94Eg3g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=t55c8XQt; arc=none smtp.client-ip=203.254.224.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20240610113850epoutp023127d4f45ad13d102fc7931b846c69af~XoakMCuHC0095700957epoutp02u for ; Mon, 10 Jun 2024 11:38:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20240610113850epoutp023127d4f45ad13d102fc7931b846c69af~XoakMCuHC0095700957epoutp02u DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1718019530; bh=CYNsfsElRoaTG9v3KypueJ6qSMPhqLeAdpy+lkpm4r0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t55c8XQtKtc9f09itfza3EDkv6W7X6wMTdP9vT6ovF24m75lblYCRfWl/JZLMgKhY 6ZiQLPcp2KAWHhoZUWYQMitMIRNrOmYeJg2XkkzinbSbVZThOue7ge3NwAXI+B0rDh q7DL3qj1LxRFrzAZk3chOgIJNHKUZhgu9MOzofxQ= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20240610113849epcas2p388dc65dc0f10e659b47a897794f7946b~Xoaj3mQwl2563025630epcas2p3g; Mon, 10 Jun 2024 11:38:49 +0000 (GMT) Received: from epsmges2p2.samsung.com (unknown [182.195.36.89]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4VyVF52xsYz4x9Pv; Mon, 10 Jun 2024 11:38:49 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id C2.F3.09485.9C5E6666; Mon, 10 Jun 2024 20:38:49 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20240610113848epcas2p3742cffc295e0ebb35713a761c06e1c47~Xoai0nwFN2563025630epcas2p3f; Mon, 10 Jun 2024 11:38:48 +0000 (GMT) Received: from epsmgmcp1.samsung.com (unknown [182.195.42.82]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240610113848epsmtrp18a605a9b73dccedda64478d9dbc69a99~Xoai0CNZ92145221452epsmtrp1c; Mon, 10 Jun 2024 11:38:48 +0000 (GMT) X-AuditID: b6c32a46-19bfa7000000250d-56-6666e5c96fff Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmcp1.samsung.com (Symantec Messaging Gateway) with SMTP id BF.57.18846.8C5E6666; Mon, 10 Jun 2024 20:38:48 +0900 (KST) Received: from ubuntu.dsn.sec.samsung.com (unknown [10.229.95.128]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240610113848epsmtip2812169bd042b5df7bfa52ac1001c6990~Xoain6lk21349813498epsmtip2d; Mon, 10 Jun 2024 11:38:48 +0000 (GMT) From: Daehwan Jung To: Greg Kroah-Hartman , Thinh Nguyen , Mathias Nyman Cc: linux-usb@vger.kernel.org (open list:USB SUBSYSTEM), linux-kernel@vger.kernel.org (open list), h10.kim@samsung.com, Daehwan Jung Subject: [PATCH v3 1/3] usb: dwc3: Support quirk for writing high-low order Date: Mon, 10 Jun 2024 20:39:11 +0900 Message-Id: <1718019553-111939-2-git-send-email-dh10.jung@samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1718019553-111939-1-git-send-email-dh10.jung@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJKsWRmVeSWpSXmKPExsWy7bCmue7Jp2lpBhcbhC3uLJjGZNG8eD2b xd/bF1ktLu+aw2axaFkrs0XzpimsFqsWHGB3YPdYvOclk8f+uWvYPfq2rGL02LL/M6PH501y AaxR2TYZqYkpqUUKqXnJ+SmZeem2St7B8c7xpmYGhrqGlhbmSgp5ibmptkouPgG6bpk5QGco KZQl5pQChQISi4uV9O1sivJLS1IVMvKLS2yVUgtScgrMC/SKE3OLS/PS9fJSS6wMDQyMTIEK E7IzGn4pFNzgqeg8MIuxgfEwVxcjJ4eEgInEnitXWUBsIYEdjBKv2zS7GLmA7E+MEstamhkh EkDO9m2aMA075h9mhyjaySix7ms3lPODUWLjlQXMXYwcHGwCWhLfFzKCxEUEOhgljj4/zQbi MAssYJR4cHIRI0iRsIC3xOLLViBTWQRUJRYencwKEuYVcJPYv0oMYpmcxM1zncwgNqeAu8TL +X9ZQMZICBxjl1i8rZ8RoshFYv+388wQtrDEq+Nb2CFsKYmX/W1QdrHErefPmCGaWxglVrxq gWowlpj1rB3sHmYBTYn1u/RBTAkBZYkjt8ChwizAJ9Fx+C87RJhXoqNNCKJRWWL65QmsELak xMHX56AGekj09nWxQoJkFqPExHN3GScwys1CWLCAkXEVo1hqQXFuemqxUYERPLqS83M3MYLT mJbbDsYpbz/oHWJk4mA8xCjBwawkwiuUkZwmxJuSWFmVWpQfX1Sak1p8iNEUGHYTmaVEk/OB iTSvJN7QxNLAxMzM0NzI1MBcSZz3XuvcFCGB9MSS1OzU1ILUIpg+Jg5OqQamwrX/RPatYpwZ Ev7huuyapY81AkuK8/tvOyju3/vEIjrs2s0p9W57Zc0rXgZV/1dKXLG91iEm5b7VpvDj7fK9 zB/KZs5Zc7zRNOvRDnGBLYX/OX99TT7wrclJz7Jotq+WVOMMofWclxS7tL+tnf9cXy5s/cKV K44cd7v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kO2xLNWhYd0DVZLrpsgWX+ob/GO iFOf58rkm6xRK/5YpsRSnJFoqMVcVJwIANFQsLqjAgAA X-CMS-MailID: 20240610113848epcas2p3742cffc295e0ebb35713a761c06e1c47 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240610113848epcas2p3742cffc295e0ebb35713a761c06e1c47 References: <1718019553-111939-1-git-send-email-dh10.jung@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: There's the limitation of Synopsys dwc3 controller with ERST programming in supporting separate ERSTBA_HI and ERSTBA_LO programming. It's supported when the ERSTBA is programmed ERSTBA_HI before ERSTBA_LO. But, writing operations in xHCI is done low-high order following xHCI spec. xHCI specification 5.1 "Register Conventions" states that 64 bit registers should be written in low-high order. Synopsys dwc3 needs workaround for high-low order. That's why adding new quirk is needed to support this. Signed-off-by: Daehwan Jung --- v1 -> v2: - this patch is added newly in the patchset - add a property in dwc3 structure v2 -> v3: - add change note - add description in commit message - remove the property in dwc3 structure to pass it unconditionally --- drivers/usb/dwc3/host.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index a171b27..e0533ce 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -126,7 +126,7 @@ static int dwc3_host_get_irq(struct dwc3 *dwc) int dwc3_host_init(struct dwc3 *dwc) { - struct property_entry props[5]; + struct property_entry props[6]; struct platform_device *xhci; int ret, irq; int prop_idx = 0; @@ -162,6 +162,8 @@ int dwc3_host_init(struct dwc3 *dwc) props[prop_idx++] = PROPERTY_ENTRY_BOOL("xhci-sg-trb-cache-size-quirk"); + props[prop_idx++] = PROPERTY_ENTRY_BOOL("write-64-hi-lo-quirk"); + if (dwc->usb3_lpm_capable) props[prop_idx++] = PROPERTY_ENTRY_BOOL("usb3-lpm-capable"); -- 2.7.4