Module Name:    src
Committed By:   jmcneill
Date:           Sat Nov 14 23:04:30 UTC 2015

Modified Files:
        src/sys/arch/evbarm/tegra: tegra_machdep.c

Log Message:
sleep before asking the PMIC to power off


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/evbarm/tegra/tegra_machdep.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/evbarm/tegra/tegra_machdep.c
diff -u src/sys/arch/evbarm/tegra/tegra_machdep.c:1.27 src/sys/arch/evbarm/tegra/tegra_machdep.c:1.28
--- src/sys/arch/evbarm/tegra/tegra_machdep.c:1.27	Sat Nov 14 13:28:53 2015
+++ src/sys/arch/evbarm/tegra/tegra_machdep.c	Sat Nov 14 23:04:30 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_machdep.c,v 1.27 2015/11/14 13:28:53 jmcneill Exp $ */
+/* $NetBSD: tegra_machdep.c,v 1.28 2015/11/14 23:04:30 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <[email protected]>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_machdep.c,v 1.27 2015/11/14 13:28:53 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_machdep.c,v 1.28 2015/11/14 23:04:30 jmcneill Exp $");
 
 #include "opt_tegra.h"
 #include "opt_machdep.h"
@@ -547,11 +547,11 @@ tegra_powerdown(void)
 #if NAS3722PMIC > 0
 	device_t pmic = device_find_by_driver_unit("as3722pmic", 0);
 	if (pmic != NULL) {
+		delay(1000000);
 		if (as3722_poweroff(pmic) != 0) {
 			printf("WARNING: AS3722 poweroff failed\n");
 			return;
 		}
-		delay(1000000);
 	}
 #endif
 }

Reply via email to