aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorArnd Bergmann <[email protected]>2017-03-13 10:18:41 +0800
committerGreg Kroah-Hartman <[email protected]>2017-03-23 08:20:21 +0100
commita8c06e407ef969461b7f51ec72839fe382dd3c29 (patch)
tree427e69f9e100243b8309f387859c861c9691c0cf /include/linux
parentf5cccf49428447dfbc9edb7a04bb8fc316269781 (diff)
usb: separate out sysdev pointer from usb_bus
For xhci-hcd platform device, all the DMA parameters are not configured properly, notably dma ops for dwc3 devices. The idea here is that you pass in the parent of_node along with the child device pointer, so it would behave exactly like the parent already does. The difference is that it also handles all the other attributes besides the mask. sysdev will represent the physical device, as seen from firmware or bus.Splitting the usb_bus->controller field into the Linux-internal device (used for the sysfs hierarchy, for printks and for power management) and a new pointer (used for DMA, DT enumeration and phy lookup) probably covers all that we really need. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Sriram Dash <[email protected]> Tested-by: Baolin Wang <[email protected]> Tested-by: Brian Norris <[email protected]> Tested-by: Alexander Sverdlin <[email protected]> Tested-by: Vivek Gautam <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Peter Chen <[email protected]> Cc: Felipe Balbi <[email protected]> Cc: Grygorii Strashko <[email protected]> Cc: Sinjan Kumar <[email protected]> Cc: David Fisher <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: "Thang Q. Nguyen" <[email protected]> Cc: Yoshihiro Shimoda <[email protected]> Cc: Stephen Boyd <[email protected]> Cc: Bjorn Andersson <[email protected]> Cc: Ming Lei <[email protected]> Cc: Jon Masters <[email protected]> Cc: Dann Frazier <[email protected]> Cc: Peter Chen <[email protected]> Cc: Leo Li <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/usb.h1
-rw-r--r--include/linux/usb/hcd.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 7e68259360de..148752640693 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -354,6 +354,7 @@ struct usb_devmap {
*/
struct usb_bus {
struct device *controller; /* host/master side hardware */
+ struct device *sysdev; /* as seen from firmware or bus */
int busnum; /* Bus number (in order of reg) */
const char *bus_name; /* stable id (PCI slot_name etc) */
u8 uses_dma; /* Does the host controller use DMA? */
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
index dff130151235..a469999a106d 100644
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -437,6 +437,9 @@ extern int usb_hcd_alloc_bandwidth(struct usb_device *udev,
struct usb_host_interface *new_alt);
extern int usb_hcd_get_frame_number(struct usb_device *udev);
+struct usb_hcd *__usb_create_hcd(const struct hc_driver *driver,
+ struct device *sysdev, struct device *dev, const char *bus_name,
+ struct usb_hcd *primary_hcd);
extern struct usb_hcd *usb_create_hcd(const struct hc_driver *driver,
struct device *dev, const char *bus_name);
extern struct usb_hcd *usb_create_shared_hcd(const struct hc_driver *driver,