diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2012-03-13 10:57:41 -0400 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2012-03-13 13:30:59 -0400 |
commit | 3429e91a661e1f383aecc86c6bbcf65afb15c892 (patch) | |
tree | ff3aa3ac0a8cb3ce8190511874a03ab2b13fc8ff /drivers/usb/host/xhci.c | |
parent | fdaf8b3183d126d70f19e13c690c762c65b28a5d (diff) |
usb: host: xhci: add platform driver support
This adds a fairly simple xhci-platform driver support. Currently it is
used by the dwc3 driver for supporting host mode.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r-- | drivers/usb/host/xhci.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index f9f161fa66ad..e1963d4a430f 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -4064,6 +4064,11 @@ static int __init xhci_hcd_init(void) | |||
4064 | printk(KERN_DEBUG "Problem registering PCI driver."); | 4064 | printk(KERN_DEBUG "Problem registering PCI driver."); |
4065 | return retval; | 4065 | return retval; |
4066 | } | 4066 | } |
4067 | retval = xhci_register_plat(); | ||
4068 | if (retval < 0) { | ||
4069 | printk(KERN_DEBUG "Problem registering platform driver."); | ||
4070 | goto unreg_pci; | ||
4071 | } | ||
4067 | /* | 4072 | /* |
4068 | * Check the compiler generated sizes of structures that must be laid | 4073 | * Check the compiler generated sizes of structures that must be laid |
4069 | * out in specific ways for hardware access. | 4074 | * out in specific ways for hardware access. |
@@ -4083,11 +4088,15 @@ static int __init xhci_hcd_init(void) | |||
4083 | BUILD_BUG_ON(sizeof(struct xhci_run_regs) != (8+8*128)*32/8); | 4088 | BUILD_BUG_ON(sizeof(struct xhci_run_regs) != (8+8*128)*32/8); |
4084 | BUILD_BUG_ON(sizeof(struct xhci_doorbell_array) != 256*32/8); | 4089 | BUILD_BUG_ON(sizeof(struct xhci_doorbell_array) != 256*32/8); |
4085 | return 0; | 4090 | return 0; |
4091 | unreg_pci: | ||
4092 | xhci_unregister_pci(); | ||
4093 | return retval; | ||
4086 | } | 4094 | } |
4087 | module_init(xhci_hcd_init); | 4095 | module_init(xhci_hcd_init); |
4088 | 4096 | ||
4089 | static void __exit xhci_hcd_cleanup(void) | 4097 | static void __exit xhci_hcd_cleanup(void) |
4090 | { | 4098 | { |
4091 | xhci_unregister_pci(); | 4099 | xhci_unregister_pci(); |
4100 | xhci_unregister_plat(); | ||
4092 | } | 4101 | } |
4093 | module_exit(xhci_hcd_cleanup); | 4102 | module_exit(xhci_hcd_cleanup); |