public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/5] mmc: dump card and host capabilities if debug is enabled
Date: Wed, 22 Nov 2017 10:08:50 +0100	[thread overview]
Message-ID: <20171122100850.44ba3df8@jawa> (raw)
In-Reply-To: <1511277188-2923-4-git-send-email-jjhiblot@ti.com>

On Tue, 21 Nov 2017 16:13:06 +0100
Jean-Jacques Hiblot <jjhiblot@ti.com> wrote:

> This is a useful information while debugging the initialization
> process or performance issues.
> 
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
> ---
>  drivers/mmc/mmc.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index a5a521e..a30b6a2 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -1502,6 +1502,10 @@ void mmc_dump_capabilities(const char *text,
> uint caps) printf("%s, ", mmc_mode_name(mode));
>  	printf("\b\b]\n");
>  }
> +#else
> +void mmc_dump_capabilities(const char *text, uint caps)
> +{
> +}
>  #endif
>  
>  struct mode_width_tuning {
> @@ -1582,6 +1586,8 @@ static int sd_select_mode_and_width(struct mmc
> *mmc, uint card_caps) bool uhs_en = (mmc->ocr & OCR_S18R) ? true :
> false; uint caps;
>  
> +	mmc_dump_capabilities("sd card", card_caps);
> +	mmc_dump_capabilities("host", mmc->host_caps |
> MMC_MODE_1BIT); 
>  	/* Restrict card's capabilities by what the host can do */
>  	caps = card_caps & (mmc->host_caps | MMC_MODE_1BIT);
> @@ -1764,6 +1770,9 @@ static int mmc_select_mode_and_width(struct mmc
> *mmc, uint card_caps) const struct mode_width_tuning *mwt;
>  	const struct ext_csd_bus_width *ecbw;
>  
> +	mmc_dump_capabilities("mmc", card_caps);
> +	mmc_dump_capabilities("host", mmc->host_caps |
> MMC_MODE_1BIT); +
>  	/* Restrict card's capabilities by what the host can do */
>  	card_caps &= (mmc->host_caps | MMC_MODE_1BIT);
>  

Reviewed-by: Lukasz Majewski <lukma@denx.de>

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171122/8278f9c4/attachment.sig>

  reply	other threads:[~2017-11-22  9:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20171121151316epcas1p2f87ac6bca7b8cbd31b9270775443241d@epcas1p2.samsung.com>
2017-11-21 15:13 ` [U-Boot] [PATCH 0/5] mmc: fixes for HS200/UHS core support Jean-Jacques Hiblot
2017-11-21 15:13   ` [U-Boot] [PATCH 1/5] dm: mmc: updated mmc_of_parse() to not fail because of an invalid bus-width Jean-Jacques Hiblot
2017-11-22  9:07     ` Lukasz Majewski
2017-11-24 22:36     ` Simon Glass
2017-11-21 15:13   ` [U-Boot] [PATCH 2/5] mmc: dm: support "mmc-ddr-1_2v" and "mmc-hs200-1_2v" boolean properties Jean-Jacques Hiblot
2017-11-22  9:08     ` Lukasz Majewski
2017-11-24 22:36     ` Simon Glass
2017-11-21 15:13   ` [U-Boot] [PATCH 3/5] mmc: dump card and host capabilities if debug is enabled Jean-Jacques Hiblot
2017-11-22  9:08     ` Lukasz Majewski [this message]
2017-11-24 22:36     ` Simon Glass
2017-11-21 15:13   ` [U-Boot] [PATCH 4/5] mmc: Fixed a problem with old sd or mmc that do not support High speed Jean-Jacques Hiblot
2017-11-22  9:09     ` Lukasz Majewski
2017-11-24 22:36     ` Simon Glass
2017-11-21 15:13   ` [U-Boot] [PATCH 5/5] mmc: all hosts support 1-bit bus width and legacy timings Jean-Jacques Hiblot
2017-11-22  9:09     ` Lukasz Majewski
2017-11-24 22:36     ` Simon Glass
2017-11-27  8:47       ` Jean-Jacques Hiblot
2017-11-22 12:09   ` [U-Boot] [PATCH 0/5] mmc: fixes for HS200/UHS core support Jaehoon Chung
2017-11-22 14:00     ` Marek Vasut
2017-11-23 14:52       ` Jean-Jacques Hiblot
2017-11-23 14:55         ` Marek Vasut
2017-11-24  6:01           ` Jaehoon Chung
2017-11-27  9:45         ` Jaehoon Chung

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=20171122100850.44ba3df8@jawa \
    --to=lukma@denx.de \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox