lkml.org 
[lkml]   [2006]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [linux-usb-devel] compile error when building multiple EHCI host controllers as modules
Date
On Thursday 23 March 2006 2:26 pm, Kumar Gala wrote:

> "ehci-pci.c". I was wondering if there were an thoughts on how to
> address this so I can build as a module.

Hmm, there was a patch to fix that for OHCI a while back, I'm not
sure what happened to it. Maybe the cleaned up version just never
got posted as promised.

The problem is that there need to be two different init (and exit)
section routines for the bus glue: platform_bus and/or pci_bus.

PCs typically just have PCI; battery-oriented SOCs tend to never
have PCI; and we're now starting to see some non-battery SOCs that
include PCI support as well as integrated USB host support.

The *hci-hcd.c file should be converted to have a single module_init()
and module_exit() routine at the end, looking something like

static int __init Xhci_init(void)
{
int status;

/* various shared stuff, dump version etc */

/* SOCs usually use only this path */
status = Xhci_platform_register();
if (status < 0)
return status;

/* PCs, and a few higher powered SOCs, use this */
status = Xhci_pci_register();
if (status < 0)
Xhci_platform_unregister();
return status;
}
module_init(Xhci_init);

Likewise for module_exit. The #includes for the platform-specific glue
(including PCI) would define those Xhci_platform_*() routine, and it's
a simple bit of #ifdeffery to make sure there's always at least some
NOP default available for those.

- Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-24 07:35    [W:0.071 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site