Refactor USB Host Drivers
The USB stack in the linux kernel is currently written such that only one USB controller can be built at a time, regardless of whether it is modular or a static-linked driver. This is due to legacy code that was expanded over time with build-time interface implementations that are selected based on controller type. From the code (drivers/
#ifdef CONFIG_USB_EHCI_MXC
#include "ehci-mxc.c"
#define PLATFORM_DRIVER ehci_mxc_driver
#endif
#ifdef CONFIG_
#include "ehci-omap.c"
#define PLATFORM_DRIVER ehci_hcd_
#endif
From drivers/
#ifdef CONFIG_PCI
#include "ohci-pci.c"
#define PCI_DRIVER ohci_pci_driver
#endif
#if defined(
#include "ohci-sa1111.c"
#define SA1111_DRIVER ohci_hcd_
#endif
#if defined(
#include "ohci-s3c2410.c"
#define PLATFORM_DRIVER ohci_hcd_
#endif
#ifdef CONFIG_
#include "ohci-exynos.c"
#define PLATFORM_DRIVER exynos_ohci_driver
#endif
Due to this limitation, even if we build a kernel that boots on multiple SOCs, it will be limited to only supporting the USB controller on one of these. This blueprint tracks the refactoring of the USB host code to allow building of individual controllers as low level bus interface modules.
Blueprint information
- Status:
- Complete
- Approver:
- Arnd Bergmann
- Priority:
- High
- Drafter:
- None
- Direction:
- Approved
- Assignee:
- manjunath goudar
- Definition:
- Approved
- Series goal:
- Accepted for kernel-merge-window
- Implementation:
- Implemented
- Milestone target:
- 3.11
- Started by
- Jakub Pavelek
- Completed by
- Jakub Pavelek
Related branches
Related bugs
Sprints
Whiteboard
Meta:
Roadmap id: KWG2011-
Headline: Refactor USB stack to allow building of multiple controllers at once
Acceptance:
* Code is merged upstream into Linux tip tree.
* upstream GIT commit link or hash logged here for verification
[jakub-pavelek 2013-02-25] moved from 3.9 to 3.10
[arnd-arndb-de] all EHCI patches aside from tegra and mmp are merged into 3.10
as of 9fc377799bc9bfd
[jakub-pavelek 2013-05-10] Moving from 3.10 to 3.11 for completion. Thanks for the updates.
Work Items
Work items for 12.12:
Analyzing ehci-hcd and echi-omap source code (Dec 7): DONE
Studying existing ehci-platform,
Write OMAP MXC and Spear host controller driver to separate from ehci-hcd host code into its own driver module and patch is submitted to linaro (Dec 28): DONE
Work items for 13.01:
Write Orine host controller driver to separate from ehci-hcd host code into its own driver module (Jan 04): DONE
Prepare EHCI driver for conversion according to discussion: DONE
Write Tegra host controller driver to separate from ehci-hcd host code into its own driver module : DONE
Split out all platform glue code from EHCI driver: DONE
Work items for backlog:
Prepare OHCI driver for conversion according to discussion: TODO
Split out all platform glue code from OHCI driver: TODO
Agree on approach for UHCI driver: TODO
Decide on approach for MUSB driver: TODO
Implement a way for multiple MUSB platform drivers to coexist: TODO
Implement a way for multiple MUSB DMA implementation to coexist: TODO
Get patches accepted by Alan Stern and GregKH: TODO
Get patches accepted into the mainline kernel: TODO
Dependency tree
* Blueprints in grey have been implemented.