From: Matej Kupljen <matej.kupljen@ultra.si>
To: Jordan Crouse <jordan.crouse@amd.com>
Cc: linux-mips@linux-mips.org, linux-usb-devel@lists.sourceforge.net,
matthias.lenk@amd.com
Subject: Re: ALCHEMY: AU1200 USB Host Controller (OHCI/EHCI)
Date: Wed, 04 Jan 2006 13:12:06 +0100 [thread overview]
Message-ID: <1136376726.27748.32.camel@localhost.localdomain> (raw)
In-Reply-To: <20060103155447.GI15770@cosmic.amd.com>
Hi
(After some confusion about kernel version, I think I found the
problem, sorry about that).
I used binutils 2.15 and 2.16.1, but did not work.
The code in the ehci-hcd.c looks like this:
----------------------------------------------------------------------------
ehci->periodic_size = DEFAULT_I_TDPS;
if ((retval = ehci_mem_init(ehci, GFP_KERNEL)) < 0)
return retval;
/* controllers may cache some of the periodic schedule ... */
hcc_params = readl(&ehci->caps->hcc_params);
if (HCC_ISOC_CACHE(hcc_params)) // full frame cache
ehci->i_thresh = 8;
else // N microframes cached
ehci->i_thresh = 2 + HCC_ISOC_THRES(hcc_params);
----------------------------------------------------------------------------
The problem is *AFTER* the call to ehci_mem_init, where a read from
ehci->caps->hcc_params is attempted, but caps is NULL.
This can be seen by this assembly code form Insight:
----------------------------------------------------------------------------
0x80350758 jal 0x802a3f40 <memset>
0x8035075c sll a2,a2,0x2
0x80350760 lw v1,0(s0)
0x80350764 lw a2,8(v1)
s0 points to ehci
at offset 0 from ehci is caps
and at offset 8 from caps is hcc_params
----------------------------------------------------------------------------
Where should the caps be initialized?
The only place, where it is set in drivers/usb/ is in
drivers/usb/host/ehci-pci.c:
----------------------------------------------------------------------------
/* called during probe() after chip reset completes */
static int ehci_pci_setup(struct usb_hcd *hcd)
{
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
struct pci_dev *pdev =
to_pci_dev(hcd->self.controller);
u32 temp;
int retval;
ehci->caps = hcd->regs;
----------------------------------------------------------------------------
But the ehci-pci.c is not included in the compilation, because at the
end of ehci-hcd.c we find:
----------------------------------------------------------------------------
#if defined(CONFIG_SOC_AU1X00)
#include "ehci-au1xxx.c"
#elif defined(CONFIG_PCI)
#include "ehci-pci.c"
#else
#error "missing bus glue for ehci-hcd"
#endif
----------------------------------------------------------------------------
What should be done?
I hope this helps.
BR,
Matej
next prev parent reply other threads:[~2006-01-04 12:10 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-08 21:00 ALCHEMY: AU1200 USB Host Controller (OHCI/EHCI) Jordan Crouse
2005-12-10 5:13 ` [linux-usb-devel] " David Brownell
2005-12-10 6:42 ` Pete Popov
2005-12-12 10:51 ` Bora Sahin
2006-01-03 14:25 ` Matej Kupljen
2006-01-03 15:54 ` Jordan Crouse
2006-01-03 21:45 ` Matej Kupljen
2006-01-04 7:18 ` Matej Kupljen
2006-01-04 12:50 ` Sathesh Babu Edara
2006-01-04 12:50 ` Sathesh Babu Edara
2006-01-04 13:06 ` Kevin D. Kissell
2006-01-09 4:54 ` LL and SC instruction simulation Sathesh Babu Edara
2006-01-09 4:54 ` Sathesh Babu Edara
2006-01-09 7:43 ` Sathesh Babu Edara
2006-01-09 7:43 ` RE: Sathesh Babu Edara
2006-01-09 7:49 ` LL and SC instruction simulation Sathesh Babu Edara
2006-01-09 7:49 ` Sathesh Babu Edara
2006-01-09 14:54 ` Ralf Baechle
2006-01-09 15:17 ` Kevin D. Kissell
2006-01-09 15:17 ` Kevin D. Kissell
2006-01-09 15:21 ` Ralf Baechle
2006-01-09 15:30 ` Ralf Baechle
2006-01-09 15:47 ` Kevin D. Kissell
2006-01-09 15:47 ` Kevin D. Kissell
2006-01-09 15:51 ` Ralf Baechle
2006-01-09 9:00 ` Kevin D. Kissell
2006-01-09 9:00 ` Re: Kevin D. Kissell
2006-01-09 21:23 ` [processor frequency] Wolfgang Denk
2006-01-09 21:53 ` Kevin D. Kissell
2006-01-09 23:01 ` Wolfgang Denk
2006-01-04 12:12 ` Matej Kupljen [this message]
2006-01-04 12:32 ` ALCHEMY: AU1200 USB Host Controller (OHCI/EHCI) Matthias Lenk
2006-01-04 13:07 ` Matej Kupljen
2006-01-04 13:54 ` bora.sahin
2006-01-04 14:17 ` Matej Kupljen
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=1136376726.27748.32.camel@localhost.localdomain \
--to=matej.kupljen@ultra.si \
--cc=jordan.crouse@amd.com \
--cc=linux-mips@linux-mips.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=matthias.lenk@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox