Module Name:    src
Committed By:   kiyohara
Date:           Sat Jul 10 08:26:34 UTC 2010

Modified Files:
        src/sys/arch/evbarm/gumstix: gumstix_machdep.c

Log Message:
Add gumstix_device_register().  Set properties for pxa2x0_ohci here.
However this properties not used in NetBSD source tree.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/evbarm/gumstix/gumstix_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/gumstix/gumstix_machdep.c
diff -u src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.27 src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.28
--- src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.27	Sat Jul 10 08:17:48 2010
+++ src/sys/arch/evbarm/gumstix/gumstix_machdep.c	Sat Jul 10 08:26:34 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: gumstix_machdep.c,v 1.27 2010/07/10 08:17:48 kiyohara Exp $ */
+/*	$NetBSD: gumstix_machdep.c,v 1.28 2010/07/10 08:26:34 kiyohara Exp $ */
 /*
  * Copyright (C) 2005, 2006, 2007  WIDE Project and SOUM Corporation.
  * All rights reserved.
@@ -268,6 +268,7 @@
 #ifdef KGDB
 static void	kgdb_port_init(void);
 #endif
+static void	gumstix_device_register(device_t, void *);
 
 bs_protos(bs_notimpl);
 
@@ -983,6 +984,9 @@
 		Debugger();
 #endif
 
+	/* We have our own device_register() */
+	evbarm_device_register = gumstix_device_register;
+
 	/* We return the new stack pointer address */
 	return(kernelstack.pv_va + USPACE_SVC_STACK_TOP);
 }
@@ -1295,3 +1299,26 @@
 #endif
 }
 #endif
+
+static void
+gumstix_device_register(device_t dev, void *aux)
+{
+
+	if (device_is_a(dev, "ohci")) {
+		if (prop_dictionary_set_bool(device_properties(dev),
+		    "Ganged-power-mask-on-port1", 1) == false) {
+			printf("WARNING: unable to set power-mask for port1"
+			    " property for %s\n", dev->dv_xname);
+		}
+		if (prop_dictionary_set_bool(device_properties(dev),
+		    "Ganged-power-mask-on-port2", 1) == false) {
+			printf("WARNING: unable to set power-mask for port2"
+			    " property for %s\n", dev->dv_xname);
+		}
+		if (prop_dictionary_set_bool(device_properties(dev),
+		    "Ganged-power-mask-on-port3", 1) == false) {
+			printf("WARNING: unable to set power-mask for port3"
+			    " property for %s\n", dev->dv_xname);
+		}
+	}
+}

Reply via email to