Message ID | 20230203204000.14410-2-henrik@grimler.se |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1051424wrn; Fri, 3 Feb 2023 12:50:28 -0800 (PST) X-Google-Smtp-Source: AK7set88/uQ3a5CB0CUWXDve4fjA9xOsy4iIBQTlWaS3MS8yK8Bi7byZuAAbaplXoJz2Sq9b6iPz X-Received: by 2002:a05:6a00:1746:b0:593:b491:409f with SMTP id j6-20020a056a00174600b00593b491409fmr14120458pfc.6.1675457427721; Fri, 03 Feb 2023 12:50:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675457427; cv=none; d=google.com; s=arc-20160816; b=IPDZ+UumL8kCKlpJBOmQwVZmWOFYGZDlRaDo0Exq84TILAfrOvyskW6eJbIfasUvxp 7jNXHQvViCUxpDfL8HtTGS3WRpPbj+zC/TQqi6NLknW6i1U1IktHI2+j2Y5iUGaRGFJ3 hjug1Q++2/13Bmad7QBe2dX3AoMXmyHoQJ9bU3u7bFVnjon97N43x70SHEOdE+wcCp5E LtQ3o4r5nUIKBgFt/UOZDFqyi3rVcPM/+sk6mPVUX39QKOYfebnqxMBoXoy3TfqPj201 twWE5cpSVbyoFcJBZfCApu8cL2+3WU7cYWFL2xULzbCqHeJ8n0oLGudyFDeBqtoOwjoJ ctKA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RUkDWn+Iwl+u4RZAdasEeGOVl9/XR1YbpJwm+77E16E=; b=M+1f3IgmK+ruA5EnfxCDNufyE5TWNjx6g2u0YapnQLUHd3ljHi/9G/5onvKQ3Ualoq 33yGET1skztVHv/EwPye/5jrAbVqy//7skdbBccdKHt3nS7p44m6ILiFMPaU2TW+cY7l 2P254uYVnwiDx5pZHWUPQNfpUmg7wzgBtVTJft8EyxQD2+VLqTqos3fjMOyPI4btxK3t 7rZH1225OnJRUuwAEgmDfyrF9xVFiXH34/iMOkMSvCK/UWbw01WpvfqN0H69muTpTMFL Ccw5oMk9n7GR4TtK5a+4sxdZFp8ZIfb3b2GaYZ+4T/fI3sNf/EN0/3acvzragEZf859t OfQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@grimler.se header.s=key1 header.b="jJlBz//a"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=grimler.se Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 142-20020a621694000000b00593961f0a09si3314008pfw.152.2023.02.03.12.50.15; Fri, 03 Feb 2023 12:50:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@grimler.se header.s=key1 header.b="jJlBz//a"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=grimler.se Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233168AbjBCUrA (ORCPT <rfc822;il.mystafa@gmail.com> + 99 others); Fri, 3 Feb 2023 15:47:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233008AbjBCUqy (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 3 Feb 2023 15:46:54 -0500 X-Greylist: delayed 381 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 03 Feb 2023 12:46:51 PST Received: from out-53.mta1.migadu.com (out-53.mta1.migadu.com [IPv6:2001:41d0:203:375::35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7F029D07F for <linux-kernel@vger.kernel.org>; Fri, 3 Feb 2023 12:46:50 -0800 (PST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=grimler.se; s=key1; t=1675456830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RUkDWn+Iwl+u4RZAdasEeGOVl9/XR1YbpJwm+77E16E=; b=jJlBz//aUa1u40cS7EMk3lb7MSryr1TAiJvnDRooGw2vp4OYWme4MQGzeUSI7qDFrwh4cl TaRPSmcoRwFc27qtpitioNoFiqamsJZZE66hzQKvsDA4y/Tq6hr93hW/u+qjlCewdtAsC5 Oo7CuInO77Q0+3ovQnNwYGG4Qlhzr2A= From: Henrik Grimler <henrik@grimler.se> To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, alim.akhtar@samsung.com, m.szyprowski@samsung.com, virag.david003@gmail.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Cc: Henrik Grimler <henrik@grimler.se> Subject: [PATCH 1/2] arm64: dts: exynos: drop mshc aliases Date: Fri, 3 Feb 2023 21:39:59 +0100 Message-Id: <20230203204000.14410-2-henrik@grimler.se> In-Reply-To: <20230203204000.14410-1-henrik@grimler.se> References: <20230203204000.14410-1-henrik@grimler.se> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756844447649211491?= X-GMAIL-MSGID: =?utf-8?q?1756844447649211491?= |
Series |
arm64: dts: add mmc aliases for Exynos devicse
|
|
Commit Message
Henrik Grimler
Feb. 3, 2023, 8:39 p.m. UTC
They are no longer needed after commit a13e8ef6008d ("mmc: dw_mmc:
exynos: use common_caps").
Signed-off-by: Henrik Grimler <henrik@grimler.se>
---
arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 2 --
arch/arm64/boot/dts/exynos/exynos7-espresso.dts | 2 --
2 files changed, 4 deletions(-)
Comments
On Fri, 2023-02-03 at 21:39 +0100, Henrik Grimler wrote: > They are no longer needed after commit a13e8ef6008d ("mmc: dw_mmc: > exynos: use common_caps"). > > Signed-off-by: Henrik Grimler <henrik@grimler.se> > --- > arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 2 -- > arch/arm64/boot/dts/exynos/exynos7-espresso.dts | 2 -- > 2 files changed, 4 deletions(-) > > diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi > b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi > index f54f30633417..c895b70b3cec 100644 > --- a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi > +++ b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi > @@ -40,8 +40,6 @@ aliases { > spi2 = &spi_2; > spi3 = &spi_3; > spi4 = &spi_4; > - mshc0 = &mshc_0; > - mshc2 = &mshc_2; > }; > > chosen { > diff --git a/arch/arm64/boot/dts/exynos/exynos7-espresso.dts > b/arch/arm64/boot/dts/exynos/exynos7-espresso.dts > index f3f4a6ab4b49..686f0923a4a7 100644 > --- a/arch/arm64/boot/dts/exynos/exynos7-espresso.dts > +++ b/arch/arm64/boot/dts/exynos/exynos7-espresso.dts > @@ -18,8 +18,6 @@ / { > > aliases { > serial0 = &serial_2; > - mshc0 = &mmc_0; > - mshc2 = &mmc_2; > }; > > chosen { In dw_mmc-exynos.c, there's a caps array specified like this: /* Common capabilities of Exynos4/Exynos5 SoC */ static unsigned long exynos_dwmmc_caps[4] = { MMC_CAP_1_8V_DDR | MMC_CAP_8_BIT_DATA, 0, 0, 0, }; As I understand these capabilities are added to the mmc controllers based on mshc alias id. Shouldn't these capabilities be moved to device-tree before removing these aliases? This also applies to the 32bit arm patch. If I understand correctly, removing these aliases without adding the capabilities to dt removes the capability "MMC_CAP_1_8V_DDR" and "MMC_CAP_8_BIT_DATA" from mshc_0/mmc_0. Best regards, David
On Sat, 2023-02-04 at 12:43 +0100, David Virag wrote: > On Fri, 2023-02-03 at 21:39 +0100, Henrik Grimler wrote: > > They are no longer needed after commit a13e8ef6008d ("mmc: dw_mmc: > > exynos: use common_caps"). > > > > Signed-off-by: Henrik Grimler <henrik@grimler.se> > > --- > > arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 2 -- > > arch/arm64/boot/dts/exynos/exynos7-espresso.dts | 2 -- > > 2 files changed, 4 deletions(-) [...] > In dw_mmc-exynos.c, there's a caps array specified like this: > > /* Common capabilities of Exynos4/Exynos5 SoC */ > static unsigned long exynos_dwmmc_caps[4] = { > MMC_CAP_1_8V_DDR | MMC_CAP_8_BIT_DATA, > 0, > 0, > 0, > }; > > As I understand these capabilities are added to the mmc controllers > based on mshc alias id. Shouldn't these capabilities be moved to > device-tree before removing these aliases? This also applies to the > 32bit arm patch. If I understand correctly, removing these aliases > without adding the capabilities to dt removes the capability > "MMC_CAP_1_8V_DDR" and "MMC_CAP_8_BIT_DATA" from mshc_0/mmc_0. Actually, it defaults to 0, so these capabilities will be added to all mmc nodes, not just those with mshc0 alias. That may cause problems. Best regards, David
Hi David, On Sat, Feb 04, 2023 at 01:45:15PM +0100, David Virag wrote: > On Sat, 2023-02-04 at 12:43 +0100, David Virag wrote: > > On Fri, 2023-02-03 at 21:39 +0100, Henrik Grimler wrote: > > > They are no longer needed after commit a13e8ef6008d ("mmc: dw_mmc: > > > exynos: use common_caps"). > > > > > > Signed-off-by: Henrik Grimler <henrik@grimler.se> > > > --- > > > arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 2 -- > > > arch/arm64/boot/dts/exynos/exynos7-espresso.dts | 2 -- > > > 2 files changed, 4 deletions(-) > [...] > > In dw_mmc-exynos.c, there's a caps array specified like this: > > > > /* Common capabilities of Exynos4/Exynos5 SoC */ > > static unsigned long exynos_dwmmc_caps[4] = { > > MMC_CAP_1_8V_DDR | MMC_CAP_8_BIT_DATA, > > 0, > > 0, > > 0, > > }; > > > > As I understand these capabilities are added to the mmc controllers > > based on mshc alias id. Shouldn't these capabilities be moved to > > device-tree before removing these aliases? This also applies to the > > 32bit arm patch. If I understand correctly, removing these aliases > > without adding the capabilities to dt removes the capability > > "MMC_CAP_1_8V_DDR" and "MMC_CAP_8_BIT_DATA" from mshc_0/mmc_0. Thanks for pointing this out (I should have seen it already), will send a new version to update device trees and remove the need for those mshc alias based capabilities. > Actually, it defaults to 0, so these capabilities will be added to all > mmc nodes, not just those with mshc0 alias. That may cause problems. I think I see what you mean: ctrl_id will be set to 0 if mshc alias is missing, and then caps is set as mmc->caps |= drv_data->caps[ctrl_id]; where drv_data->caps[0] = MMC_CAP_1_8V_DDR | MMC_CAP_8_BIT_DATA Should be fixed in next version of patchset then in any case, maybe it deserves a "Fixes:" tag as well, will have a look in git history if there is a particular commit that introduced this situation. > Best regards, > David Best regards, Henrik Grimler
diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi index f54f30633417..c895b70b3cec 100644 --- a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi @@ -40,8 +40,6 @@ aliases { spi2 = &spi_2; spi3 = &spi_3; spi4 = &spi_4; - mshc0 = &mshc_0; - mshc2 = &mshc_2; }; chosen { diff --git a/arch/arm64/boot/dts/exynos/exynos7-espresso.dts b/arch/arm64/boot/dts/exynos/exynos7-espresso.dts index f3f4a6ab4b49..686f0923a4a7 100644 --- a/arch/arm64/boot/dts/exynos/exynos7-espresso.dts +++ b/arch/arm64/boot/dts/exynos/exynos7-espresso.dts @@ -18,8 +18,6 @@ / { aliases { serial0 = &serial_2; - mshc0 = &mmc_0; - mshc2 = &mmc_2; }; chosen {