Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1376349rdb; Mon, 2 Oct 2023 07:48:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHoDTyGMyHvFlg72ISAOmdX7+IL2qMHVOvDKbNfcVQVJXx+CWkjt1nKd2NTr5Z4pvNtzAk4 X-Received: by 2002:a05:6a00:2490:b0:690:c79c:cc9c with SMTP id c16-20020a056a00249000b00690c79ccc9cmr14161538pfv.14.1696258121549; Mon, 02 Oct 2023 07:48:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696258121; cv=none; d=google.com; s=arc-20160816; b=Mgkyqq2+Lw2tpnpvwAPa4W75kPIpyEI11CrKzyCJmO/MJtEdNAZYvZXrBUyilJbYuX S8Qh+olOo5SY5evld/FN71bU8At6fWJFIa8D1JWA9AWh9DkZonglZT9Xj/QgEzbWoRFn aIAUpIG0Lj+iBK9CfaDQk/VpFFXWBTqes4w3B4Ho7WSizbr7w6tGbgW7uff6UhJeY8kr rGgNK0pvg6tlp7m71zs0235vHU42DuUv5L0b8ZJJ0Pvnqqos0waPz5AfHWj8Lg3p7AF4 c1sw6xCkJX5z7DDgEZxGx94bkgcXJTbXe81s2j9oAN0GNw3qhxKwMPgYyOze9HlTyrFA U5xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=veDUF5kAmIGjrBTZorjxEHNQVjHCsWyYzBTuHCrDAMk=; fh=ZioSMBeFj2aGi8xYHSVdv3ckCOq7EziDdlJhiOzz7bk=; b=J53/E5kUnCWaxgK5uPBM9PLJ2kO35bbyI9qp5c+ipJBMiFuh9gjBalsrHHgWW+jRU0 /lg+tAc2g3dPB+8h/CoWZhTddi2RiHciRNhmTT1BfbkOHdH7mXNAtLtsFnn0BAYWLc7w 24WZTeZI09SUpqA+a097nNDfCq8Ry9ay4nf1GabIvRNjWtfg4selGuxMIMSVxCrdYMaJ molHh747oZhfn4Tc3hBD/jaRuCOBdY+bX7TpJBNjNGOFWH7veLWlTABWOS1PAqcrkrxc RhEoROiFR7ZRDLGlJsiy0X3U5zxtXfnVmrCR2u/5tAYXEn2xtsH7uBUNV1kBS902fc5m 7Z5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Z+rezgSQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id u5-20020a656705000000b00566016fc08csi26308985pgf.83.2023.10.02.07.48.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 07:48:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Z+rezgSQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id F3E61804A483; Mon, 2 Oct 2023 04:33:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236664AbjJBLdK (ORCPT + 99 others); Mon, 2 Oct 2023 07:33:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230427AbjJBLdK (ORCPT ); Mon, 2 Oct 2023 07:33:10 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 968B4D3; Mon, 2 Oct 2023 04:33:07 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-503065c4b25so25092547e87.1; Mon, 02 Oct 2023 04:33:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696246385; x=1696851185; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=veDUF5kAmIGjrBTZorjxEHNQVjHCsWyYzBTuHCrDAMk=; b=Z+rezgSQXl7Egy9yu76MSH66agpP56rt4FCR65yDa/AavimaRusYEouXI1seJ82/0N bZSsFADB0GDA63oToZbg0y9AfMHCfI8fyj9hSrcwWwNmJIFV3lGSPcPfDB/ITYtYmL5z HdcqpssfqctNCH0vwJKDQtQlG9OnnzgLX87myR0xcGuOVbXvbhSSyGr7V3pIRaF8rR4K oBn+ywqVR/kSzEJ5e2qzGiuk2dYRDprP9+8VsDmV0qpn3bB11xCTzUb/dMIlsrEiUH5S M36azy3QY9FENd/Yu80Zeop+9OaQqOBmS2t+GOemNU4J4REmcQQOPAn4ZlL4uWu+MJGd DpVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696246385; x=1696851185; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=veDUF5kAmIGjrBTZorjxEHNQVjHCsWyYzBTuHCrDAMk=; b=AhTxFe5W5gzrFS3kA3SQ6bVgZ0I5rkq/+VSlnOkMXCHZU5YDZIddVXRKkhc2GWt+3A RDk8X77kefDe9woTYJJ2juT21w61UKqUeKiQgkFI6/v3K5XznnDfwbaA1eNJC6TdA0hc mBDMa8KVCuZtMlaZtYO+Kp4JStDCbsxSSoCj4Po/JR2Tb03v6JzLhBbxfFJqHC/64Lj6 7fe5DyIyJA96p74vHKancIk4rTq44ZmRZZIvmZkO2QdLCBqHV1/rna+t6TyEukYJ+Ylh wVQC5NOLJ06Kie+njdCHcnA40s7XxcnhjIvAMoKqqp4V3KFlqFDoz16JIvdfnPRpF/dB kfpA== X-Gm-Message-State: AOJu0YyXyoo1g3s/bE3cXNzaxOzzdXfV+RCYoa7Ds/5Iv6Dsa3sUPZrL 5zFamCmMvxC/VlRllOT2bsDW3fIMAGUY6gOpy1k= X-Received: by 2002:a05:6512:310f:b0:503:653:5713 with SMTP id n15-20020a056512310f00b0050306535713mr9027047lfb.47.1696246385197; Mon, 02 Oct 2023 04:33:05 -0700 (PDT) Received: from skhimich.dev.yadro.com ([185.15.172.210]) by smtp.gmail.com with ESMTPSA id i26-20020ac2523a000000b005041cc98273sm4715055lfl.300.2023.10.02.04.33.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 04:33:04 -0700 (PDT) From: Sergey Khimich To: linux-kernel@vger.kernel.org Cc: linux-mmc@vger.kernel.org, Adrian Hunter , Ulf Hansson , Philipp Zabel , Shawn Lin , Jyan Chou Subject: [PATCH v3 0/2] mmc: sdhci-of-dwcmshc: Add CQE support Date: Mon, 2 Oct 2023 14:32:59 +0300 Message-Id: <20231002113301.1531717-1-serghox@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 02 Oct 2023 04:33:14 -0700 (PDT) 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/ Thanks in advance, Sergey. Sergey Khimich (2): mmc: cqhci: Add cqhci_set_tran_desc() callback Implement SDHCI CQE support for DesignWare SDHCI. drivers/mmc/host/Kconfig | 1 + drivers/mmc/host/cqhci-core.c | 5 + drivers/mmc/host/cqhci.h | 4 + drivers/mmc/host/sdhci-of-dwcmshc.c | 233 +++++++++++++++++++++++++++- 4 files changed, 241 insertions(+), 2 deletions(-) -- 2.30.2