Lines Matching refs:hub

50 	struct usb_hub_device *hub;	/* USB hub struct */  member
57 __weak void usb_hub_reset_devices(struct usb_hub_device *hub, int port) in usb_hub_reset_devices() argument
68 bool usb_hub_is_root_hub(struct udevice *hub) in usb_hub_is_root_hub() argument
70 if (device_get_uclass_id(hub->parent) != UCLASS_USB_HUB) in usb_hub_is_root_hub()
159 static void usb_hub_power_on(struct usb_hub_device *hub) in usb_hub_power_on() argument
163 unsigned pgood_delay = hub->desc.bPwrOn2PwrGood * 2; in usb_hub_power_on()
166 dev = hub->pusb_dev; in usb_hub_power_on()
199 hub->query_delay = get_timer(0) + max(100, (int)pgood_delay); in usb_hub_power_on()
206 hub->connect_timeout = hub->query_delay + 1000; in usb_hub_power_on()
436 struct usb_hub_device *hub; in usb_scan_port() local
441 hub = usb_scan->hub; in usb_scan_port()
448 if (get_timer(0) < hub->query_delay) in usb_scan_port()
454 if (get_timer(0) >= hub->connect_timeout) { in usb_scan_port()
478 if (get_timer(0) >= hub->connect_timeout) { in usb_scan_port()
539 hub->overcurrent_count[i]++; in usb_scan_port()
545 if (hub->overcurrent_count[i] <= in usb_scan_port()
551 hub->overcurrent_count[i]); in usb_scan_port()
605 struct usb_hub_device *hub; in usb_get_hub_device() local
609 hub = usb_hub_allocate(); in usb_get_hub_device()
611 hub = dev_get_uclass_priv(dev->dev); in usb_get_hub_device()
614 return hub; in usb_get_hub_device()
624 struct usb_hub_device *hub; in usb_hub_configure() local
628 hub = usb_get_hub_device(dev); in usb_hub_configure()
629 if (hub == NULL) in usb_hub_configure()
631 hub->pusb_dev = dev; in usb_hub_configure()
651 memcpy((unsigned char *)&hub->desc, buffer, length); in usb_hub_configure()
655 &hub->desc.wHubCharacteristics); in usb_hub_configure()
657 bitmap = (unsigned char *)&hub->desc.u.hs.DeviceRemovable[0]; in usb_hub_configure()
660 bitmap = (unsigned char *)&hub->desc.u.hs.PortPowerCtrlMask[0]; in usb_hub_configure()
663 for (i = 0; i < ((hub->desc.bNbrPorts + 1 + 7)/8); i++) in usb_hub_configure()
664 hub->desc.u.hs.DeviceRemovable[i] = in usb_hub_configure()
667 for (i = 0; i < ((hub->desc.bNbrPorts + 1 + 7)/8); i++) in usb_hub_configure()
668 hub->desc.u.hs.PortPowerCtrlMask[i] = in usb_hub_configure()
674 hubCharacteristics = get_unaligned(&hub->desc.wHubCharacteristics); in usb_hub_configure()
716 hub->tt.multi = true; in usb_hub_configure()
734 hub->tt.think_time = 666; in usb_hub_configure()
736 8, hub->tt.think_time); in usb_hub_configure()
740 hub->tt.think_time = 666 * 2; in usb_hub_configure()
742 16, hub->tt.think_time); in usb_hub_configure()
745 hub->tt.think_time = 666 * 3; in usb_hub_configure()
747 24, hub->tt.think_time); in usb_hub_configure()
750 hub->tt.think_time = 666 * 4; in usb_hub_configure()
752 32, hub->tt.think_time); in usb_hub_configure()
763 hub->desc.u.hs.DeviceRemovable[(i + 1) / 8] & \ in usb_hub_configure()
813 hub->hub_depth = -1; in usb_hub_configure()
824 hub->hub_depth = depth; in usb_hub_configure()
843 usb_hub_power_on(hub); in usb_hub_configure()
851 usb_hub_reset_devices(hub, i + 1); in usb_hub_configure()
869 usb_scan->hub = hub; in usb_hub_configure()
934 int usb_hub_scan(struct udevice *hub) in usb_hub_scan() argument
936 struct usb_device *udev = dev_get_parent_priv(hub); in usb_hub_scan()