Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp689419lqb; Fri, 15 Mar 2024 03:55:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWdBNnuyyXAe+/7mT/BmcTripcDSxQ77cOki0QT1QwC1mIKDV8KJtuna2sFtHdlfMridOAfCPp/ildkG9Uq/jxhIGsw9rWqGoMwnKibKw== X-Google-Smtp-Source: AGHT+IHI3p2R14qtKRpEu3VTh7oleK2i2v04ri+njwUguTM497+usBKDM0BUxr0VzQVbGOg3USZH X-Received: by 2002:a05:6808:318a:b0:3c2:4efe:465d with SMTP id cd10-20020a056808318a00b003c24efe465dmr5830687oib.8.1710500156370; Fri, 15 Mar 2024 03:55:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710500156; cv=pass; d=google.com; s=arc-20160816; b=OVcjyl/B/5eggnSQ4VOMEeYLpLVeG/U9dzemSTpnbKF9S/HR/cH2AL5efSIU0zbA+i XFf1J2GUKsse7Tluai5wNB7B7fAIOtjuke2u9u5z3ii9JAKKUwP4nR5GIzC4+LkrRYKL rCz99Yd3CE7SoEEKa+wwxtv3CizZVJWDPdNXKnjueKnrN2umPnOdc8HO3n7u7VhmYum+ HTrRFJP4GFpHEq0wr4HXyGo2W1bCm8whKX0QrzFMOd+NgRp4LRGq2oliT27yLFlNavme AxiMJGYEy2wU3QbEwiIW7CiD09CtklGpRxPE/59qJb3vUQ2mAYh647sdS6jrHNRd47q9 OI3A== 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=aYCVB7vuASjmLwIHPiyxNRZapV4SHyBblFxELE1dC1U=; fh=r3GcZfMFJbkajTncl+n2pBCd5bH4b+GrOFWJuwflnEM=; b=yYPNLn3DjW0ORHhccDNkOp8gPbjDNAO9llo2YuzvH+FrgSI01ZvoyWS7Z7r2+U3qZF lsEz8g9OTixnH9oMzWnV199V1vS6vOZV9hx/yZXuoTjLA+r1gk6G0XStZ4XzMh+LtWiN 6CfL/lCkSZcht2KmDPkT0kHioKJiu2K+V+LRXXyvORfbouVcNny17SM061uXTwfSDzbb VhQExxYbcaL4e33IgWgKbTDxnf/oXt5HOem3kb75RZXJsJ6DxLvExkJpZjkA7p9R1prI vhOTVsTBKay162fBLrrMC3blX5j5LBjVCJ45T645TEFl3M53lsNpA18tQFINxwMl5Vh4 PdCA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=chSEqUNx; 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-104292-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104292-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id ks11-20020a056a004b8b00b006e6c326d794si3246730pfb.6.2024.03.15.03.55.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 03:55:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-104292-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=chSEqUNx; 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-104292-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104292-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 026C0283A2D for ; Fri, 15 Mar 2024 10:55:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 49357199BA; Fri, 15 Mar 2024 10:55:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="chSEqUNx" Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) (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 B69E11BC2C for ; Fri, 15 Mar 2024 10:55:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710500148; cv=none; b=krVofW7M+nmQgWX7Rec5rRvXks+eSw/d9NnAH8pzAQ3SvLN9u1Gd8HfOOh/v6rnMfJnu5e1xcEoj1uIkyHZSF2tHKQrslFdyC+pOGJ1Nf1OfotXA/Z7lW4FzUpAhi7mpfTN5WuWLziRfz4v04i7T3qhevbVwFTbsLnBDK13FvPQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710500148; c=relaxed/simple; bh=gKHklsfF2gox13da7B8q8n6TDTbEdarDO5cbu28yMxc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=vDW2Y/T9O2R15GyDszi7VAHF95E82zzf4cxSkv1Hb8l6Zj4WZrd8Y9FBN2HGrl6tMY5SKbyWA0DXRTuGX3oY2TYCPEilxubUS7Ttc8wzWTOFuZ08ex5wZ3LHG2hB+T9i4t9KWAp7ve8+9OteBH3MTowOz/0WVSDAt0G7/LcNBTY= 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=chSEqUNx; arc=none smtp.client-ip=209.85.128.173 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-yw1-f173.google.com with SMTP id 00721157ae682-60a3c48e70fso21247167b3.1 for ; Fri, 15 Mar 2024 03:55:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710500146; x=1711104946; 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=aYCVB7vuASjmLwIHPiyxNRZapV4SHyBblFxELE1dC1U=; b=chSEqUNxoaFiGa5ivgsGoFfAX9NRw9sBPQlCwTGbp86pz8IhQGbYQzvWlTW2I/z516 McMxoFVxHbE4TW5b3+k/9di3rOte1D3Hp+ocXMWRmTjYfgkfKG+WbqaE0Q/QbRQt4OIc ECsPWWSHYBccfVfruIMTJsSjaeBZxNldtNbobKE6g0PDNzLWwAfjvS5EjuZArb+NpRdH duMYCx1q0yRHMfqO3Sm3AYjesOW5sd4GI6q+ivaxiuio+lH0qwAZZVRYIbgu7oKXo1PJ 0cvwj+aTY1f4x7AqpMuFJi6dgnzPstUygqXug/v5iKnbnGhXP8t7jYcryf5Wiob4DeMG wiYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710500146; x=1711104946; 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=aYCVB7vuASjmLwIHPiyxNRZapV4SHyBblFxELE1dC1U=; b=dmpdAh8KrthzewtBKvG7RZAFrjWyyZOCqa2qk59HYXVau/o5kkLr7Dc7SmwJ6uR1nR mkHJS+gk1P15ncu85Gl0wG4XmH5xKUH3PxRivHXoHecArHM7ODxoVKo83Foqpi9jIFdx lgWwU/Q+ElJlM/0ECmYVhwrgUSnC4QjS7yg8u+y9h0BzhaU9L+prW4ZGaF7tKGk5ugX0 +irmlFJ61lP1pETxPyYOOJISpwdQSfsgp/42aVb/UaCMoZOHP2S8xtiT2c27joNSOUGU M5NTjlKs+nXz5w70f6pMS+T2r0GFVi6Pbq8tu1fBDY3CGN01+66cgUhFkFMpwT0X8Jgd bNmw== X-Gm-Message-State: AOJu0YxNmFf3oROr3UM/EuMSQNDClyt1OxdREPEvr4G1B6IoN83jePWX oMQI0PHqY/7AqNeFOW7ZRV19SpLh2EBXJs4CMMRa/JKMzKQ+mk2k15bXLti4nlFsBDHDzAg2Ytj yjt0/5KAzFaLeVRbLmzl4sJlHIyzLW3Ou6NrARA== X-Received: by 2002:a25:2e47:0:b0:dcc:4cdc:e98e with SMTP id b7-20020a252e47000000b00dcc4cdce98emr4286555ybn.5.1710500145700; Fri, 15 Mar 2024 03:55:45 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240314141440.3305802-1-serghox@gmail.com> In-Reply-To: <20240314141440.3305802-1-serghox@gmail.com> From: Ulf Hansson Date: Fri, 15 Mar 2024 11:55:09 +0100 Message-ID: Subject: Re: [PATCH v6 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 Content-Type: text/plain; charset="UTF-8" On Thu, 14 Mar 2024 at 15:14, 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. > We have just updated the bouncing addresses in MAINTAINERS for Asutosh Das and Ritesh Harjani, that also helps maintain cqhci. Would you mind re-submitting to allow them to have a look at this too? Asutosh Das Ritesh Harjani Kind regards Uffe > > 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. > > > 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 | 188 +++++++++++++++++++++++++++- > 4 files changed, 199 insertions(+), 5 deletions(-) > > -- > 2.30.2 >