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 Enable vmmc-supply if present
details: https://anonhg.NetBSD.org/src/rev/0c3f34fd7e18
branches: trunk
changeset: 451569:0c3f34fd7e18
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Mon May 27 23:27:01 2019 +0000
description:
Enable vmmc-supply if present
diffstat:
sys/arch/arm/sunxi/sunxi_mmc.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r 99179ce45aa1 -r 0c3f34fd7e18 sys/arch/arm/sunxi/sunxi_mmc.c
--- a/sys/arch/arm/sunxi/sunxi_mmc.c Mon May 27 23:26:42 2019 +0000
+++ b/sys/arch/arm/sunxi/sunxi_mmc.c Mon May 27 23:27:01 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_mmc.c,v 1.32 2019/01/03 15:34:41 jmcneill Exp $ */
+/* $NetBSD: sunxi_mmc.c,v 1.33 2019/05/27 23:27:01 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.32 2019/01/03 15:34:41 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_mmc.c,v 1.33 2019/05/27 23:27:01 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -358,10 +358,15 @@
return;
}
+ sc->sc_reg_vmmc = fdtbus_regulator_acquire(phandle, "vmmc-supply");
+ if (sc->sc_reg_vmmc != NULL && fdtbus_regulator_enable(sc->sc_reg_vmmc)) {
+ aprint_error(": couldn't enable vmmc-supply\n");
+ return;
+ }
+
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",
Home |
Main Index |
Thread Index |
Old Index