Module Name:    src
Committed By:   jmcneill
Date:           Sat Sep 13 01:36:07 UTC 2014

Modified Files:
        src/sys/arch/evbarm/awin: awin_machdep.c

Log Message:
usb0drv is >PB9 for cubie2


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/awin/awin_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/awin/awin_machdep.c
diff -u src/sys/arch/evbarm/awin/awin_machdep.c:1.8 src/sys/arch/evbarm/awin/awin_machdep.c:1.9
--- src/sys/arch/evbarm/awin/awin_machdep.c:1.8	Wed Sep 10 07:39:17 2014
+++ src/sys/arch/evbarm/awin/awin_machdep.c	Sat Sep 13 01:36:07 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: awin_machdep.c,v 1.8 2014/09/10 07:39:17 skrll Exp $ */
+/*	$NetBSD: awin_machdep.c,v 1.9 2014/09/13 01:36:07 jmcneill Exp $ */
 
 /*
  * Machine dependent functions for kernel setup for TI OSK5912 board.
@@ -125,7 +125,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: awin_machdep.c,v 1.8 2014/09/10 07:39:17 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awin_machdep.c,v 1.9 2014/09/13 01:36:07 jmcneill Exp $");
 
 #include "opt_machdep.h"
 #include "opt_ddb.h"
@@ -591,8 +591,15 @@ awin_device_register(device_t self, void
 		 */
 		prop_dictionary_set_cstring(dict, "satapwren",
 		    (cubietruck_p ? ">PH12" : ">PB8"));
-		prop_dictionary_set_cstring(dict, "usb0drv",
-		    (cubietruck_p ? ">PH17" : ">PB2"));
+#if AWIN_BOARD == AWIN_cubieboard || AWIN_board == AWIN_cubietruck
+		if (cubietruck_p) {
+			prop_dictionary_set_cstring(dict, "usb0drv", ">PH17");
+		} else if (awin_chip_id() == AWIN_CHIP_ID_A20) {
+			prop_dictionary_set_cstring(dict, "usb0drv", ">PB9");
+		} else {
+			prop_dictionary_set_cstring(dict, "usb0drv", ">PB2");
+		}
+#endif
 		prop_dictionary_set_cstring(dict, "usb2drv", ">PH3");
 		prop_dictionary_set_cstring(dict, "usb0iddet",
 		    (cubietruck_p ? "<PH19" : "<PH4"));

Reply via email to