Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/sunxi Try to acquire vmmc-supply if present



details:   https://anonhg.NetBSD.org/src/rev/9c1548698f63
branches:  trunk
changeset: 838084:9c1548698f63
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Wed Jan 02 17:28:18 2019 +0000

description:
Try to acquire vmmc-supply if present

diffstat:

 sys/arch/arm/sunxi/sunxi_mmc.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (45 lines):

diff -r 80e9ae41bf96 -r 9c1548698f63 sys/arch/arm/sunxi/sunxi_mmc.c
--- a/sys/arch/arm/sunxi/sunxi_mmc.c    Wed Jan 02 16:32:59 2019 +0000
+++ b/sys/arch/arm/sunxi/sunxi_mmc.c    Wed Jan 02 17:28:18 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_mmc.c,v 1.28 2018/11/09 14:39:51 jmcneill Exp $ */
+/* $NetBSD: sunxi_mmc.c,v 1.29 2019/01/02 17:28:18 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
 #include "opt_sunximmc.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_mmc.c,v 1.28 2018/11/09 14:39:51 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_mmc.c,v 1.29 2019/01/02 17:28:18 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -190,6 +190,7 @@
        struct fdtbus_gpio_pin *sc_gpio_wp;
        int sc_gpio_wp_inverted;
 
+       struct fdtbus_regulator *sc_reg_vmmc;
        struct fdtbus_regulator *sc_reg_vqmmc;
 
        struct fdtbus_mmc_pwrseq *sc_pwrseq;
@@ -328,8 +329,6 @@
 
        sc->sc_rst_ahb = fdtbus_reset_get(phandle, "ahb");
 
-       sc->sc_reg_vqmmc = fdtbus_regulator_acquire(phandle, "vqmmc-supply");
-
        sc->sc_pwrseq = fdtbus_mmc_pwrseq_get(phandle);
 
        if (clk_enable(sc->sc_clk_ahb) != 0 ||
@@ -362,6 +361,9 @@
        aprint_naive("\n");
        aprint_normal(": SD/MMC controller\n");
 
+       sc->sc_reg_vmmc = fdtbus_regulator_acquire(phandle, "vmmc-supply");
+       sc->sc_reg_vqmmc = fdtbus_regulator_acquire(phandle, "vqmmc-supply");
+
        sc->sc_gpio_cd = fdtbus_gpio_acquire(phandle, "cd-gpios",
            GPIO_PIN_INPUT);
        sc->sc_gpio_wp = fdtbus_gpio_acquire(phandle, "wp-gpios",



Home | Main Index | Thread Index | Old Index