Lines Matching +full:has +full:- +full:transaction +full:- +full:translator

1 /* SPDX-License-Identifier: GPL-2.0+ */
6 * Adapted for U-Boot driver model
8 * Note: Part of this code has been derived from linux
45 * time for a BULK device to react - some are slow.
92 * struct usb_device - information about a USB device
135 * Child devices - if this is a hub device
149 /* slot_id - for xHCI enabled devices */
211 * board-specific hardware initialization, called by
212 * usb drivers and u-boot commands
252 int usb_detect_change(void); /* detect if a USB device has been (un)plugged */
281 /* big endian -> little endian conversion */
309 * - device number (7 bits)
310 * - endpoint number (4 bits)
311 * - current Data0/1 state (1 bit)
312 * - direction (1 bit)
313 * - speed (2 bits)
314 * - max packet size (2 bits: 8, 16, 32 or 64)
315 * - pipe type (2 bits: control, interrupt, bulk, isochronous)
324 * - max size: bits 0-1 (00 = 8, 01 = 16, 10 = 32, 11 = 64)
325 * - direction: bit 7 (0 = Host-to-Device [Out],
326 * (1 = Device-to-Host [In])
327 * - device: bits 8-14
328 * - endpoint: bits 15-18
329 * - Data0/1: bit 19
330 * - pipe type: bits 30-31 (00 = isochronous, 01 = interrupt,
340 (((dev)->devnum << 8) | ((endpoint) << 15) | \
341 (dev)->maxpacketsize)
342 #define default_pipe(dev) ((dev)->speed << 26)
371 #define usb_gettoggle(dev, ep, out) (((dev)->toggle[out] >> ep) & 1)
372 #define usb_dotoggle(dev, ep, out) ((dev)->toggle[out] ^= (1 << ep))
373 #define usb_settoggle(dev, ep, out, bit) ((dev)->toggle[out] = \
374 ((dev)->toggle[out] & \
379 #define usb_endpoint_halt(dev, ep, out) ((dev)->halted[out] |= (1 << (ep)))
380 #define usb_endpoint_running(dev, ep, out) ((dev)->halted[out] &= ~(1 << (ep)))
381 #define usb_endpoint_halted(dev, ep, out) ((dev)->halted[out] & (1 << (ep)))
400 ((usb_pipeendpoint(pipe) * 2) - \
404 * struct usb_device_id - identifies USB devices for probing and hotplugging
412 * @idProduct: Vendor-assigned product ID.
413 * @bcdDevice_lo: Low end of range of vendor-assigned product version numbers.
420 * or be vendor-specific. Device classes specify behavior of all
426 * or be vendor-specific. Interface classes specify behavior only
431 * fixed interface numbers to differentiate between vendor-specific
470 /* Used for vendor-specific interface matches */
495 * struct usb_driver_entry - Matches a driver to its usb_device_ids
508 * USB_DEVICE - macro used to describe a specific usb device
544 #define USB_HUB_PR_HS_NO_TT 0 /* Hi-speed hub without TT */
545 #define USB_HUB_PR_HS_SINGLE_TT 1 /* Hi-speed hub with single TT */
546 #define USB_HUB_PR_HS_MULTI_TT 2 /* Hi-speed hub with multiple TT */
549 /* Transaction Translator Think Times, in bits */
586 int overcurrent_count[USB_MAXCHILDREN]; /* Over-current counter */
588 struct usb_tt tt; /* Transaction Translator */
593 * struct usb_platdata - Platform data about a USB controller
602 * struct usb_dev_platdata - Platform data about a USB device
609 * @udev: usb-uclass internal use only do NOT use
627 /* NULL-terminated list of descriptor pointers */
634 * struct usb_bus_priv - information about the USB controller
643 * has been assigned an address. For XHCI this is not possible
655 * struct usb_emul_platdata - platform data about the USB emulator
667 * struct dm_usb_ops - USB controller operations
681 * DMA-aligned.
686 * control() - Send a control message
696 * bulk() - Send a bulk message
703 * interrupt() - Send an interrupt message
714 * create_int_queue() - Create and queue interrupt packets
732 * poll_int_queue() - Poll an interrupt queue for completed packets
747 * destroy_int_queue() - Destroy an interrupt queue
753 * @return 0 if OK, -ve on error
759 * alloc_device() - Allocate a new device context (XHCI)
769 * reset_root_port() - Reset usb root port
774 * update_hub_device() - Update HCD's internal representation of hub
782 * get_max_xfer_size() - Get HCD's maximum transfer bytes
790 #define usb_get_ops(dev) ((struct dm_usb_ops *)(dev)->driver->ops)
791 #define usb_get_emul_ops(dev) ((struct dm_usb_ops *)(dev)->driver->ops)
794 * usb_get_dev_index() - look up a device index number
797 * in U-Boot device addresses are allocated starting at 1 with no gaps.
809 * usb_setup_device() - set up a device ready for use
811 * @dev: USB device pointer. This need not be a real device - it is
812 * common for it to just be a local variable with its ->dev
813 * member (i.e. @dev->dev) set to the parent device and
814 * dev->portnr set to the port number on the hub (1=first)
818 * @return 0 if OK, -ve on error */
823 * usb_hub_is_root_hub() - Test whether a hub device is root hub or not
831 * usb_hub_scan() - Scan a hub and find its devices
838 * usb_scan_device() - Scan a device on a bus
840 * Scan a device on a bus. It has already been detected and is ready to
848 * @return 0 if OK, -ve on error
854 * usb_get_bus() - Find the bus for a device
866 * usb_select_config() - Set up a device ready for use
868 * This function assumes that the device already has an address and a driver
871 * This re-reads the device and configuration descriptors and sets the
879 * usb_child_pre_probe() - Pre-probe function for USB devices
898 * usb_setup_ehci_gadget() - Set up a USB device as a gadget
908 * usb_stor_reset() - Prepare to scan USB storage devices
927 * usb_find_usb2_hub_address_port() - Get hub address and port for TT setting
939 * usb_alloc_new_device() - Allocate a new device
943 * driver-specific.
944 * @return 0 if OK, -ENOSPC if we have found out of room for new devices
949 * usb_free_device() - Free a partially-inited device
961 * usb_update_hub_device() - Update HCD's internal representation of hub
967 * @return 0 if OK, -ve on error
972 * usb_get_max_xfer_size() - Get HCD's maximum transfer bytes
979 * @return 0 if OK, -ve on error
984 * usb_emul_setup_device() - Set up a new USB device emulation
995 * @return 0 if OK, -ENOSYS if not implemented, other -ve on error
1001 * usb_emul_control() - Send a control packet to an emulator
1006 * @return 0 if OK, -ve on error
1013 * usb_emul_bulk() - Send a bulk packet to an emulator
1018 * @return 0 if OK, -ve on error
1024 * usb_emul_int() - Send an interrupt packet to an emulator
1029 * @return 0 if OK, -ve on error
1035 * usb_emul_find() - Find an emulator for a particular device
1043 * @return 0 if found, -ve on error
1049 * usb_emul_find_for_dev() - Find an emulator for a particular device
1053 * @return 0 if found, -ve on error
1058 * usb_emul_find_descriptor() - Find a USB descriptor of a particular device
1069 * usb_show_tree() - show the USB device tree