Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2784147lqp; Mon, 25 Mar 2024 09:07:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWOmRBWWCGWxbeyjakk0pgdSsHuCLC78sE9F6NDny+e/weGaNhZaaMg3jjf9flbuMhPZHKIjZY10xbkVLsU5H+waVaNutRu9ChMqHOc7w== X-Google-Smtp-Source: AGHT+IEbpNqts9SSVFyCZ+wRDa8ItPBssWD24mq/wng4q4zORhYA13K5g+1UX1PUg9msToZaaimZ X-Received: by 2002:a50:f608:0:b0:56b:d1e6:efbf with SMTP id c8-20020a50f608000000b0056bd1e6efbfmr4577293edn.20.1711382837108; Mon, 25 Mar 2024 09:07:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711382837; cv=pass; d=google.com; s=arc-20160816; b=b2KjQ1Xhzpk2WFhpXykJKn2wzMLdjxajvgFx/5FmeTNubYpnW2SgkgzdzR4UJX+ddo xeWE1Bw1rqg5nah7meUOL0x3XYdxh5XByTpZsSJRmfzKLxklnjF2afznU2Vxe9MwzAb4 RjjzUzyfh5nWZy/ql7esU2uvrC0/xJOBFfQdGLoIRkaUL+QZfxG8hEDtT4+6yj4IlAu+ LcLIhaHbQK7Nx/mJrejyRi0y5lpE/1+zIiQh2+WY6KBwaPUZWVMFkXaDai5xqJZjrYTs LrbuCIFzs/HMQhd6Ib89k4P8wJwcoDvNMbCMXfBFgQfp1wnnWEBbaikXDs2vT3bOvy/t aVbQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=an1XrIb9VvljrFF0I+tmW7F3KNLXCqH0DCXayAqvq4U=; fh=PGFU4JgLGHrexRrQGGc1pDlQm9msALYaHin3G8mG8I4=; b=dF/qVKXSvqi/0hydXwcfBFKa+F4UveR34zTVPrql+1xICc+N4pjl0gqHKJSG6SqyQJ 3eNlfpCo9A7tz0x53Vmd7iZwYXMbcOEfoqbUdIE6nselG1W0MQUpBTCnSk8Gd8cx5LAu t/JpMA9/782H4gUBIwAc+fZHjbzaaJjdXbtekdvyWBIAzakW9YUPL7r4biBkEoO0Nl2i ESLnGa6WUFeum0llEHBb3LwvhRla4KdVJ6lM1RzverxZS60CtecCxJl1RZEuVxgzbnkt xQUIcmxA8hnE3AwjIvH3zucUEsiUSQV/YG9/I0QDmLB0pR5Vn/xBOZUVkYURrIQnUEXG 9SIA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bQyCNJ30; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-117135-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117135-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h13-20020a50cdcd000000b00568c5cd4f45si2640649edj.625.2024.03.25.09.07.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 09:07:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117135-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bQyCNJ30; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-117135-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117135-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 332E11F67CA1 for ; Mon, 25 Mar 2024 15:53:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 30AEF174947; Mon, 25 Mar 2024 13:19:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="bQyCNJ30" Received: from mail-yb1-f171.google.com (mail-yb1-f171.google.com [209.85.219.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 93F571741F8 for ; Mon, 25 Mar 2024 13:19:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711372788; cv=none; b=FUMpzdxLoWQc1E8+SiXQEqL/DfZT6eSEq+S/CAMwlZFSJwG2ql9brPEUsGcB3ZGwJX7qKQ0di6P5gjcRyZhS4Jf89BGdONl5V+4bJkYRLVoF5B0cqIMChdVWKGquzJUdoyR7/5tqp3hBPBZ3/Tta6FvqZj2krOWGfSLGdqovB3I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711372788; c=relaxed/simple; bh=i/F7ZUQC2WibdKQHGCsevnCdGMSfUeGxIYrzHXFi104=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=bO1S18amo2vapF/WtGzlfpcrx/L5ao+lTtCSNnhfgjv6nArXPTmdczNCapwbZxwY3gfibuhrAZcSGm8XLKYaodP6aTijvuZWQIVFvCVi6gtaNIt8tjrOIWwn4sTRge3ZVyL+15b9OqfpxEH5dqGUyC31KAlH5heP7VRQ0zLYRA4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=bQyCNJ30; arc=none smtp.client-ip=209.85.219.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f171.google.com with SMTP id 3f1490d57ef6-dc236729a2bso4128044276.0 for ; Mon, 25 Mar 2024 06:19:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711372785; x=1711977585; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=an1XrIb9VvljrFF0I+tmW7F3KNLXCqH0DCXayAqvq4U=; b=bQyCNJ30DbOcHRPpFOr9+TM6deHbOpyirsnMnTG8zx8g2SzQo+LNiczsFp9PCWL54F yRifp/qlG0XULwkWiLeO8FCNxwpkAyJ6dYxJWmPENqPp4poM9rYzF3Mxhp43XnU5ULkY tjjyjh3nBE2wxvYDoaoBaUYAeOvSZQOusoAjXkVRUfm1QSN/VanxtOb+2vR0KDgiNA/9 LctGeVPCyP8Q6vLFlBGsJPcz15sAZSNhogHJqUl7+FrKI6/QuI5Ol/0f5IQX1UwHTEDx 7ZY6o4+96CdHvop62icyxMVPNvXvqtg7e9aSdBk6EY5xERrvyqYLiCiaqFDmdRbLoo3z OdBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711372785; x=1711977585; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=an1XrIb9VvljrFF0I+tmW7F3KNLXCqH0DCXayAqvq4U=; b=K1pOkjPURmWgYyAOVlQRZV3k77syvJNqN43jaGM/N3/FyJox065RZm5H3qg3it9osG 62ZZtzbxsjILxt3HTdKq68bh8KfwAnW4YEPH4iI2nlZ4M3SdN3X2JXflpTEvRmGJ6r50 rto/X4y5NKh/1NLEVpS+S4pJ4VJ520oh9Yc53j3fkHsBRb4dHSwgDRVCbswD4vkZQxFk vHp4UsCd0mQHpGdyGnnYcuvvMMr45LcbM8ZBs3c7ueYAY1p4+4XgHUuUmhmji4REq4jM JKBuPTOg2l5H0E1/hVLBv+OJOwtUQWPWNpvcAcrKQyyIShafVWcDjJbDTCChAClIoWU3 aFkg== X-Gm-Message-State: AOJu0YxF4i5f7eAY+RJ3ixoGICJ+lc+cieT6oX81XPNBe9rOFo354deo I5ViBlUN0C8HgESu1kGk/2RTSz95VfvEOmywQeQLwdiq7RmLDGPzMbxlIGnv9J7nSzh/RrwVgTT INa4xeLmYixj4Zd+XJaWuYIb+qZcG6LADllxvGQ== X-Received: by 2002:a25:2d11:0:b0:dc6:cd76:5ddf with SMTP id t17-20020a252d11000000b00dc6cd765ddfmr5281307ybt.39.1711372785586; Mon, 25 Mar 2024 06:19:45 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240319115932.4108904-1-serghox@gmail.com> In-Reply-To: <20240319115932.4108904-1-serghox@gmail.com> From: Ulf Hansson Date: Mon, 25 Mar 2024 14:19:10 +0100 Message-ID: Subject: Re: [PATCH v7 0/2] mmc: sdhci-of-dwcmshc: Add CQE support To: Sergey Khimich Cc: linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, Adrian Hunter , Shawn Lin , Jyan Chou , Asutosh Das , Ritesh Harjani Content-Type: text/plain; charset="UTF-8" On Tue, 19 Mar 2024 at 12:59, Sergey Khimich wrote: > > Hello! > > This is implementation of SDHCI CQE support for sdhci-of-dwcmshc driver. > For enabling CQE support just set 'supports-cqe' in your DevTree file > for appropriate mmc node. > > Also, while implementing CQE support for the driver, I faced with a problem > which I will describe below. > According to the IP block documentation CQE works only with "AMDA-2 only" > mode which is activated only with v4 mode enabled. I see in dwcmshc_probe() > function that v4 mode gets enabled only for 'sdhci_dwcmshc_bf3_pdata' > platform data. > > So my question is: is it correct to enable v4 mode for all platform data > if 'SDHCI_CAN_64BIT_V4' bit is set in hw? > > Because I`m afraid that enabling v4 mode for some platforms could break > them down. On the other hand, if host controller says that it can do v4 > (caps & SDHCI_CAN_64BIT_V4), lets do v4 or disable it manualy by some > quirk. Anyway - RFC. > > > v2: > - Added dwcmshc specific cqe_disable hook to prevent losing > in-flight cmd when an ioctl is issued and cqe_disable is called; > > - Added processing 128Mb boundary for the host memory data buffer size > and the data buffer. For implementing this processing an extra > callback is added to the struct 'sdhci_ops'. > > - Fixed typo. > > v3: > - Fix warning reported by kernel test robot: > | Reported-by: kernel test robot > | Closes: https://lore.kernel.org/oe-kbuild-all/202309270807.VoVn81m6-lkp@intel.com/ > | Closes: https://lore.kernel.org/oe-kbuild-all/202309300806.dcR19kcE-lkp@intel.com/ > > v4: > - Data reset moved to custom driver tuning hook. > - Removed unnecessary dwcmshc_sdhci_cqe_disable() func > - Removed unnecessary dwcmshc_cqhci_set_tran_desc. Export and use > cqhci_set_tran_desc() instead. > - Provide a hook for cqhci_set_tran_desc() instead of cqhci_prep_tran_desc(). > - Fix typo: int_clok_disable --> int_clock_disable > > v5: > - Fix warning reported by kernel test robot: > | Reported-by: kernel test robot > | Closes: https://lore.kernel.org/oe-kbuild-all/202312301130.itEZhhI5-lkp@intel.com/ > > v6: > - Rebase to master branch > - Fix typo; > - Fix double blank line; > - Add cqhci_suspend() and cqhci_resume() functions > to support mmc suspend-to-ram (s2r); > - Move reading DWCMSHC_P_VENDOR_AREA2 register under "supports-cqe" > condition as not all IPs have that register; > - Remove sdhci V4 mode from the list of prerequisites to init cqhci. > > v7: > - Add disabling MMC_CAP2_CQE and MMC_CAP2_CQE_DCMD caps > in case of CQE init fails to prevent problems in suspend/resume > functions. > > Sergey Khimich (2): > mmc: cqhci: Add cqhci set_tran_desc() callback > mmc: sdhci-of-dwcmshc: Implement SDHCI CQE support > > drivers/mmc/host/Kconfig | 1 + > drivers/mmc/host/cqhci-core.c | 11 +- > drivers/mmc/host/cqhci.h | 4 + > drivers/mmc/host/sdhci-of-dwcmshc.c | 191 +++++++++++++++++++++++++++- > 4 files changed, 202 insertions(+), 5 deletions(-) > Applied for next and by fixing a minor conflict when applying, thanks! Kind regards Uffe