• Ulf Hansson's avatar
    mmc: sdhci: Restore behavior while creating OCR mask · 5fd26c7e
    Ulf Hansson authored
    Commit 3a48edc4 ("mmc: sdhci: Use mmc core regulator infrastucture")
    changed the behavior for how to assign the ocr_avail mask for the mmc
    host. More precisely it started to mask the bits instead of assigning
    them.
    
    Restore the behavior, but also make it clear that an OCR mask created
    from an external regulator overrides the other ones. The OCR mask is
    determined by one of the following with this priority:
    
    1. Supported ranges of external regulator if one supplies VDD
    2. Host OCR mask if set by the driver (based on DT properties)
    3. The capabilities reported by the controller itself
    
    Fixes: 3a48edc4 ("mmc: sdhci: Use mmc core regulator infrastucture")
    Cc: Tim Kryger <tim.kryger@gmail.com>
    Reported-by: default avatarYangbo Lu <yangbo.lu@freescale.com>
    Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    Reviewed-by: default avatarTim Kryger <tim.kryger@gmail.com>
    5fd26c7e
sdhci.c 91 KB