From: Henrik Grimler <henrik@grimler.se>
To: David Virag <virag.david003@gmail.com>
Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
alim.akhtar@samsung.com, m.szyprowski@samsung.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
Subject: Re: [PATCH 1/2] arm64: dts: exynos: drop mshc aliases
Date: Sat, 4 Feb 2023 17:27:15 +0100 [thread overview]
Message-ID: <Y96HY3D/JDk9t1MU@localhost> (raw)
In-Reply-To: <6c528b24aa94751d568d3b43bd00a4795964b3ae.camel@gmail.com>
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
WARNING: multiple messages have this Message-ID (diff)
From: Henrik Grimler <henrik@grimler.se>
To: David Virag <virag.david003@gmail.com>
Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
alim.akhtar@samsung.com, m.szyprowski@samsung.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
Subject: Re: [PATCH 1/2] arm64: dts: exynos: drop mshc aliases
Date: Sat, 4 Feb 2023 17:27:15 +0100 [thread overview]
Message-ID: <Y96HY3D/JDk9t1MU@localhost> (raw)
In-Reply-To: <6c528b24aa94751d568d3b43bd00a4795964b3ae.camel@gmail.com>
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-02-04 16:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-03 20:39 [PATCH 0/2] arm64: dts: add mmc aliases for Exynos devicse Henrik Grimler
2023-02-03 20:39 ` Henrik Grimler
2023-02-03 20:39 ` [PATCH 1/2] arm64: dts: exynos: drop mshc aliases Henrik Grimler
2023-02-03 20:39 ` Henrik Grimler
2023-02-04 11:43 ` David Virag
2023-02-04 11:43 ` David Virag
2023-02-04 12:45 ` David Virag
2023-02-04 12:45 ` David Virag
2023-02-04 16:27 ` Henrik Grimler [this message]
2023-02-04 16:27 ` Henrik Grimler
2023-02-03 20:40 ` [PATCH 2/2] arm64: dts: exynos: add mmc aliases Henrik Grimler
2023-02-03 20:40 ` Henrik Grimler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y96HY3D/JDk9t1MU@localhost \
--to=henrik@grimler.se \
--cc=alim.akhtar@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=phone-devel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=virag.david003@gmail.com \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.