From: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] PCI OHCI / testing-USB branch
Date: Wed, 29 Nov 2006 20:16:55 +0100 [thread overview]
Message-ID: <200611292016.55218.matthias.fuchs@esd-electronics.com> (raw)
In-Reply-To: <87lklviu1a.fsf@denx.de>
Hi Markus,
do you see a problem in passing a pointer to the gohci structure to
usb_cpu_init() or at least to usb_board_init()?
In order to get the base address of my PCI OHCI controller I first have to
find the device on the PCI bus. I think usb_board_init() is the right place
for this. But I need &gohci to pass it back to the usb driver.
Here's is what I mean:
diff --git a/drivers/usb_ohci.c b/drivers/usb_ohci.c
index c5e4c38..8afadd1 100644
--- a/drivers/usb_ohci.c
+++ b/drivers/usb_ohci.c
@@ -1680,19 +1680,20 @@ static char ohci_inited = 0;
int usb_lowlevel_init(void)
{
+ memset (&gohci, 0, sizeof (ohci_t));
#ifdef CFG_USB_OHCI_CPU_INIT
/* cpu dependant init */
- if(usb_cpu_init())
+ if(usb_cpu_init(&gohci))
return -1;
#endif
#ifdef CFG_USB_OHCI_BOARD_INIT
/* board dependant init */
- if(usb_board_init())
+ if(usb_board_init(&gohci))
return -1;
#endif
- memset (&gohci, 0, sizeof (ohci_t));
+
memset (&urb_priv, 0, sizeof (urb_priv_t));
/* align the storage */
@@ -1719,8 +1720,10 @@ int usb_lowlevel_init(void)
gohci.disabled = 1;
gohci.sleeping = 0;
gohci.irq = -1;
- gohci.regs = (struct ohci_regs *)CFG_USB_OHCI_REGS_BASE;
+#ifdef CFG_USB_OHCI_REGS_BASE
+ gohci.regs = (struct ohci_regs *)CFG_USB_OHCI_REGS_BASE;
+#endif
gohci.flags = 0;
gohci.slot_name = CFG_USB_OHCI_SLOT_NAME;
Regards
Matthias
On Tuesday 28 November 2006 14:24, Markus Klotzb?cher wrote:
> Dear Robert,
>
> Robert Delien <robert.delien@nxp.com> writes:
> >> > is someone currently working on the testing-USB branch? Does it
> >
> > contain
> >
> >> > the most up to date USB code?
> >>
> >> Yes, and no. I've got a couple of patches for the generic OHCI
> >
> > driver
> >
> >> which have not been merged yet, because I want to do some more
> >> testing. I'll try to do this soon.
> >
> > I was working on that too, but I only started today, so I'm glad I'm
> > reading this posting now instead of two weeks later ;-). Could you
> > please send me your patches, or even post them here? I could help you
> > debugging it...
>
> It's now all in the testing-USB branch. Please also see
> doc/README.generic_usb_ohci for a brief description.
>
> Regards
>
> Markus Klotzbuecher
next prev parent reply other threads:[~2006-11-29 19:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-27 10:04 [U-Boot-Users] PCI OHCI / testing-USB branch Matthias Fuchs
2006-11-27 10:36 ` Markus Klotzbücher
2006-11-28 11:31 ` Robert Delien
2006-11-28 13:24 ` Markus Klotzbücher
2006-11-29 19:16 ` Matthias Fuchs [this message]
2006-11-29 19:51 ` Markus Klotzbücher
2007-06-07 18:31 ` reckless
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=200611292016.55218.matthias.fuchs@esd-electronics.com \
--to=matthias.fuchs@esd-electronics.com \
--cc=u-boot@lists.denx.de \
/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.