NetBSD Problem Report #32355

From www@netbsd.org  Wed Dec 21 18:26:16 2005
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
	id 5B46563B976; Wed, 21 Dec 2005 18:26:16 +0000 (UTC)
Message-Id: <20051221182616.5B46563B976@narn.netbsd.org>
Date: Wed, 21 Dec 2005 18:26:16 +0000 (UTC)
From: garrett_damore@tadpole.com
Reply-To: garrett_damore@tadpole.com
To: gnats-bugs@netbsd.org
Subject: USB clocking incorrect for Au1550 boards
X-Send-Pr-Version: www-1.0

>Number:         32355
>Category:       port-evbmips
>Synopsis:       USB clocking incorrect for Au1550 boards
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    gdamore
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 21 18:30:00 +0000 2005
>Closed-Date:    Fri Jan 27 23:12:35 +0000 2006
>Last-Modified:  Fri Jan 27 23:20:01 +0000 2006
>Originator:     Garrett D'Amore
>Release:        3.99.14
>Organization:
Tadpole Computer, Inc.
>Environment:
System: NetBSD cabernet 3.99.14 NetBSD 3.99.14 (PB1000) #0: Wed Dec 21 09:39:37
PST 2005 garrett@zippy:/home/garrett/work/meteor/netbsd/src/sys/arch/evbmips/com
pile/obj/PB1000 evbmips
Architecture: mipsel
Machine: evbmips

>Description:
The USB host is inoperable on Au1550 processors.  The symptom is that when you plug a device in the port, you get a message that says:

uhub0: device problem, disabling port 2

The root problem is that machdep.c tries to set up some clocking for the USB which does not jive with what YAMON has configured, and is incorrect.

YAMON programs USB clocks on both the DBAu1500 and DBAu1550 boards I have, and should not be overridden.  I am not sure about other products, but if they need this clock setup, then it should be conditionalized somehow.  (Board specific logic will be the topic of another PR...)
>How-To-Repeat:
Plug device in.
>Fix:
Remove the clocking setup logic for USB in machdep.c.  I'll send a diff shortly.

>Release-Note:

>Audit-Trail:
From: "Garrett D'Amore" <garrett_damore@tadpole.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-evbmips/32355: USB clocking incorrect for Au1550 boards
Date: Wed, 21 Dec 2005 10:51:44 -0800

 gnats-admin@netbsd.org wrote:

 >Thank you very much for your problem report.
 >It has the internal identification `port-evbmips/32355'.
 >The individual assigned to look at your
 >report is: port-evbmips-maintainer. 
 >
 >  
 >
 >>Category:       port-evbmips
 >>Responsible:    port-evbmips-maintainer
 >>Synopsis:       USB clocking incorrect for Au1550 boards
 >>Arrival-Date:   Wed Dec 21 18:30:00 +0000 2005
 >>    
 >>
 The diffs are posted online at
 http://garrett.damore.org/software/netbsd/diff.32355

 Here they as well:

 Index: machdep.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/evbmips/alchemy/machdep.c,v
 retrieving revision 1.19
 diff -u -r1.19 machdep.c
 --- machdep.c	11 Dec 2005 12:17:11 -0000	1.19
 +++ machdep.c	21 Dec 2005 18:30:59 -0000
 @@ -316,24 +316,6 @@
  	curpcb = &lwp0.l_addr->u_pcb;
  	curpcb->pcb_context[11] = MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */

 -#if NOHCI > 0
 -	{
 -#define	USBH_ALL   (0x1f<<10)  /* All relevant bits in USBH portion of SYS_CLKSRC */
 -		/*
 -		 * Assign a clock for the USB Host controller.
 -		 */
 -		volatile u_int32_t *scsreg, *auxpll;
 -		u_int32_t	tmp;
 -
 -		scsreg = (volatile u_int32_t *)(MIPS_PHYS_TO_KSEG1(SYS_CLKSRC));
 -		auxpll = (volatile u_int32_t *)(MIPS_PHYS_TO_KSEG1(SYS_AUXPLL));
 -		*auxpll = 8;		/* 96Mhz */
 -		tmp = *scsreg;
 -		tmp &= ~USBH_ALL;	/* clear all USBH bits in SYS_CLKSRC first */
 -		tmp |= (SCS_DUH|SCS_CUH|SCS_MUH(SCS_MEx_AUX));	/* 48Mhz */
 -		*scsreg = tmp;
 -	}
 -#endif   /* NOHCI */
  	/*
  	 * Initialize debuggers, and break into them, if appropriate.
  	 */


 Thanks.

 -- 
 Garrett D'Amore                          http://www.tadpolecomputer.com/
 Sr. Staff Engineer          Extending the Power of 64-bit UNIX Computing
 Tadpole Computer, Inc.                             Phone: (951) 325-2134

Responsible-Changed-From-To: port-evbmips-maintainer->gdamore
Responsible-Changed-By: gdamore@netbsd.org
Responsible-Changed-When: Fri, 27 Jan 2006 23:12:35 +0000
Responsible-Changed-Why:
I took possession of the fix myself, now that I have CVS access.


State-Changed-From-To: open->closed
State-Changed-By: gdamore@netbsd.org
State-Changed-When: Fri, 27 Jan 2006 23:12:35 +0000
State-Changed-Why:
Fix committed.


From: Garrett D'Amore <gdamore@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/32355 CVS commit: src/sys/arch/evbmips/alchemy
Date: Fri, 27 Jan 2006 23:05:16 +0000 (UTC)

 Module Name:	src
 Committed By:	gdamore
 Date:		Fri Jan 27 23:05:16 UTC 2006

 Modified Files:
 	src/sys/arch/evbmips/alchemy: machdep.c

 Log Message:
 Fix improper USB clocking (makes USB work on DBAu1550).
 Closes PR port-evbmips/32355.


 To generate a diff of this commit:
 cvs rdiff -r1.22 -r1.23 src/sys/arch/evbmips/alchemy/machdep.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.