summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/dev/usb/usb_controller.h
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/dev/usb/usb_controller.h')
-rw-r--r--freebsd/sys/dev/usb/usb_controller.h64
1 files changed, 16 insertions, 48 deletions
diff --git a/freebsd/sys/dev/usb/usb_controller.h b/freebsd/sys/dev/usb/usb_controller.h
index 6b15dab9..ad871913 100644
--- a/freebsd/sys/dev/usb/usb_controller.h
+++ b/freebsd/sys/dev/usb/usb_controller.h
@@ -40,7 +40,6 @@ struct usb_page_cache;
struct usb_setup_params;
struct usb_hw_ep_profile;
struct usb_fs_isoc_schedule;
-struct usb_config_descriptor;
struct usb_endpoint_descriptor;
/* typedefs */
@@ -66,7 +65,7 @@ struct usb_bus_methods {
void (*device_suspend) (struct usb_device *);
void (*device_resume) (struct usb_device *);
void (*set_hw_power) (struct usb_bus *);
-
+ void (*set_hw_power_sleep) (struct usb_bus *, uint32_t);
/*
* The following flag is set if one or more control transfers are
* active:
@@ -92,6 +91,18 @@ struct usb_bus_methods {
* are present on the given USB bus:
*/
#define USB_HW_POWER_NON_ROOT_HUB 0x10
+ /*
+ * The following flag is set if we are suspending
+ */
+#define USB_HW_POWER_SUSPEND 0x20
+ /*
+ * The following flag is set if we are resuming
+ */
+#define USB_HW_POWER_RESUME 0x40
+ /*
+ * The following flag is set if we are shutting down
+ */
+#define USB_HW_POWER_SHUTDOWN 0x60
/* USB Device mode only - Mandatory */
@@ -169,57 +180,14 @@ struct usb_hw_ep_profile {
uint8_t support_out:1; /* OUT-token is supported */
};
-/*
- * The following structure is used when trying to allocate hardware
- * endpoints for an USB configuration in USB device side mode.
- */
-struct usb_hw_ep_scratch_sub {
- const struct usb_hw_ep_profile *pf;
- uint16_t max_frame_size;
- uint8_t hw_endpoint_out;
- uint8_t hw_endpoint_in;
- uint8_t needs_ep_type;
- uint8_t needs_in:1;
- uint8_t needs_out:1;
-};
-
-/*
- * The following structure is used when trying to allocate hardware
- * endpoints for an USB configuration in USB device side mode.
- */
-struct usb_hw_ep_scratch {
- struct usb_hw_ep_scratch_sub ep[USB_EP_MAX];
- struct usb_hw_ep_scratch_sub *ep_max;
- struct usb_config_descriptor *cd;
- struct usb_device *udev;
- struct usb_bus_methods *methods;
- uint8_t bmOutAlloc[(USB_EP_MAX + 15) / 16];
- uint8_t bmInAlloc[(USB_EP_MAX + 15) / 16];
-};
-
-/*
- * The following structure is used when generating USB descriptors
- * from USB templates.
- */
-struct usb_temp_setup {
- void *buf;
- usb_size_t size;
- enum usb_dev_speed usb_speed;
- uint8_t self_powered;
- uint8_t bNumEndpoints;
- uint8_t bInterfaceNumber;
- uint8_t bAlternateSetting;
- uint8_t bConfigurationValue;
- usb_error_t err;
-};
-
/* prototypes */
void usb_bus_mem_flush_all(struct usb_bus *bus, usb_bus_mem_cb_t *cb);
uint8_t usb_bus_mem_alloc_all(struct usb_bus *bus, bus_dma_tag_t dmat, usb_bus_mem_cb_t *cb);
void usb_bus_mem_free_all(struct usb_bus *bus, usb_bus_mem_cb_t *cb);
uint16_t usb_isoc_time_expand(struct usb_bus *bus, uint16_t isoc_time_curr);
-uint16_t usbd_fs_isoc_schedule_isoc_time_expand(struct usb_device *udev, struct usb_fs_isoc_schedule **pp_start, struct usb_fs_isoc_schedule **pp_end, uint16_t isoc_time);
-uint8_t usbd_fs_isoc_schedule_alloc(struct usb_fs_isoc_schedule *fss, uint8_t *pstart, uint16_t len);
+#if USB_HAVE_TT_SUPPORT
+uint8_t usbd_fs_isoc_schedule_alloc_slot(struct usb_xfer *isoc_xfer, uint16_t isoc_time);
+#endif
#endif /* _USB_CONTROLLER_H_ */