sdhci_fsl_fdt: Skip vccq reconfiguration without regulator

There is no need to preform any voltage reconfiguration
in case the vccq regulator is not physically attached to the
slot.

Submitted by: Lukasz Hajec <lha@semihalf.com>
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential Revision: https://reviews.freebsd.org/D30355
This commit is contained in:
Marcin Wojtas 2021-05-20 11:16:40 +02:00
parent c1a148873d
commit b08bf4c35c

View File

@ -493,15 +493,15 @@ sdhci_fsl_fdt_switch_vccq(device_t brdev, device_t reqdev)
struct sdhci_slot *slot; struct sdhci_slot *slot;
int uvolt, err; int uvolt, err;
err = sdhci_generic_switch_vccq(brdev, reqdev);
if (err != 0)
return (err);
sc = device_get_softc(brdev); sc = device_get_softc(brdev);
if (sc->fdt_helper.vqmmc_supply == NULL) if (sc->fdt_helper.vqmmc_supply == NULL)
return EOPNOTSUPP; return EOPNOTSUPP;
err = sdhci_generic_switch_vccq(brdev, reqdev);
if (err != 0)
return (err);
slot = device_get_ivars(reqdev); slot = device_get_ivars(reqdev);
switch (slot->host.ios.vccq) { switch (slot->host.ios.vccq) {
case vccq_180: case vccq_180: