Module Name:    src
Committed By:   kiyohara
Date:           Mon Dec 24 06:53:26 UTC 2012

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

Log Message:
Set some properties for ehci.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 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.45 src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.46
--- src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.45	Wed Dec 12 19:47:44 2012
+++ src/sys/arch/evbarm/gumstix/gumstix_machdep.c	Mon Dec 24 06:53:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: gumstix_machdep.c,v 1.45 2012/12/12 19:47:44 matt Exp $ */
+/*	$NetBSD: gumstix_machdep.c,v 1.46 2012/12/24 06:53:26 kiyohara Exp $ */
 /*
  * Copyright (C) 2005, 2006, 2007  WIDE Project and SOUM Corporation.
  * All rights reserved.
@@ -549,7 +549,7 @@ initarm(void *arg)
 	kgdb_port_init();
 #endif
 
-        /*
+	/*
 	 * Examine the boot args string for options we need to know about
 	 * now.
 	 */
@@ -652,7 +652,7 @@ initarm(void *arg)
 
 #ifdef VERBOSE_INIT_ARM
 	printf("freestart = 0x%08lx, free_pages = %d (0x%08x)\n",
-	       physical_freestart, free_pages, free_pages);
+	    physical_freestart, free_pages, free_pages);
 #endif
 
 	/* Define a macro to simplify memory allocation */
@@ -867,7 +867,7 @@ initarm(void *arg)
 	/* Switch tables */
 #ifdef VERBOSE_INIT_ARM
 	printf("freestart = 0x%08lx, free_pages = %d (0x%x)\n",
-	       physical_freestart, free_pages, free_pages);
+	    physical_freestart, free_pages, free_pages);
 	printf("switching to new L1 page table  @%#lx...", kernel_l1pt.pv_pa);
 #endif
 
@@ -1329,19 +1329,32 @@ kgdb_port_init(void)
 static void
 gumstix_device_register(device_t dev, void *aux)
 {
+	prop_dictionary_t dict = device_properties(dev);
 
+	if (device_is_a(dev, "ehci")) {
+		prop_dictionary_set_cstring(dict, "port0-mode", "none");
+		prop_dictionary_set_cstring(dict, "port1-mode", "phy");
+		prop_dictionary_set_cstring(dict, "port2-mode", "none");
+		prop_dictionary_set_bool(dict, "phy-reset", true);
+		prop_dictionary_set_int16(dict, "port0-gpio", -1);
+		prop_dictionary_set_int16(dict, "port1-gpio", 183);
+		prop_dictionary_set_int16(dict, "port2-gpio", -1);
+		prop_dictionary_set_uint16(dict, "dpll5-m", 120);
+		prop_dictionary_set_uint16(dict, "dpll5-n", 12);
+		prop_dictionary_set_uint16(dict, "dpll5-m2", 1);
+	}
 	if (device_is_a(dev, "ohci")) {
-		if (prop_dictionary_set_bool(device_properties(dev),
+		if (prop_dictionary_set_bool(dict,
 		    "Ganged-power-mask-on-port1", 1) == false) {
 			printf("WARNING: unable to set power-mask for port1"
 			    " property for %s\n", device_xname(dev));
 		}
-		if (prop_dictionary_set_bool(device_properties(dev),
+		if (prop_dictionary_set_bool(dict,
 		    "Ganged-power-mask-on-port2", 1) == false) {
 			printf("WARNING: unable to set power-mask for port2"
 			    " property for %s\n", device_xname(dev));
 		}
-		if (prop_dictionary_set_bool(device_properties(dev),
+		if (prop_dictionary_set_bool(dict,
 		    "Ganged-power-mask-on-port3", 1) == false) {
 			printf("WARNING: unable to set power-mask for port3"
 			    " property for %s\n", device_xname(dev));

Reply via email to