The ability to do 8-bit implies 4-bit capability too. Rearrange the cases

and add a fallthrough comment to make that happen.
This commit is contained in:
Ian Lepore 2013-11-01 19:29:59 +00:00
parent 4a98e46950
commit 760eb697b4

View File

@ -546,16 +546,17 @@ ti_sdhci_attach(device_t dev)
sc->slot.host.caps &= ~(MMC_CAP_4_BIT_DATA |
MMC_CAP_8_BIT_DATA);
switch (prop) {
case 1:
break;
case 8:
sc->slot.host.caps |= MMC_CAP_8_BIT_DATA;
/* FALLTHROUGH */
case 4:
sc->slot.host.caps |= MMC_CAP_4_BIT_DATA;
break;
case 8:
sc->slot.host.caps |= MMC_CAP_8_BIT_DATA;
case 1:
break;
default:
device_printf(dev, "Bad bus-width value %u\n", prop);
break;
}
}