diff --git a/sys/dev/mmc/mmc.c b/sys/dev/mmc/mmc.c index d89af3bc784f..c3f96c9adb3a 100644 --- a/sys/dev/mmc/mmc.c +++ b/sys/dev/mmc/mmc.c @@ -239,8 +239,8 @@ mmc_rescan_cards(struct mmc_softc *sc) static uint32_t mmc_select_vdd(struct mmc_softc *sc, uint32_t ocr) { - // XXX - return ocr; + + return ocr & MMC_OCR_VOLTAGE; } static int diff --git a/sys/dev/mmc/mmcreg.h b/sys/dev/mmc/mmcreg.h index 1b868cbaffb8..fddaf9763583 100644 --- a/sys/dev/mmc/mmcreg.h +++ b/sys/dev/mmc/mmcreg.h @@ -292,6 +292,7 @@ struct mmc_request { * * The MMC_OCR_CCS appears to be valid for only SD cards. */ +#define MMC_OCR_VOLTAGE 0x3fffffffU /* Vdd Voltage mask */ #define MMC_OCR_LOW_VOLTAGE (1u << 7) /* Low Voltage Range -- tbd */ #define MMC_OCR_200_210 (1U << 8) /* Vdd voltage 2.00 ~ 2.10 */ #define MMC_OCR_210_220 (1U << 9) /* Vdd voltage 2.10 ~ 2.20 */