Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2054459rdh; Tue, 26 Sep 2023 10:53:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGjnTitSrjf33G9ewAG+tj1u3Ca8j0iknAAnwXv3NTkoyHJQdTXBlrp/J4YzgmhTZiFU1T/ X-Received: by 2002:a17:902:7791:b0:1bb:dc48:644a with SMTP id o17-20020a170902779100b001bbdc48644amr7640395pll.49.1695750811572; Tue, 26 Sep 2023 10:53:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695750811; cv=none; d=google.com; s=arc-20160816; b=Rv5jQPy2cL0OJ9Kg0K9zyGF0sQjxOX+QY33SdcgLsIeB5MKRzftfcawFSnHrwpxoy1 d98RckUS5LcAAIlHzXK+Odu5Ye+vYw+F+8ocTHD6+2SVeoRyz6o5w6VVqbMN5bwNmCCM LWM/qGL5e8n6UcNtnpLJUpzgxSzI2zsHu+bkz103dlIDgaxuS++KNEOMI9yX2mVwT7lH dxlqwW4pxK+WcZyyx82zHBkgg+MilcDfK0isiYh5P28w9/aZAbH+giJOYLHR69ER7G2Z U4qDLW3eOp+x+GkhQIqpsGhVEXThSR1M+udnA6MbgxY05hmVdh2hHGYYcP1FmjADre8q p1/A== 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=+JhM+LLNrku/f6eElDwzC7/IyURkla8ZhpaB+WfkESg=; fh=ZioSMBeFj2aGi8xYHSVdv3ckCOq7EziDdlJhiOzz7bk=; b=BxtPH6GQ6gjD8CnWEPA/BQbgggja2XwIr7l3SBLPWs1S875ZzfU7I/OKlre6Gdhzm1 bV/cUCV5i2ZIFFt9OmZc3a1VpUcIKeMPwqdqu1GqukJG5vqdMxCl/rCZHgGDQR8cA5T2 geqAkj5UHbsHGYMb1+QX5qo6D9wd4Wn1yOoMv5F7e+F2T62gRgK8ZvtPUPsql9J3fvRG tTm2q1wmd+xo6++aU/18PttBVR8tIBA2kNUL0hI0dppSQbtXU/9EilqpQ5pMePL2vHi8 nlNIu8Co/CMIYdXpQ8lwKTGnTQjG3pSOjv+VuZbkjGaAe2AoePTGiaafWaSylfPcKFKQ kc2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WLNd+v2p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id n20-20020a170902d0d400b001bf3fe55e78si3152906pln.600.2023.09.26.10.53.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 10:53:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WLNd+v2p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id AF6C8805AA3B; Tue, 26 Sep 2023 02:02:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234048AbjIZJCy (ORCPT + 99 others); Tue, 26 Sep 2023 05:02:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233904AbjIZJCx (ORCPT ); Tue, 26 Sep 2023 05:02:53 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D038DE; Tue, 26 Sep 2023 02:02:46 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2c123eed8b2so137573331fa.0; Tue, 26 Sep 2023 02:02:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695718964; x=1696323764; 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=+JhM+LLNrku/f6eElDwzC7/IyURkla8ZhpaB+WfkESg=; b=WLNd+v2pU1Tu7LOAhfljB/JhUwKEhJnRru6kd8yfBVuNI1++UhJigKFPKFiDMWPuro WQfQE7F5XnG2ZwXOLteXqbw/BLMSNcWqc2g3YDqY6H8NADKwNHcQQFyNtvopZNZnddoV sP1B8KHgW7Qp338l4cFqPGGyd4+xd+wVwfRJZuZIJD53lRWCXQCLrqjrE339ekmC4STq liwvEh6nNAJ4L7c0CysKH5JPYlNw+RXuxkpvWOxOVV/H8hspOBSJy0tvZdERK/atKD2D xxnvWKf504Q//6K9JThIxuSqPRpgpR/pzMOCmowo9gZzdCxLNoP62sal2CRJMeSU5AmI Wkkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695718964; x=1696323764; 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=+JhM+LLNrku/f6eElDwzC7/IyURkla8ZhpaB+WfkESg=; b=j5R5W6t8HIDH1rBcdJLZHyyIuCaN8Jnm0RTpDftRrwJMpJPr0Ce/lC4ZTOmSKnjMFa z1R0BT9IT9esRvUwvxr1aYsXYAfh69HGQuxDH6lRdb6+VVESqsJqOqZSjaXD1IX55OpS 8FYW21rjwVZbT8HHN3Oj7kBmLZwG4t5dPuRx8jJuOABOzADJEWPHg8pBunqTrieRAXp2 MBpXGT4qGV3/x65HTo9xPN7ffVz/vKONw4/OQ51MloFjEvKqIS52ScWHHu29uSn0u/or 7Ttb+gDSF7rPBra+tiP2Xs/6ov9aSb7xz+WvR3ZvmXQfP7GaZqnf1sYM4+HSFSHQz3T3 ghZw== X-Gm-Message-State: AOJu0YzedS6y2iuHZF2eWs+9jBSdPEFEqgpElPIYwWjZX3/zcV5Yyw7+ jAcjROwsZfQ30ehgxb+eUWsj4lOVv4BE7wFb X-Received: by 2002:a2e:800c:0:b0:2bf:fbe7:67dd with SMTP id j12-20020a2e800c000000b002bffbe767ddmr8776200ljg.28.1695718964090; Tue, 26 Sep 2023 02:02:44 -0700 (PDT) Received: from skhimich.dev.yadro.com ([185.15.172.210]) by smtp.gmail.com with ESMTPSA id l12-20020a2e99cc000000b002bcedacd726sm2604353ljj.25.2023.09.26.02.02.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 02:02:43 -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 v2 0/2] mmc: sdhci-of-dwcmshc: Add CQE support Date: Tue, 26 Sep 2023 12:02:40 +0300 Message-Id: <20230926090242.105020-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=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Tue, 26 Sep 2023 02:02:52 -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. 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 | 3 + drivers/mmc/host/sdhci-of-dwcmshc.c | 233 +++++++++++++++++++++++++++- 4 files changed, 240 insertions(+), 2 deletions(-) -- 2.30.2