diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2020-03-06 15:01:14 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-08-19 07:34:47 +0200 |
commit | 25c7a033c0a5a595354dc9bc55449f9c390bf3c8 (patch) | |
tree | 9b1e86a0d1317ba244d392ca08f6e56a79cc9fe2 /include/usb/usb.h | |
parent | e17c408b19a57736d4cc3d5bf6f0a2b61b6f3005 (diff) | |
download | barebox-25c7a033c0a5a595354dc9bc55449f9c390bf3c8.tar.gz barebox-25c7a033c0a5a595354dc9bc55449f9c390bf3c8.tar.xz |
usb: Add a slice to usb host controllers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/usb/usb.h')
-rw-r--r-- | include/usb/usb.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/usb/usb.h b/include/usb/usb.h index c2085eae87..39f4750916 100644 --- a/include/usb/usb.h +++ b/include/usb/usb.h @@ -20,6 +20,7 @@ #define _USB_H_ #include <driver.h> +#include <slice.h> #include <usb/ch9.h> #include <usb/ch11.h> #include <usb/usb_defs.h> @@ -163,13 +164,18 @@ struct usb_host { struct device_d *hw_dev; int busnum; struct usb_device *root_dev; - int sem; struct usb_phy *usbphy; + struct slice slice; }; int usb_register_host(struct usb_host *); void usb_unregister_host(struct usb_host *host); +static inline struct slice *usb_device_slice(struct usb_device *udev) +{ + return &udev->host->slice; +} + int usb_host_detect(struct usb_host *host); int usb_set_protocol(struct usb_device *dev, int ifnum, int protocol); |