mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 09:02:06 +00:00
usb: Add Device Tree support to XHCI Platform driver
Add Device Tree match table to xhci-plat.c. Add DT bindings document. Signed-off-by: Al Cooper <alcooperx@gmail.com> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
This commit is contained in:
parent
5b146f7e01
commit
1fe6c4524f
2 changed files with 24 additions and 0 deletions
14
Documentation/devicetree/bindings/usb/usb-xhci.txt
Normal file
14
Documentation/devicetree/bindings/usb/usb-xhci.txt
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
USB xHCI controllers
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- compatible: should be "xhci-platform".
|
||||||
|
- reg: should contain address and length of the standard XHCI
|
||||||
|
register set for the device.
|
||||||
|
- interrupts: one XHCI interrupt should be described here.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
usb@f0931000 {
|
||||||
|
compatible = "xhci-platform";
|
||||||
|
reg = <0xf0931000 0x8c8>;
|
||||||
|
interrupts = <0x0 0x4e 0x0>;
|
||||||
|
};
|
|
@ -14,6 +14,7 @@
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
#include <linux/of.h>
|
||||||
|
|
||||||
#include "xhci.h"
|
#include "xhci.h"
|
||||||
|
|
||||||
|
@ -211,12 +212,21 @@ static const struct dev_pm_ops xhci_plat_pm_ops = {
|
||||||
#define DEV_PM_OPS NULL
|
#define DEV_PM_OPS NULL
|
||||||
#endif /* CONFIG_PM */
|
#endif /* CONFIG_PM */
|
||||||
|
|
||||||
|
#ifdef CONFIG_OF
|
||||||
|
static const struct of_device_id usb_xhci_of_match[] = {
|
||||||
|
{ .compatible = "xhci-platform" },
|
||||||
|
{ },
|
||||||
|
};
|
||||||
|
MODULE_DEVICE_TABLE(of, usb_xhci_of_match);
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct platform_driver usb_xhci_driver = {
|
static struct platform_driver usb_xhci_driver = {
|
||||||
.probe = xhci_plat_probe,
|
.probe = xhci_plat_probe,
|
||||||
.remove = xhci_plat_remove,
|
.remove = xhci_plat_remove,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "xhci-hcd",
|
.name = "xhci-hcd",
|
||||||
.pm = DEV_PM_OPS,
|
.pm = DEV_PM_OPS,
|
||||||
|
.of_match_table = of_match_ptr(usb_xhci_of_match),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
MODULE_ALIAS("platform:xhci-hcd");
|
MODULE_ALIAS("platform:xhci-hcd");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue