Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/evbarm/gumstix Add gumstix_device_register(). Set ...



details:   https://anonhg.NetBSD.org/src/rev/a3faef332f3f
branches:  trunk
changeset: 756270:a3faef332f3f
user:      kiyohara <kiyohara%NetBSD.org@localhost>
date:      Sat Jul 10 08:26:34 2010 +0000

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

diffstat:

 sys/arch/evbarm/gumstix/gumstix_machdep.c |  29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diffs (54 lines):

diff -r c8bdb1c153a0 -r a3faef332f3f sys/arch/evbarm/gumstix/gumstix_machdep.c
--- a/sys/arch/evbarm/gumstix/gumstix_machdep.c Sat Jul 10 08:17:48 2010 +0000
+++ b/sys/arch/evbarm/gumstix/gumstix_machdep.c Sat Jul 10 08:26:34 2010 +0000
@@ -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);
+               }
+       }
+}



Home | Main Index | Thread Index | Old Index