From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Wed, 22 Nov 2017 10:08:50 +0100 Subject: [U-Boot] [PATCH 3/5] mmc: dump card and host capabilities if debug is enabled In-Reply-To: <1511277188-2923-4-git-send-email-jjhiblot@ti.com> References: <1511277188-2923-1-git-send-email-jjhiblot@ti.com> <1511277188-2923-4-git-send-email-jjhiblot@ti.com> Message-ID: <20171122100850.44ba3df8@jawa> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, 21 Nov 2017 16:13:06 +0100 Jean-Jacques Hiblot wrote: > This is a useful information while debugging the initialization > process or performance issues. > > Signed-off-by: Jean-Jacques Hiblot > --- > 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 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: