Skip to content

Commit ca04fff

Browse files
bastien-curutchetstorulf
authored andcommitted
mmc: davinci_mmc: report all possible bus widths
A dev_info() at probe's end() report the supported bus width. It never reports 8-bits width while the driver can handle it. Update the info message at then end of the probe to report the use of 8-bits data when needed. Signed-off-by: Bastien Curutchet <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 796826b commit ca04fff

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

drivers/mmc/host/davinci_mmc.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ static int davinci_mmcsd_probe(struct platform_device *pdev)
11871187
struct mmc_davinci_host *host = NULL;
11881188
struct mmc_host *mmc = NULL;
11891189
struct resource *r, *mem = NULL;
1190-
int ret, irq;
1190+
int ret, irq, bus_width;
11911191
size_t mem_size;
11921192
const struct platform_device_id *id_entry;
11931193

@@ -1317,9 +1317,14 @@ static int davinci_mmcsd_probe(struct platform_device *pdev)
13171317

13181318
rename_region(mem, mmc_hostname(mmc));
13191319

1320+
if (mmc->caps & MMC_CAP_8_BIT_DATA)
1321+
bus_width = 8;
1322+
else if (mmc->caps & MMC_CAP_4_BIT_DATA)
1323+
bus_width = 4;
1324+
else
1325+
bus_width = 1;
13201326
dev_info(mmc_dev(host->mmc), "Using %s, %d-bit mode\n",
1321-
host->use_dma ? "DMA" : "PIO",
1322-
(mmc->caps & MMC_CAP_4_BIT_DATA) ? 4 : 1);
1327+
host->use_dma ? "DMA" : "PIO", bus_width);
13231328

13241329
return 0;
13251330

0 commit comments

Comments
 (0)