Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3022089rdh; Mon, 27 Nov 2023 05:02:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IF9a/ZiD6abmr7I2NMX3Wgh1OYjXDdUCdJyeRJk+tRVi7AEENIZLL900kFMn3Aje5Ma3etr X-Received: by 2002:a05:6602:70d:b0:7b0:6d84:9f1b with SMTP id f13-20020a056602070d00b007b06d849f1bmr13260698iox.1.1701090152588; Mon, 27 Nov 2023 05:02:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701090152; cv=none; d=google.com; s=arc-20160816; b=rmXJu5tgBu8FfJlMQfYUcV/qlyJ1W5m/zgJaOm9pX48/2qeXeNOEYOt20qe8BGPtmf whmerCZZjVoq/eESsfPRQ/2hRuwMW+o0+TYo6fICpNzJ9XzOh6JCZxYY1a8pvYVHrxCq +ZT9jlOvRG9VdX/0MINCLyURk5fIKDsT7NC9jwEg3/myt9LMEwu2WlkZdp93I7o4Gw+l h6qh2p2+zy1zsV73utwVwVUu9hLgXZTMVe2k6XvZ561u5iSYy9pgy8j50+lRmNtrdFP9 DEOP7Vr/DG8ZNO97BGyJa68d5TtmJLw7NehfX6zSXov049NTDwEZ6hrrixPV+IluwXaJ J6oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=Ll8T5YXadd1xtBXxi4JsVHPLf1KZHAB1cXHkxPmJm9c=; fh=QACFFgK8rKte0y/bqMKOU5gLFSotly/xsjGdIVHEPS4=; b=Jc4b6ZESHSOzUbOHk3+f4zwR8IR9Y3pzG6zW7TTyUrrpnePESMOD55tHO3DAxA5jYJ zGCRYXrxmrVuAyo0R2n4Xd5JC5dzxP6XqyZKAouYCOFcutaG5kYBMYhCqODrOgs1jFri V5i2HUAWNHwaKT3k3RbUp09+pwLsm4dXev0cnv0cxwcIxZmKGH82amBNkblyaWCBW2ri Bzt9es3MqbNYOz0EKKkfHAMdx4wk3ocT6IGoT+eXD37I+fa/LcwU7RAB8dPAMVJAuM8t Q0K+TMfHfR5bKywqJROmDTs8w/BhzMlnKO3gPGkeYCIzFbi1KP5kUh87i4V93qHDNbPx GHaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id dk23-20020a0566384bd700b00466547df26asi4078020jab.88.2023.11.27.05.02.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 05:02:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 0B6D980B1BCB; Mon, 27 Nov 2023 05:02:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233532AbjK0NCL (ORCPT + 99 others); Mon, 27 Nov 2023 08:02:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233429AbjK0NCJ (ORCPT ); Mon, 27 Nov 2023 08:02:09 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A91DCAA; Mon, 27 Nov 2023 05:02:15 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AB75D2F4; Mon, 27 Nov 2023 05:03:02 -0800 (PST) Received: from [10.57.71.110] (unknown [10.57.71.110]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2CB393F73F; Mon, 27 Nov 2023 05:02:10 -0800 (PST) Message-ID: <87d7235c-8d3f-42df-b1ed-ea0abe5af3b9@arm.com> Date: Mon, 27 Nov 2023 13:02:08 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7][2/4] mmc: Add Synopsys DesignWare mmc cmdq host driver Content-Language: en-US To: Jyan Chou , ulf.hansson@linaro.org, adrian.hunter@intel.com, jh80.chung@samsung.com, riteshh@codeaurora.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: conor+dt@kernel.org, asutoshd@codeaurora.org, p.zabel@pengutronix.de, linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, arnd@arndb.de, briannorris@chromium.org, doug@schmorgal.com, tonyhuang.sunplus@gmail.com, abel.vesa@linaro.org, william.qiu@starfivetech.com References: <20231121091101.5540-1-jyanchou@realtek.com> <20231121091101.5540-3-jyanchou@realtek.com> From: Christian Loehle In-Reply-To: <20231121091101.5540-3-jyanchou@realtek.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Mon, 27 Nov 2023 05:02:27 -0800 (PST) On 21/11/2023 09:10, Jyan Chou wrote: > We implemented cmdq feature on Synopsys DesignWare mmc driver. > The difference between dw_mmc.c and dw_mmc_cqe.c were distinct > register definitions, mmc user flow and the addition of cmdq. > > New version of User Guide had modify mmc driver's usage flow, > we may need to renew code to precisely follow user guide. > > More over, We added a wait status function to satisfy synopsys > user guide's description, since this flow might be specific in > synopsys host driver only. > > Signed-off-by: Jyan Chou > > —-- > v6 -> v7: > - Remove reset-names in driver and adjust reset control's code. > > v5 -> v6: > - Fix linux coding style issues. > - Drop useless code that is not described in the bindings. > - Replace devm_clk_get and clk_prepare_enable with devm_clk_get_enabled. > - Replace EXPORT_SYMBOL with EXPORT_SYMBOL_GPL. > > v4 -> v5: > - Fix linux coding style issues. > - Fix test robot build errors to make good use of setup_tran_desc > call back function. > - Remove useless function. > > v3 -> v4: > - Modify dma mode selection and dma addressing bit to statisfy > linux coding style. > > v1 -> v2: > - Remove dw_mci_cqe_set_tran_desc due to the duplicated function. > - Add ->pre_enable() / ->post_disable() > > v0 -> v1: > - Seperate different support into single patch. > - Fix the compiler complains. > --- > --- > drivers/mmc/host/Kconfig | 13 + > drivers/mmc/host/Makefile | 1 + > drivers/mmc/host/dw_mmc_cqe.c | 1467 +++++++++++++++++++++++++++++++++ > drivers/mmc/host/dw_mmc_cqe.h | 456 ++++++++++ > 4 files changed, 1937 insertions(+) > create mode 100644 drivers/mmc/host/dw_mmc_cqe.c > create mode 100644 drivers/mmc/host/dw_mmc_cqe.h > > diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig > index 58bd5fe4cd25..06bb4de28cc4 100644 > --- a/drivers/mmc/host/Kconfig > +++ b/drivers/mmc/host/Kconfig > @@ -837,6 +837,19 @@ config MMC_DW_STARFIVE > Synopsys DesignWare Memory Card Interface driver. Select this option > for platforms based on StarFive JH7110 SoC. > > +config MMC_DW_CQE > + tristate "Synopsys DesignWare Memory Card with CQE Interface" > + depends on ARC || ARM || ARM64 || MIPS || COMPILE_TEST > + select MMC_CQHCI > + help > + This selects support for the Synopsys DesignWare Mobile Storage IP > + block after JEDEC Standard version 5.1. Select this option for SD and > + MMC interfaces that use command queue. /after/according to/ ? Does the hardware actually implement both: SD and MMC CQ? If so that would be very interesting, but also not currently supported by mmc layer.