From patchwork Tue Sep 10 09:20:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "neil.armstrong@linaro.org" X-Patchwork-Id: 826949 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp206023wrc; Tue, 10 Sep 2024 02:21:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXBqGSJNmON36KlyJ1WzfGCKYEjBV57gFvGgjl85RJcpTd34+MzYaaGwW6HGN8BAQ8AxzKR9w==@linaro.org X-Google-Smtp-Source: AGHT+IFyAgwcj0fezN3xwz7Js0/0nfKnzLHzaGUqQFGfG3b1QtgRRyBglHtFDjJsHfpOe6qPe9Sc X-Received: by 2002:adf:f64f:0:b0:374:c977:363 with SMTP id ffacd0b85a97d-3789268f0a6mr5855834f8f.24.1725960103864; Tue, 10 Sep 2024 02:21:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725960103; cv=none; d=google.com; s=arc-20240605; b=GulywS4euV8+kmT5DfWEQ0CMCU1tT+n4VcFiV/Qpd6uPXlzv7GJwnUzjumLcMdYlyS jFZhZYbm/3un00xyWa/lruQp1h4wqdWrlEUsRYO9BgQyevk3WKWML+DYpwP2dRZtHToZ sJ43biEyhBOS06XYpdjdHFsDU90lHG+AjgNyliUEphuE/hdmDAFhxEYZZ6EYX7EHfuXy Sm4WMpHbIwRTzU7wRtqBATtY09AgIeGp1yuxLMf1E8MXN8z9mOxZbRnpqyYwNm41tbud kMS/weTynFwesOiquiDwfh5OYWsKtfwkeKIMsNeGM85HwB8YmAJePaAx1WGFRODhkj07 38SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=Gb0PkV2QOViT6B2gcnzaIs4IGKO1Z8HfdQrV/Um4OaQ=; fh=kIh60KTRoYgMeN0GPP2VRM9W8fD7JmlvFa8NR8V+zQc=; b=RKIhHVBtQwAAmEz1cK58NHrmIlOqmjS2l44QqpEk4yxp2vq4i/uFpvOLH950l4b37r cGXMRDl/R8vTCOSbhr64OpByDXo3822gC7d5SSuCqcnblC8n/+gHdWehuqFUzu/9LVS5 gGbWNDygIHBWhGxmgqVwKZgiWTVt8i2Vwy+8+ZWLiiQmnnFbkyUR8/3bZYKUDPwGYSzC JjGRWuh9ZH1Lq+tzyxM6icAVoRHhzic9ZOoqd229dsb4eTlAPc3rkmJbxqobLyqK1eMF OuRu3HDvZOFkTc7/NUfq3q/UuP5ANMf4uyr2Ko9j0aIi3PNorthvycx9gx1381p2adEw mm+g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vr8XgASi; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id ffacd0b85a97d-378956b825esi2959596f8f.511.2024.09.10.02.21.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 02:21:43 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vr8XgASi; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A5CBF88F88; Tue, 10 Sep 2024 11:20:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="vr8XgASi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7B55188F7D; Tue, 10 Sep 2024 11:20:40 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1673788F83 for ; Tue, 10 Sep 2024 11:20:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-42ca4e0299eso28522275e9.2 for ; Tue, 10 Sep 2024 02:20:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725960033; x=1726564833; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Gb0PkV2QOViT6B2gcnzaIs4IGKO1Z8HfdQrV/Um4OaQ=; b=vr8XgASiS1YdHCI7upoiCJRNFQxtpRfflCT82lNzS5dWeuDTdjBRB52Bs+m+kzrH1D gRr0XtmCy3B3E131vmv5s+McUPoBdvNvUtamSiPBEscLHyUhfjnWREHMuZP5bbn8spFH w4nbUa+Zoat3oraT833UyN86aQ9yLRMyCjyPzm4K0r/UzEwIgn8btFGxdoENKHk4qmBC gs1+y3XzbwcNvpYSlO1Yj2VqI4JaKPEhAsGGWPIt13B7zmP+L+kztck6An1HVHZ8UfLg Ukfk73HjuxvOJh7hKnFwlSmuZZtMeOkOmpDelOiss8knwla9c7ABDa7Eg5NsLu40iJHt 9hFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725960033; x=1726564833; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Gb0PkV2QOViT6B2gcnzaIs4IGKO1Z8HfdQrV/Um4OaQ=; b=meIHAUejUGkdUpT5XMKzB/c6VXXiv7DNmzkOhd5McA/OTtH3wTDatt5frMsKTwXBRR HzJT8LCA0zU2t6OK3ejDOH4MUlw/b7ki/18oJDOqDPD2OMYg50l1NKFPeFhhRA8ceVDu CFuzmeMBvl8FJFpWu/CBIMLEDgZh8TS+on6+EohvSBTU9WtRBmfrDxdopOznjcEWcRDf HuzZXwNWfr7gUNqw3PV6h9IOqj7T6HfFpBaZAEQfT8iml8xz1JO8Ll8rd5KAcrWAKm6L 1r4f6HEGiDI9A0FarWuxfb+DUqPMz6oRUPyl9C+KvecF2bOYfw6bAHldctOzHeu9DJxg xVFQ== X-Gm-Message-State: AOJu0YxGF17jNsZfTL1A9HSNVn9YpYcM+QE46FZi4ULZ5uR+eR1bkVql /tcP0IxrwIG630Hbdoz4FzbVk7zFtLpQ9VkHmmwOAbKmtp5IeAFwXDPo5A6JyG4= X-Received: by 2002:a05:600c:45cb:b0:428:1608:831e with SMTP id 5b1f17b1804b1-42cad76a0b5mr76602065e9.22.1725960032910; Tue, 10 Sep 2024 02:20:32 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42cb099acf6sm101256245e9.9.2024.09.10.02.20.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 02:20:32 -0700 (PDT) From: neil.armstrong@linaro.org Date: Tue, 10 Sep 2024 11:20:23 +0200 Subject: [PATCH 06/13] ufs: Add UFSHCD_QUIRK_HIBERN_FASTAUTO MIME-Version: 1.0 Message-Id: <20240910-topic-ufs-enhancements-v1-6-3ee0bffacc64@linaro.org> References: <20240910-topic-ufs-enhancements-v1-0-3ee0bffacc64@linaro.org> In-Reply-To: <20240910-topic-ufs-enhancements-v1-0-3ee0bffacc64@linaro.org> To: Tom Rini , Bhupesh Sharma , Neha Malcom Francis Cc: u-boot@lists.denx.de, u-boot-qcom@groups.io, Neil Armstrong , Marek Vasut X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=913; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=OW1BOfb9J2JCSQ+o+aNgKOU5e1Bne+zLUtmpxqp0jnI=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBm4A9YmaBGtI59t0o/zu7x5DkVJbiHlvvSjqTs7LPB SpvxACKJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZuAPWAAKCRB33NvayMhJ0f4UD/ 0ZnFx77ghxKxiOudBJKuknEQX07KTN7dsuPa6wIs+cIWOvmcDaTFUnjrvEWGxrfTOE1LajIyckBc9t khWNnAEMCj/rAR3WCXKAU+LE/YjRSk9cKKFGdAPNbWTh+h5N8gaCFfjhGRHgqQkbWGyuFsIix0rYmU wuIYyYp2H9M6rz0WYe0R9kpMb2rdSva3sCwvEd3dSv2iZwzmuaAEgpCp0rwzvpP4K8M9FU8iOrDhnD WJ0FTUkKISWnXrHax/8CQrZ66yvxi+T8lacj8B3v8HbLpfy3y70cYQuAk+sdqbIFAIdLaCyphhBAZD 3vT1jIdN/hhoPKgh3ncg5y7lyjD5gxdvklqsjIc4IJUk/UxsQntlbQG/+RDZXP9xQHle1WeeiWgC5q Wkqy3UHrqH+0BQ33pxAtimVJg0++18opp9k8EulIH4RLStF6axjucZ+JMMwH7gW2nP8Ecc4pzS8zpi YlCB1E8FUmURxgEeFSZGW2E2Q5cJwnDCAIaU81vnDyuagfGm7xt2SwBHLHiR2DuEtC8q4lM0Iv5BYV DWyNMPWNd3IszxjGg91ocfLNR3cMYKwO78USy48qTlv1VToIY1lHFdYH8orH53/BXgJikgOWssGTpL AtHfn5GAatHoAVu0IWwpgtoWtLO437KBzuWxWWX8YLNvrQMPa06X2hK1mQtg== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean From: Marek Vasut Add UFSHCD_QUIRK_HIBERN_FASTAUTO quirk for host controllers which supports auto-hibernate the capability but only FASTAUTO mode. Ported from Linux kernel commit 2f11bbc2c7f3 ("scsi: ufs: core: Add UFSHCD_QUIRK_HIBERN_FASTAUTO") Signed-off-by: Marek Vasut --- drivers/ufs/ufs.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/ufs/ufs.h b/drivers/ufs/ufs.h index c92f47d82b5..b55c4a9e996 100644 --- a/drivers/ufs/ufs.h +++ b/drivers/ufs/ufs.h @@ -738,6 +738,12 @@ struct ufs_hba { */ #define UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS 0x2 +/* + * This quirk needs to be enabled if the host controller has + * auto-hibernate capability but it's FASTAUTO only. + */ +#define UFSHCD_QUIRK_HIBERN_FASTAUTO 0x4 + /* Virtual memory reference */ struct utp_transfer_cmd_desc *ucdl; struct utp_transfer_req_desc *utrdl;