mci: be more verbose about wrong bus-width
PATCH 1/1 mci: be more verbose about wrong bus-width
If configured or default bus-width is wrong for the current hardware, registration of card/emmc is likely to fail. This patch adds more verbosity in the case of a failed detection:
| omap-hsmmc 48060000.mmc: registered as 48060000.mmc
| mmc0: detected MMC card version 4.41
| mmc0: Changing MMC bus width failed: -110
| mmc0: Card's startup fails with -110Signed-off-by Christoph Fritz <[email protected]>
--- drivers/mci/mci-core.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/mci/mci-core.c +7 -4
@@ -984,7 +984,7 @@ static int mci_startup_sd(struct mci *mci)mci_setup_cmd (&cmd,SD_CMD_APP_SET_BUS_WIDTH ,2 ,MMC_RSP_R1 ); err =mci_send_cmd (mci, &cmd,NULL );if (err) { -dev_dbg (&mci->dev,"Changing SD bus width failed: %d\n" , err); +dev_warn (&mci->dev,"Changing SD bus width failed: %d\n" , err);/* TODO continue with 1 bit? */ return err; }
@@ -1041,8 +1041,11 @@ static int mci_startup_mmc(struct mci *mci) err =mci_switch (mci,EXT_CSD_CMD_SET_NORMAL ,EXT_CSD_BUS_WIDTH , ext_csd_bits[idx]); -if (err) +if (err) { +if (idx ==0 ) +dev_warn (&mci->dev,"Changing MMC bus width failed: %d\n" , err);continue ; + }mci_set_bus_width (mci, bus_widths[idx]);
@@ -1051,7 +1054,7 @@ static int mci_startup_mmc(struct mci *mci)break ; } -return 0 ; +return err; }/**
@@ -1693,7 +1696,7 @@ static int mci_card_probe(struct mci *mci) rc =mci_startup (mci);if (rc) { -dev_dbg (&mci->dev,"Card's startup fails with %d\n" , rc); +dev_warn (&mci->dev,"Card's startup fails with %d\n" , rc); goto on_error; }
Signature · 7 lines
2.1.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 9 lines · Christoph Fritz
If configured or default bus-width is wrong for the current hardware, registration of card/emmc is likely to fail. This patch adds more verbosity in the case of a failed detection:
| omap-hsmmc 48060000.mmc: registered as 48060000.mmc | mmc0: detected MMC card version 4.41 | mmc0: Changing MMC bus width failed: -110 | mmc0: Card's startup fails with -110
Quoted 4 lines
Signed-off-by Christoph Fritz <[email protected]>--- drivers/mci/mci-core.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
Applied, thanks
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox