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 Set some properties for ehci.
details: https://anonhg.NetBSD.org/src/rev/4c4db9056c01
branches: trunk
changeset: 783478:4c4db9056c01
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Mon Dec 24 06:53:26 2012 +0000
description:
Set some properties for ehci.
diffstat:
sys/arch/evbarm/gumstix/gumstix_machdep.c | 27 ++++++++++++++++++++-------
1 files changed, 20 insertions(+), 7 deletions(-)
diffs (72 lines):
diff -r 1a03b58d0577 -r 4c4db9056c01 sys/arch/evbarm/gumstix/gumstix_machdep.c
--- a/sys/arch/evbarm/gumstix/gumstix_machdep.c Mon Dec 24 06:50:35 2012 +0000
+++ b/sys/arch/evbarm/gumstix/gumstix_machdep.c Mon Dec 24 06:53:26 2012 +0000
@@ -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 @@
kgdb_port_init();
#endif
- /*
+ /*
* Examine the boot args string for options we need to know about
* now.
*/
@@ -652,7 +652,7 @@
#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 @@
/* 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 @@
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));
Home |
Main Index |
Thread Index |
Old Index