From patchwork Fri Sep 20 08:00:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 829855 Delivered-To: patch@linaro.org Received: by 2002:adf:ebcc:0:b0:367:895a:4699 with SMTP id v12csp705017wrn; Fri, 20 Sep 2024 01:01:24 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXyWyLa8zpIX6wWKAEheidMyOxznS40SLFaJjxcoPWTL0osq0rJxapGOrm8CS6G6p2zmzviNA==@linaro.org X-Google-Smtp-Source: AGHT+IGgIZEPclUC4PUTPnAluQY00umeZYLxcFRNYn3wL91KIEwQ80IyiuUTyuhXF/KtO3zBsNPj X-Received: by 2002:a05:6602:641e:b0:82c:ef21:91de with SMTP id ca18e2360f4ac-83209eabbf5mr239099039f.14.1726819284396; Fri, 20 Sep 2024 01:01:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726819284; cv=none; d=google.com; s=arc-20240605; b=NQfAC4fLatpuQtMjKdGGrul67nH/yOEtE6acga34ImsE8YpmONaxS23yFc6XpPVADi 1WayDJ+PIMllkXu/46wKsshT5ZItJmonBfqjUd2p8rCQJjHUW5jeAtUT98V16kbR5Ail VMJVvRilrfgcaFc7MDwg5R5Fh7PReVmVdIfF4Sqt2q6VFZhJ2UlOvP+mnLHNCvvy4wMc o5jzvyPye4UcsQ8u2FyVais8RuY/rOLLUysXObPn1yozMW8wuIJwOc5eHVP8pYR6irbF iXEApY5SeevqGi1LmGiWzDKOCnarIGPs7rdbT5FobVi8Xecor/RJF5pG/GxxjGsdOs4q QYAQ== 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=ITsepdkflPSwXBnKePx11i3APLsx3e7/kiaw75Qv7/0=; fh=gr0fIF2feNJMh6u65BKXaaWOXqE/39PTRnPUkuKzQss=; b=jhLYFJX8Y1Yb6CXGO8ihT/daFD2PR4ce4Wk+hrqfYLVx07F50pWVfoi8k1CMib/oo0 k802G/38p0SfQU8H71okRS7gAWndR/bJb0C+wv0DBkDSO863d5J0Xa451F47jJXZDZEK OEJ33keFJFQq36f6fjQcCQERVg4MxlyRQZ4c0LfyjTjb7uXybpZkD2RtkllcpE2/t7yA u699b2JboaLVyB9vcyDOKNCdUo5u+MAbN053g2OoRJcVGUC1mmkHbGueF4NaG9gop0U8 JFyeDhRdtCs8wYAIL0BnnEWqyNolUnkysZV6Nn+YoG0acxtMKbEtBKm8qNyIorhET+JF EYyA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m+lskhUH; 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 8926c6da1cb9f-4d37ec0b11dsi6463178173.61.2024.09.20.01.01.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2024 01:01:24 -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=m+lskhUH; 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 B4218893E9; Fri, 20 Sep 2024 10:00:43 +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="m+lskhUH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C3E6089415; Fri, 20 Sep 2024 10:00:41 +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-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (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 C0502893E5 for ; Fri, 20 Sep 2024 10:00:38 +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-wr1-x434.google.com with SMTP id ffacd0b85a97d-374bd0da617so1149872f8f.3 for ; Fri, 20 Sep 2024 01:00:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726819238; x=1727424038; 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=ITsepdkflPSwXBnKePx11i3APLsx3e7/kiaw75Qv7/0=; b=m+lskhUHqvZXw6ILvNEEskoXxzQOWLa1oNJI7MzeQHMEBS0jvaIPA+WgYB9NXaStVO 6dD1kPqxwe8tShmdaDXZBfR0lOY0jQ/Ns6wvEt67sh04uLgfFIOLC0Ee7H9AI/t6twIJ JUZGiJE5R3N/iyqHi+gAkNb0eiS0VHBIkhctSf6vQSxrCo7QH3r7PMPJpt+jwMKosamK Rg8fxlcGzgWZAWZQTNFa4/FUMDPOip9rG7XNGQA9S/qXDNVxZmjnNTeu6IiuZRALbN5d Q18HEzGjH6MhEIrm0B5bJPFFYWHM0qNfcx9DzfY7gUUlvpazW8QrY1ufzu9OE8X7+XJU fHbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726819238; x=1727424038; 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=ITsepdkflPSwXBnKePx11i3APLsx3e7/kiaw75Qv7/0=; b=E85KGYsRvMshoD1iQk2+pU13D7tqkEJ83tuCCGuU15oasFYZL1EM8fgXFFQuUxyuFH GlU9wRnerx9+uZcazfExz1XExf5oNMizFuf/4D4BmxvQoHSCNgOiY1FFWe21TuKA2kRQ 0aNE144TjM8rPPX0hsExr3RlCPyUTTcPibVpelPTQTqkxCyoe9ZFNATpeDBXPXCNHpAX B0MNM9nb9plnbeE1GrwpvZ0x1g//LWz2hubwLr949347RDrm8/+LMpiimJmqZmdTLTtC K/Fgo8vT7ZqxSfXfejbG+T0EGhuuXiErX9EFY4AMdO/Q5Qcl07terUvDLO298u0UyEv7 6/2Q== X-Forwarded-Encrypted: i=1; AJvYcCVv0hodW0Gc0yifK3YAEk48Y++JNb3kNJUBkFryAzR0CQJrNrOBSLY/+BdVPiGBQspgncTHbAY=@lists.denx.de X-Gm-Message-State: AOJu0Yw8N2PHSSb6snfwxk0dE8Ts3hLfvSDsxdtexVtl2g/HZCysHXf2 0v2HIt/wwsPbSBA+Ruaq7xeLMzSARGWnKlASk2UV9O9BDqka06PcDXZIKTyOtNw= X-Received: by 2002:a05:6000:151:b0:374:b71f:72c0 with SMTP id ffacd0b85a97d-37a4227805bmr1122397f8f.21.1726819238151; Fri, 20 Sep 2024 01:00:38 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378e7800313sm17059497f8f.88.2024.09.20.01.00.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2024 01:00:37 -0700 (PDT) From: neil.armstrong@linaro.org Date: Fri, 20 Sep 2024 10:00:27 +0200 Subject: [PATCH v2 06/13] ufs: Add UFSHCD_QUIRK_HIBERN_FASTAUTO MIME-Version: 1.0 Message-Id: <20240920-topic-ufs-enhancements-v2-6-65ae61e73eaa@linaro.org> References: <20240920-topic-ufs-enhancements-v2-0-65ae61e73eaa@linaro.org> In-Reply-To: <20240920-topic-ufs-enhancements-v2-0-65ae61e73eaa@linaro.org> To: Tom Rini , Bhupesh Sharma , Neha Malcom Francis Cc: Michal Simek , Marek Vasut , bmeng.cn@gmail.com, u-boot@lists.denx.de, u-boot-qcom@groups.io, Neil Armstrong , Venkatesh Yadav Abbarapu X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=979; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=U5rWDVmk+KTojaFG4mSUB4p+9RPDWzL77dGyGCosTrE=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBm7SubcCG070qhp8vQGZTAAUTcEfUGJCtmpn2j7sTa Cez5C/GJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZu0rmwAKCRB33NvayMhJ0Xl7EA CtutMS+8cwbyPQsXuzXSHMM6CQyttMKtoEi2iFs8klNy417WyaT25bCVZjR8/TVPaIigD+0wFm1ARv HkcoI1y1MJLsoZ4IsrQ4JCQtwS9/MAuH0E0B39yXehHgPl1/9V5yEIy3sVnzMnKWk/4F0AeLEoOUHp lLF5RqbtcU3NfkFPH+gfoDXOYJJkTv6qYO1CTln4iZBxIZEtUjciMLh8hwqkrkv+5qUp9BPoqnfDjJ sLkQnJtaGy5x+we4rMip/DwFYD4cuf6p+M8G2n25lAiNWEaNvV8zaR7Npe2Otbgc2OH1yRMwUSmS6U iMdwKsQxx974dqfqA5lGOOQg3DX9OCVJxT+oeUnAPggjRU4EgJdxwmgAmz7MymO/MVl85S3MHNBlbF hlqX28lMZ9Ppf3M7gGLYHs2+gbLyUky/+EHyMEPsfCVdM+t6+ueFxysDl4qRVTSEPLwVcj2/QUb4mC TFg0JdOHt+ow9O8m6jc5yBFSKyY3uwxgPwyOSMmyKP0AoatatheWI5t/W+xD+6nUalGJ7/PFVI4kZw GIa4faLhzGe0eBMesaqptkEdWfOo1ZU8LChhKIIYap5nZ3uiRnrIG2ODkXqW/WU11fbRETfuRgXgpA WLF//MKq/ub6N2Zq6TzSsyc2uyTSJYEG9l1m8+CLjVWnOHkHFQrHXkldFFcw== 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 Tested-by: Venkatesh Yadav Abbarapu --- 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;