Module Name:    src
Committed By:   jmcneill
Date:           Sun Aug 27 17:53:10 UTC 2017

Modified Files:
        src/sys/arch/arm/sunxi: sunxi_mmc.c

Log Message:
"ahb" reset is optional


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/sunxi/sunxi_mmc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/sunxi/sunxi_mmc.c
diff -u src/sys/arch/arm/sunxi/sunxi_mmc.c:1.4 src/sys/arch/arm/sunxi/sunxi_mmc.c:1.5
--- src/sys/arch/arm/sunxi/sunxi_mmc.c:1.4	Fri Aug 25 00:07:03 2017
+++ src/sys/arch/arm/sunxi/sunxi_mmc.c	Sun Aug 27 17:53:10 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_mmc.c,v 1.4 2017/08/25 00:07:03 jmcneill Exp $ */
+/* $NetBSD: sunxi_mmc.c,v 1.5 2017/08/27 17:53:10 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014-2017 Jared McNeill <[email protected]>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_mmc.c,v 1.4 2017/08/25 00:07:03 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_mmc.c,v 1.5 2017/08/27 17:53:10 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -209,10 +209,6 @@ sunxi_mmc_attach(device_t parent, device
 	}
 
 	sc->sc_rst_ahb = fdtbus_reset_get(phandle, "ahb");
-	if (sc->sc_rst_ahb == NULL) {
-		aprint_error(": couldn't get resets\n");
-		return;
-	}
 
 	sc->sc_reg_vqmmc = fdtbus_regulator_acquire(phandle, "vqmmc-supply");
 
@@ -222,9 +218,11 @@ sunxi_mmc_attach(device_t parent, device
 		return;
 	}
 
-	if (fdtbus_reset_deassert(sc->sc_rst_ahb) != 0) {
-		aprint_error(": couldn't de-assert resets\n");
-		return;
+	if (sc->sc_rst_ahb != NULL) {
+		if (fdtbus_reset_deassert(sc->sc_rst_ahb) != 0) {
+			aprint_error(": couldn't de-assert resets\n");
+			return;
+		}
 	}
 
 	sc->sc_dev = self;

Reply via email to