On Sunday, May 20, 2007, Pete Zaitcev wrote:

> On Fri, 18 May 2007 14:23:43 -0700, "Mark Miesfeld" <[EMAIL PROTECTED]> wrote:
> 
> > There is a published errata for the PPC440EPX, USBH_23: EHCI and OHCI
> > Linux module contention.  
> 
> So, you're set for the classic (and unsoluble) inter-module problem,
> but only if you attempt to keep parts accessing OHCI inside 
> the ohci-hcd.
> 
> In short, this is the part which knows when to poke OHCI:
> 
> > 
> > -   } else
> > +#ifdef CONFIG_USB_PPC440EPX_USBH_23_ERRATA
> > +           /* ensure 440EPX ohci controller state is operational */
> > +           ohci_ppc_set_hcfs(HCFS_OPERATIONAL);
> > +#endif
> 
> And this is the part which implements poking:
> 
> > +
> > +   /* write the new state and flush the write. */
> > +   ohci_writel(cached_ohci, hc_control, > &cached_ohci->regs->control);
> > +   (void) ohci_readl(cached_ohci, &cached_ohci->regs->control);
> 
> It looks to me that the second part does not have to be located in
> ohci-hcd. On PPC, ohci_writel only uses the ohci private struct
> to determine the endianness, presumably known in your case. So,
> plain readl can be used. This only leaves the address for readl,
> which comes from ioremap. If PPC allowed aliased ioremaps, you'd
> be golden: just do a second ioremap. Can you do that? Please give
> it a thought.

Yes, that would be much better.  I'll look into doing that.  If I can't, I'll
use your idea below. 

> > +struct ohci_hcd    *cached_ohci = NULL;
> 
> This is just nasty.
> 
> If aliased ioremaps are not possible, you better create a global
> symbol for this in the hcd.c or other core part. Fill the word
> when ohci probes, let ehci use it. Then, see above.

Thanks for the good suggestions. 

--
Mark


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to