From patchwork Wed Nov 24 18:45:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 12637365 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 057CEC433F5 for ; Wed, 24 Nov 2021 18:46:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AHLrOBFUf+VPMER3uJoNnJs+PTWyWYTrcaetvYGXIZY=; b=PDNFxZvUdPcQbL yXx1VxFXfc8H8ZMfQnKRvJydDpj0EU2ZiB2E43n3UBjkNRIXuvsb7wj2VCWZWR4vY6GAkQwtEoHoA KRO7a0uRf7T1dLsVQwl6BH3twqTqEsGTmhmoB4b8BJESiNvxDb2BhVuvW0D36Pdt5ugNLsJLF4cdm JvwKMjY7FtRqa8SPeg5eWS6OnV9StWhUFIm93gmnTAAkD0w4IP2UBMhmJtXJ/nULZ4NPluK2Kn1gK SToqXTLvacTSZskY0yFiW5NXzkrUyCXUvEE8jhru3j6eVs5cFNfXzjJyqFhU7XmvXG9kk8a1EaRUG gws8W0CD5VFzj9fr0dAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpxI2-005X7o-JA; Wed, 24 Nov 2021 18:46:42 +0000 Received: from [2001:8b0:1628:5005::111] (helo=metanate.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpxHc-005Wzt-Qf; Wed, 24 Nov 2021 18:46:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metanate.com; s=stronger; h=Content-Transfer-Encoding:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Reply-To: Content-ID:Content-Description; bh=lPi+Knpu85ApFKN1hCgex6IK5JO2TM11yYvM5Cw66/Q=; b=pZP9IxWd/ronCKzZ+PMeU7SeDb J0PgruqxPg5J0wP8UiFl/ObTGFJUEkvsJZwCn3pvNkMcpFu79fHmpwbQQVm/SXblTukYf6XuyNrIZ jp+mBzUgKVmLQmUegOlYbGBDPTa2U0ewI6JsKnQuz4VmHdNKHNR4/oqBnq+m962kiQBZhV/6b4zrV 0DWX7VcW27BpT7S4JitKKQixs3CwcAJCaqDEL3nPwq3Mm7Mn1LJQqleOwsNNhxDUoWhaP/ssXJLKI +IqHtxtJGaeD1+4TPVRc+vg3Cj+vKFP66rntQ8Fg1AwLqM6cddZr/dWsvSgDpUqqzFUwLUAFPdzWX EbBYb7SA==; Received: from [81.174.171.191] (helo=donbot.metanate.com) by email.metanate.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mpxHV-00007s-A6; Wed, 24 Nov 2021 18:46:09 +0000 From: John Keeping To: linux-mmc@vger.kernel.org Cc: John Keeping , Heiko Stuebner , Jaehoon Chung , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Ulf Hansson Subject: [PATCH 1/4] mmc: dw_mmc: add common capabilities to replace caps Date: Wed, 24 Nov 2021 18:45:59 +0000 Message-Id: <20211124184603.3897245-2-john@metanate.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124184603.3897245-1-john@metanate.com> References: <20211124184603.3897245-1-john@metanate.com> MIME-Version: 1.0 X-Authenticated: YES X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211124_104616_894232_5CEC0B41 X-CRM114-Status: GOOD ( 14.10 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org The caps field depends on the mshcN alias ID but for some devices this is unnecessary as the capabilities are the same for all instances sharing the same compatible. Add a common_caps field for this case which updates the host's capabilities without needing the mshcN alias ID. Signed-off-by: John Keeping Reviewed-by: Jaehoon Chung --- drivers/mmc/host/dw_mmc.c | 3 +++ drivers/mmc/host/dw_mmc.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 195f2b2434b0..f2a14a434bef 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -2856,6 +2856,9 @@ static int dw_mci_init_slot_caps(struct dw_mci_slot *slot) if (host->pdata->pm_caps) mmc->pm_caps = host->pdata->pm_caps; + if (drv_data) + mmc->caps |= drv_data->common_caps; + if (host->dev->of_node) { ctrl_id = of_alias_get_id(host->dev->of_node, "mshc"); if (ctrl_id < 0) diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h index ce05d81477d9..771d5afa3136 100644 --- a/drivers/mmc/host/dw_mmc.h +++ b/drivers/mmc/host/dw_mmc.h @@ -550,6 +550,8 @@ struct dw_mci_slot { * dw_mci driver data - dw-mshc implementation specific driver data. * @caps: mmc subsystem specified capabilities of the controller(s). * @num_caps: number of capabilities specified by @caps. + * @common_caps: mmc subsystem specified capabilities applicable to all of + * the controllers * @init: early implementation specific initialization. * @set_ios: handle bus specific extensions. * @parse_dt: parse implementation specific device tree properties. @@ -562,6 +564,7 @@ struct dw_mci_slot { struct dw_mci_drv_data { unsigned long *caps; u32 num_caps; + u32 common_caps; int (*init)(struct dw_mci *host); void (*set_ios)(struct dw_mci *host, struct mmc_ios *ios); int (*parse_dt)(struct dw_mci *host); From patchwork Wed Nov 24 18:46:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 12637371 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D3E98C433FE for ; Wed, 24 Nov 2021 18:47:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OzIPA/jNLtbuDLofPAUFFWSswzRMENKiOaj7sysB748=; b=T2Uof88qQgUZeE 6ZqfHL/SJ68G9tQNzSLGF/L0gvTg1k5qrjss1Lg6BZJ359LTzJhFaAIldDtb1A5dHILPwNvYkfoIH 43F9e3WmbCFzBwd9Grs6R6Pb+2nzAKe1nWg1GryCPZaLk1Ce2GUU43AdVntpbNSPDXLgRs4CMyBRn F6UKXzHWb2Qe3q8T6G+Vc5ue+XHqtbOveS6r3KuDytc2lmJlpNeoHteAG/kvlqXD8S0eVR+Zd0jjH 9cRhn3r0isq4iD5ogkICOGlIJNWxQkHTOVW2J61t9jSTrnyZNJDUezWCVogAFRi9ku0txyTvfeYFo KOToC21N0iwiOuPN84Dw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpxIc-005XS2-Rb; Wed, 24 Nov 2021 18:47:18 +0000 Received: from [2001:8b0:1628:5005::111] (helo=metanate.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpxHc-005Wzm-St; Wed, 24 Nov 2021 18:46:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metanate.com; s=stronger; h=Content-Transfer-Encoding:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Reply-To: Content-ID:Content-Description; bh=NaShKU+gB8/YODlRGH4eQzK9sS6+KcPIIAbBK8gxphY=; b=0f+GX8dBs8zJWS13k5mtqAjoNZ gjuwmNYLsRaBDN8QN96JbJ3dHxSsjU3k/BDs0B7YH5V/v8FFf8H+LNX8rMPCU3Jhu1t+PCfe28ZYK aDENVTmbIA341XtbSF1qGVQR6yGlk/84SzRip4AwMuJ52j40d1cmElUeaoLXc+qhTGUKdMZb1DGrI NQpprmz3WEYh4FGWUPmFWuQwlQrj+37ITe55hGFAYPCq5EltM6s+w5fkejCnd8LH/zqGTYnlnae0i ChJVU4dyLsGLpOgDqvTBefEiLTYneLsrrayLCZnorOtVCBcvnDWxjUS/6HVSIk5ZiHHt0vjdzf0L1 ksoJ6Wrw==; Received: from [81.174.171.191] (helo=donbot.metanate.com) by email.metanate.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mpxHW-00007s-7d; Wed, 24 Nov 2021 18:46:10 +0000 From: John Keeping To: linux-mmc@vger.kernel.org Cc: John Keeping , Heiko Stuebner , Jaehoon Chung , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Ulf Hansson Subject: [PATCH 2/4] mmc: dw_mmc: hi3798cv200: use common_caps Date: Wed, 24 Nov 2021 18:46:00 +0000 Message-Id: <20211124184603.3897245-3-john@metanate.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124184603.3897245-1-john@metanate.com> References: <20211124184603.3897245-1-john@metanate.com> MIME-Version: 1.0 X-Authenticated: YES X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211124_104617_012632_0643B387 X-CRM114-Status: GOOD ( 12.22 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org The capabilities for all instances are the same, so use common_caps instead of caps/num_caps to remove the dependency on the mshcN device tree alias. Signed-off-by: John Keeping Reviewed-by: Jaehoon Chung --- drivers/mmc/host/dw_mmc-hi3798cv200.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-hi3798cv200.c b/drivers/mmc/host/dw_mmc-hi3798cv200.c index 39794f93826f..e9437ef8ef19 100644 --- a/drivers/mmc/host/dw_mmc-hi3798cv200.c +++ b/drivers/mmc/host/dw_mmc-hi3798cv200.c @@ -23,12 +23,6 @@ struct hi3798cv200_priv { struct clk *drive_clk; }; -static unsigned long dw_mci_hi3798cv200_caps[] = { - MMC_CAP_CMD23, - MMC_CAP_CMD23, - MMC_CAP_CMD23 -}; - static void dw_mci_hi3798cv200_set_ios(struct dw_mci *host, struct mmc_ios *ios) { struct hi3798cv200_priv *priv = host->priv; @@ -166,8 +160,7 @@ static int dw_mci_hi3798cv200_init(struct dw_mci *host) } static const struct dw_mci_drv_data hi3798cv200_data = { - .caps = dw_mci_hi3798cv200_caps, - .num_caps = ARRAY_SIZE(dw_mci_hi3798cv200_caps), + .common_caps = MMC_CAP_CMD23, .init = dw_mci_hi3798cv200_init, .set_ios = dw_mci_hi3798cv200_set_ios, .execute_tuning = dw_mci_hi3798cv200_execute_tuning, From patchwork Wed Nov 24 18:46:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 12637367 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A0252C433EF for ; Wed, 24 Nov 2021 18:46:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0tw+S6oBkiMREsz9dNtn0EZKWQMz8LzqKoZE5g8U9Ek=; b=EXVucF+103q2DQ 5XrSEXuEt9SlcWTIjmhnpjsY6zomah8r0P73rAC3QuUeh4CBQNge02I2tFZe8NRAPN/Z5CRfYtccV lwiqEfyPt9DKmI1mgtjId6t8PSq14TfSvBHvjjqVRc+zI+S7BGC/5FG38c8eE1wneGDivR0Fj1+zA AzT+AA9EsMATJChsVfIQBbFJxc95JMrFoqBqE8zQzDQsTR6Xf1uxJ3fT/vecFqgeOwmzJvubQT6Bh HX34vtqxeEeyoKuPkCGAs2/COZJIwfe/KUZXDbN/ZNvaN2o64IGOMm5svpnDk64fw4zp1gQpbDT4j DSGaazdDBzJVFLTW/ePA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpxI1-005X7b-Q8; Wed, 24 Nov 2021 18:46:41 +0000 Received: from [2001:8b0:1628:5005::111] (helo=metanate.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpxHc-005Wzh-Qk; Wed, 24 Nov 2021 18:46:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metanate.com; s=stronger; h=Content-Transfer-Encoding:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Reply-To: Content-ID:Content-Description; bh=R6d+fdmVlW1mqNTDMqcWULS5Btx0udfWYQ0h5v3+RgE=; b=Oduy2hVDi7trTPFC5lx+7E2bUo c5pCeVXpyjSz5qRi1X3VTyez0AtpP6BcXgqc+MULCLS3GuLazo/J3EFW62sk+RQbJZXIHpkrCYPqq zSvZWPIuqnrjC2jGT9IPQiY+PuEjvkxKNrE1AzqxY0r2aHY3/x5SRj0mVwcCDk5d9ebKOA35PyKr0 61mGZvVRFijIINPCSw2Xa8ISX7yE+30kL3lnqk0QL1XMwzWD4tg92GiDJToOWnzQC/KBoouT7klCA 2V2CH1LXaglx6T8eCdI4Ilqcr+P+kqwA8LTpiezfUGIzvAxJy+YSAvCBBugPcmFQriqwQtdG5ukrs nP37Ax8Q==; Received: from [81.174.171.191] (helo=donbot.metanate.com) by email.metanate.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mpxHX-00007s-5y; Wed, 24 Nov 2021 18:46:11 +0000 From: John Keeping To: linux-mmc@vger.kernel.org Cc: John Keeping , Heiko Stuebner , Jaehoon Chung , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Ulf Hansson Subject: [PATCH 3/4] mmc: dw_mmc: rockchip: use common_caps Date: Wed, 24 Nov 2021 18:46:01 +0000 Message-Id: <20211124184603.3897245-4-john@metanate.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124184603.3897245-1-john@metanate.com> References: <20211124184603.3897245-1-john@metanate.com> MIME-Version: 1.0 X-Authenticated: YES X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211124_104616_903515_B09D0424 X-CRM114-Status: GOOD ( 11.13 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org The capabilities for all instances are the same, so use common_caps instead of caps/num_caps to remove the dependency on the mshcN device tree alias. Signed-off-by: John Keeping Reviewed-by: Jaehoon Chung --- drivers/mmc/host/dw_mmc-rockchip.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c index d36991acd6df..95d0ec0f5f3a 100644 --- a/drivers/mmc/host/dw_mmc-rockchip.c +++ b/drivers/mmc/host/dw_mmc-rockchip.c @@ -300,21 +300,12 @@ static int dw_mci_rockchip_init(struct dw_mci *host) return 0; } -/* Common capabilities of RK3288 SoC */ -static unsigned long dw_mci_rk3288_dwmmc_caps[4] = { - MMC_CAP_CMD23, - MMC_CAP_CMD23, - MMC_CAP_CMD23, - MMC_CAP_CMD23, -}; - static const struct dw_mci_drv_data rk2928_drv_data = { .init = dw_mci_rockchip_init, }; static const struct dw_mci_drv_data rk3288_drv_data = { - .caps = dw_mci_rk3288_dwmmc_caps, - .num_caps = ARRAY_SIZE(dw_mci_rk3288_dwmmc_caps), + .common_caps = MMC_CAP_CMD23, .set_ios = dw_mci_rk3288_set_ios, .execute_tuning = dw_mci_rk3288_execute_tuning, .parse_dt = dw_mci_rk3288_parse_dt, From patchwork Wed Nov 24 18:46:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 12637369 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B5FBDC433EF for ; Wed, 24 Nov 2021 18:47:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=s0CH0dv82v/FGeSEcUTGN14iWlSImOySjca0BufnAnE=; b=WWJuTSMeTHb9X9 WLl/6lxY0ymfItDHj9CAi8X3LpjIAdnis9v4StULEhnhI0guFKDI/AVI5/J6zNoPmIDmgz3FNwLeV eoeR2NwnJQT+PSlUVqaU82tFc3E8Xqo6uVkXq3ro/dZ19EnOTbIyR6iUlXmchQyJIBvm67tx4Pxry piPWIpmKX3+SN1nXRNUVAAk9d370YVR5H3Hdiu8RPQvqRPI1AtxFORfOaesf4HyUU6ajGqYt4FDOw iagYDBdaEcExe4otFRtkajw1l73FVyudCTPzZce9uCeKey1sGjEimV74iJ6wBX/U8WiQXXj2lYW9q CEnWx8D0jHVVrHLSTXSQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpxIa-005XRE-N4; Wed, 24 Nov 2021 18:47:16 +0000 Received: from [2001:8b0:1628:5005::111] (helo=metanate.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpxHc-005Wzl-S2; Wed, 24 Nov 2021 18:46:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metanate.com; s=stronger; h=Content-Transfer-Encoding:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Reply-To: Content-ID:Content-Description; bh=eIJrpJif5BwSFiNbPidFLu9RNjRyc9mWZzLOM9omLQI=; b=wTfXuEiEd/ayinVA/3dJyqn1ZX Lnzq61zhPquD7Uu3Rmi8oGg6Ptk6PSPY2f4DgfFl5JjVVQR+katUUvvg1QGA3rFlpF1YN8r16xQWu 6j7J1Bfucx2feleUPWeM0h6WckdELL0PSiGKCCagklUWZ5FWkeko1hTsIWW0ZE4JfxnyC7orWB6+I E+lGiZCYOPUcgmVr2dKNQZZqQoISSDmCqTxK7y1UDXxLJbYh/+GidbbolbaYIwvJW9OH1kGTQA8n0 QByjh/MBkrK7XTf8S9TKAGU8PexLbXdUzBRW9awDAhVSWYKvE4Yz43i6J2OfRydVMFx1QdxFRUvMM hiCU+rXg==; Received: from [81.174.171.191] (helo=donbot.metanate.com) by email.metanate.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mpxHY-00007s-48; Wed, 24 Nov 2021 18:46:12 +0000 From: John Keeping To: linux-mmc@vger.kernel.org Cc: John Keeping , Heiko Stuebner , Jaehoon Chung , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Ulf Hansson Subject: [PATCH 4/4] mmc: dw_mmc: exynos: use common_caps Date: Wed, 24 Nov 2021 18:46:02 +0000 Message-Id: <20211124184603.3897245-5-john@metanate.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124184603.3897245-1-john@metanate.com> References: <20211124184603.3897245-1-john@metanate.com> MIME-Version: 1.0 X-Authenticated: YES X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211124_104616_953560_631E3BDF X-CRM114-Status: GOOD ( 12.39 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Move the common MMC_CAP_CMD23 capability to common_caps so that only the special case of MMC_CAP_1_8V_DDR and MMC_CAP_8_BIT_DATA are set via caps/num_caps. Both of those can, and should, be set via device tree properties instead, so we can now say that exynos_dwmmc_caps is only used for backwards compatibility. Signed-off-by: John Keeping Reviewed-by: Jaehoon Chung --- drivers/mmc/host/dw_mmc-exynos.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c index c2dd29ef45c6..f76eeeb0cc53 100644 --- a/drivers/mmc/host/dw_mmc-exynos.c +++ b/drivers/mmc/host/dw_mmc-exynos.c @@ -526,15 +526,16 @@ static int dw_mci_exynos_prepare_hs400_tuning(struct dw_mci *host, /* Common capabilities of Exynos4/Exynos5 SoC */ static unsigned long exynos_dwmmc_caps[4] = { - MMC_CAP_1_8V_DDR | MMC_CAP_8_BIT_DATA | MMC_CAP_CMD23, - MMC_CAP_CMD23, - MMC_CAP_CMD23, - MMC_CAP_CMD23, + MMC_CAP_1_8V_DDR | MMC_CAP_8_BIT_DATA, + 0, + 0, + 0, }; static const struct dw_mci_drv_data exynos_drv_data = { .caps = exynos_dwmmc_caps, .num_caps = ARRAY_SIZE(exynos_dwmmc_caps), + .common_caps = MMC_CAP_CMD23, .init = dw_mci_exynos_priv_init, .set_ios = dw_mci_exynos_set_ios, .parse_dt = dw_mci_exynos_parse_dt,