git: b08bf4c35caa - main - sdhci_fsl_fdt: Skip vccq reconfiguration without regulator

Marcin Wojtas mw at FreeBSD.org
Thu May 20 09:22:40 UTC 2021


The branch main has been updated by mw:

URL: https://cgit.FreeBSD.org/src/commit/?id=b08bf4c35caa2baaa0453b7979ed538cf71b6de5

commit b08bf4c35caa2baaa0453b7979ed538cf71b6de5
Author:     Marcin Wojtas <mw at FreeBSD.org>
AuthorDate: 2021-05-20 09:16:40 +0000
Commit:     Marcin Wojtas <mw at FreeBSD.org>
CommitDate: 2021-05-20 09:21:53 +0000

    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 at semihalf.com>
    Obtained from: Semihalf
    Sponsored by: Alstom Group
    Differential Revision: https://reviews.freebsd.org/D30355
---
 sys/dev/sdhci/sdhci_fsl_fdt.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys/dev/sdhci/sdhci_fsl_fdt.c b/sys/dev/sdhci/sdhci_fsl_fdt.c
index 26092f662406..91d926c343cc 100644
--- a/sys/dev/sdhci/sdhci_fsl_fdt.c
+++ b/sys/dev/sdhci/sdhci_fsl_fdt.c
@@ -493,15 +493,15 @@ sdhci_fsl_fdt_switch_vccq(device_t brdev, device_t reqdev)
 	struct sdhci_slot *slot;
 	int uvolt, err;
 
-	err = sdhci_generic_switch_vccq(brdev, reqdev);
-	if (err != 0)
-		return (err);
-
 	sc = device_get_softc(brdev);
 
 	if (sc->fdt_helper.vqmmc_supply == NULL)
 		return EOPNOTSUPP;
 
+	err = sdhci_generic_switch_vccq(brdev, reqdev);
+	if (err != 0)
+		return (err);
+
 	slot = device_get_ivars(reqdev);
 	switch (slot->host.ios.vccq) {
 	case vccq_180:


More information about the dev-commits-src-main mailing list