From: Rodolfo Giometti <giometti@linux.it>
To: Pete Popov <ppopov@embeddedalley.com>
Cc: "'linux-mips@linux-mips.org'" <linux-mips@linux-mips.org>
Subject: Re: USB hangs on AU1100
Date: Fri, 6 May 2005 16:27:19 +0200 [thread overview]
Message-ID: <20050506142719.GA13148@enneenne.com> (raw)
In-Reply-To: <1115311361.1614.6.camel@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 2340 bytes --]
On Thu, May 05, 2005 at 09:42:41AM -0700, Pete Popov wrote:
> It sounds like this is a custom Au1100 based board? What boot code are
> you running? I'm guessing the SOC isn't setup correctly or you have a
> HW problem.
Yes, you was right, I missing to setup USB clock... I just added this
code to the board init function (board_setup() function) and now USB
works:
#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_AU1X00_USB_DEVICE)
/* zero and disable FREQ2 */
sys_freqctrl = au_readl(SYS_FREQCTRL0);
sys_freqctrl &= ~0xFFF00000;
au_writel(sys_freqctrl, SYS_FREQCTRL0);
/* zero and disable USBH/USBD/IrDA clock */
sys_clksrc = au_readl(SYS_CLKSRC);
sys_clksrc &= ~0x0000001F;
au_writel(sys_clksrc, SYS_CLKSRC);
sys_freqctrl = au_readl(SYS_FREQCTRL0);
sys_freqctrl &= ~0xFFF00000;
sys_clksrc = au_readl(SYS_CLKSRC);
sys_clksrc &= ~0x0000001F;
/* FREQ2 = aux/2 = 48 MHz */
sys_freqctrl |= ((0<<22) | (1<<21) | (1<<20));
au_writel(sys_freqctrl, SYS_FREQCTRL0);
/* Route 48MHz FREQ2 into USBH/USBD/IrDA */
sys_clksrc |= ((4<<2) | (0<<1) | 0 );
au_writel(sys_clksrc, SYS_CLKSRC);
/* setup the static bus controller */
au_writel(0x00000002, MEM_STCFG3); /* type = PCMCIA */
au_writel(0x280E3D07, MEM_STTIME3); /* 250ns cycle time */
au_writel(0x10000000, MEM_STADDR3); /* any PCMCIA select */
/* Get USB Functionality pin state (device vs host drive pins) */
pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000);
#ifndef CONFIG_AU1X00_USB_DEVICE
/* 2nd USB port is USB host */
pin_func |= 0x8000;
#endif
au_writel(pin_func, SYS_PINFUNC);
#endif /* defined (CONFIG_USB_OHCI_HCD) || defined (CONFIG_AU1X00_USB_DEVICE) */
But don't you think is better to put this code into USB driver (file
ohci-au1xxx.c) during probing stage? In this manner each platforms may
don't worry about clock initialization...
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti@linux.it
Linux Device Driver giometti@enneenne.com
Embedded Systems home page: giometti.enneenne.com
UNIX programming phone: +39 349 2432127
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2005-05-06 14:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-05 15:54 USB hangs on AU1100 Rodolfo Giometti
2005-05-05 16:42 ` Pete Popov
2005-05-05 17:20 ` Thiemo Seufer
2005-05-05 17:51 ` Maciej W. Rozycki
2005-05-05 18:50 ` Pete Popov
2005-05-05 17:56 ` Ulrich Teichert
2005-05-05 17:56 ` Ulrich Teichert
2005-05-05 19:18 ` Thiemo Seufer
2005-05-06 9:18 ` Rodolfo Giometti
2005-05-06 14:27 ` Rodolfo Giometti [this message]
2005-05-06 14:54 ` Dan Malek
2005-05-06 15:51 ` Pete Popov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050506142719.GA13148@enneenne.com \
--to=giometti@linux.it \
--cc=linux-mips@linux-mips.org \
--cc=ppopov@embeddedalley.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.