* [PATCH] mmc: bus: Log bus width info when attaching card
@ 2021-12-08 13:02 Christian Löhle
2021-12-08 13:03 ` Christian Löhle
0 siblings, 1 reply; 3+ messages in thread
From: Christian Löhle @ 2021-12-08 13:02 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
Ulf Hansson, Christian Löhle
Cc: johan@kernel.org, sudeep.holla@arm.com,
linux@dominikbrodowski.net
Add info about bus width of the attached card to the bring-up message
For both MMC and SD cards the bus width that is used might
not be obvious to a user. For MMC this might be 1, 4 or 8,
for SD only 1 and 4. In both cases this would be a restriction
by the host (setup). Like using an MMC in an SD slot or an
eMMC to SD adapter.
Signed-off-by: Christian Loehle <cloehle@hyperstone.com>
---
drivers/mmc/core/bus.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index f6b7a9c5bbff..71a675dcd9b7 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -358,7 +358,7 @@ int mmc_add_card(struct mmc_card *card)
mmc_card_ddr52(card) ? "DDR " : "",
type);
} else {
- pr_info("%s: new %s%s%s%s%s%s card at address %04x\n",
+ pr_info("%s: new %s%s%s%s%s%s %u-bit card at address %04x\n",
mmc_hostname(card->host),
mmc_card_uhs(card) ? "ultra high speed " :
(mmc_card_hs(card) ? "high speed " : ""),
@@ -366,7 +366,8 @@ int mmc_add_card(struct mmc_card *card)
(mmc_card_hs200(card) ? "HS200 " : ""),
mmc_card_hs400es(card) ? "Enhanced strobe " : "",
mmc_card_ddr52(card) ? "DDR " : "",
- uhs_bus_speed_mode, type, card->rca);
+ uhs_bus_speed_mode, type,
+ 1<<card->host->ios.bus_width, card->rca);
}
#ifdef CONFIG_DEBUG_FS
--
2.34.1
Hyperstone GmbH | Reichenaustr. 39a | 78467 Konstanz
Managing Director: Dr. Jan Peter Berns.
Commercial register of local courts: Freiburg HRB381782
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] mmc: bus: Log bus width info when attaching card
2021-12-08 13:02 [PATCH] mmc: bus: Log bus width info when attaching card Christian Löhle
@ 2021-12-08 13:03 ` Christian Löhle
2021-12-20 10:27 ` Ulf Hansson
0 siblings, 1 reply; 3+ messages in thread
From: Christian Löhle @ 2021-12-08 13:03 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
Ulf Hansson, Christian Löhle
Cc: johan@kernel.org, sudeep.holla@arm.com,
linux@dominikbrodowski.net
Might seem unecessary to print the bus width and a bit confusing, but it is the only 'bus info' that is not printed in that line.
So I suggest adding it.
Regards,
Christian
From: Christian Löhle
Sent: Wednesday, December 8, 2021 2:02 PM
To: linux-kernel@vger.kernel.org; linux-mmc@vger.kernel.org; Ulf Hansson; Christian Löhle
Cc: johan@kernel.org; sudeep.holla@arm.com; linux@dominikbrodowski.net
Subject: [PATCH] mmc: bus: Log bus width info when attaching card
Add info about bus width of the attached card to the bring-up message
For both MMC and SD cards the bus width that is used might
not be obvious to a user. For MMC this might be 1, 4 or 8,
for SD only 1 and 4. In both cases this would be a restriction
by the host (setup). Like using an MMC in an SD slot or an
eMMC to SD adapter.
Signed-off-by: Christian Loehle <cloehle@hyperstone.com>
---
drivers/mmc/core/bus.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index f6b7a9c5bbff..71a675dcd9b7 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -358,7 +358,7 @@ int mmc_add_card(struct mmc_card *card)
mmc_card_ddr52(card) ? "DDR " : "",
type);
} else {
- pr_info("%s: new %s%s%s%s%s%s card at address %04x\n",
+ pr_info("%s: new %s%s%s%s%s%s %u-bit card at address %04x\n",
mmc_hostname(card->host),
mmc_card_uhs(card) ? "ultra high speed " :
(mmc_card_hs(card) ? "high speed " : ""),
@@ -366,7 +366,8 @@ int mmc_add_card(struct mmc_card *card)
(mmc_card_hs200(card) ? "HS200 " : ""),
mmc_card_hs400es(card) ? "Enhanced strobe " : "",
mmc_card_ddr52(card) ? "DDR " : "",
- uhs_bus_speed_mode, type, card->rca);
+ uhs_bus_speed_mode, type,
+ 1<<card->host->ios.bus_width, card->rca);
}
#ifdef CONFIG_DEBUG_FS
--
2.34.1
=
Hyperstone GmbH | Reichenaustr. 39a | 78467 Konstanz
Managing Director: Dr. Jan Peter Berns.
Commercial register of local courts: Freiburg HRB381782
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] mmc: bus: Log bus width info when attaching card
2021-12-08 13:03 ` Christian Löhle
@ 2021-12-20 10:27 ` Ulf Hansson
0 siblings, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2021-12-20 10:27 UTC (permalink / raw)
To: Christian Löhle
Cc: linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
johan@kernel.org, sudeep.holla@arm.com,
linux@dominikbrodowski.net
On Wed, 8 Dec 2021 at 14:03, Christian Löhle <CLoehle@hyperstone.com> wrote:
>
> Might seem unecessary to print the bus width and a bit confusing, but it is the only 'bus info' that is not printed in that line.
> So I suggest adding it.
Well, I am not sure I agree with this.
There is other information too, like the clock rate for example. But,
I think it may be a bit too much to log everything. In particular as
the information is already available via debugfs, for those that want
more information.
>
> Regards,
> Christian
>
Kind regards
Uffe
>
>
>
> From: Christian Löhle
> Sent: Wednesday, December 8, 2021 2:02 PM
> To: linux-kernel@vger.kernel.org; linux-mmc@vger.kernel.org; Ulf Hansson; Christian Löhle
> Cc: johan@kernel.org; sudeep.holla@arm.com; linux@dominikbrodowski.net
> Subject: [PATCH] mmc: bus: Log bus width info when attaching card
>
> Add info about bus width of the attached card to the bring-up message
>
> For both MMC and SD cards the bus width that is used might
> not be obvious to a user. For MMC this might be 1, 4 or 8,
> for SD only 1 and 4. In both cases this would be a restriction
> by the host (setup). Like using an MMC in an SD slot or an
> eMMC to SD adapter.
>
> Signed-off-by: Christian Loehle <cloehle@hyperstone.com>
> ---
> drivers/mmc/core/bus.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
> index f6b7a9c5bbff..71a675dcd9b7 100644
> --- a/drivers/mmc/core/bus.c
> +++ b/drivers/mmc/core/bus.c
> @@ -358,7 +358,7 @@ int mmc_add_card(struct mmc_card *card)
> mmc_card_ddr52(card) ? "DDR " : "",
> type);
> } else {
> - pr_info("%s: new %s%s%s%s%s%s card at address %04x\n",
> + pr_info("%s: new %s%s%s%s%s%s %u-bit card at address %04x\n",
> mmc_hostname(card->host),
> mmc_card_uhs(card) ? "ultra high speed " :
> (mmc_card_hs(card) ? "high speed " : ""),
> @@ -366,7 +366,8 @@ int mmc_add_card(struct mmc_card *card)
> (mmc_card_hs200(card) ? "HS200 " : ""),
> mmc_card_hs400es(card) ? "Enhanced strobe " : "",
> mmc_card_ddr52(card) ? "DDR " : "",
> - uhs_bus_speed_mode, type, card->rca);
> + uhs_bus_speed_mode, type,
> + 1<<card->host->ios.bus_width, card->rca);
> }
>
> #ifdef CONFIG_DEBUG_FS
> --
> 2.34.1
> =
> Hyperstone GmbH | Reichenaustr. 39a | 78467 Konstanz
> Managing Director: Dr. Jan Peter Berns.
> Commercial register of local courts: Freiburg HRB381782
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-20 10:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-08 13:02 [PATCH] mmc: bus: Log bus width info when attaching card Christian Löhle
2021-12-08 13:03 ` Christian Löhle
2021-12-20 10:27 ` Ulf Hansson
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.