Lines Matching refs:hub
53 struct usb_hub_device *hub; /* USB hub struct */ member
60 __weak void usb_hub_reset_devices(struct usb_hub_device *hub, int port) in usb_hub_reset_devices() argument
71 bool usb_hub_is_root_hub(struct udevice *hub) in usb_hub_is_root_hub() argument
73 if (device_get_uclass_id(hub->parent) != UCLASS_USB_HUB) in usb_hub_is_root_hub()
162 static void usb_hub_power_on(struct usb_hub_device *hub) in usb_hub_power_on() argument
166 unsigned pgood_delay = hub->desc.bPwrOn2PwrGood * 2; in usb_hub_power_on()
169 dev = hub->pusb_dev; in usb_hub_power_on()
202 hub->query_delay = get_timer(0) + max(100, (int)pgood_delay); in usb_hub_power_on()
209 hub->connect_timeout = hub->query_delay + 1000; in usb_hub_power_on()
448 struct usb_hub_device *hub; in usb_scan_port() local
453 hub = usb_scan->hub; in usb_scan_port()
460 if (get_timer(0) < hub->query_delay) in usb_scan_port()
466 if (get_timer(0) >= hub->connect_timeout) { in usb_scan_port()
490 if (get_timer(0) >= hub->connect_timeout) { in usb_scan_port()
551 hub->overcurrent_count[i]++; in usb_scan_port()
557 if (hub->overcurrent_count[i] <= in usb_scan_port()
563 hub->overcurrent_count[i]); in usb_scan_port()
617 struct usb_hub_device *hub; in usb_get_hub_device() local
621 hub = usb_hub_allocate(); in usb_get_hub_device()
623 hub = dev_get_uclass_priv(dev->dev); in usb_get_hub_device()
626 return hub; in usb_get_hub_device()
636 struct usb_hub_device *hub; in usb_hub_configure() local
640 hub = usb_get_hub_device(dev); in usb_hub_configure()
641 if (hub == NULL) in usb_hub_configure()
643 hub->pusb_dev = dev; in usb_hub_configure()
663 memcpy((unsigned char *)&hub->desc, buffer, length); in usb_hub_configure()
667 &hub->desc.wHubCharacteristics); in usb_hub_configure()
669 bitmap = (unsigned char *)&hub->desc.u.hs.DeviceRemovable[0]; in usb_hub_configure()
672 bitmap = (unsigned char *)&hub->desc.u.hs.PortPowerCtrlMask[0]; in usb_hub_configure()
675 for (i = 0; i < ((hub->desc.bNbrPorts + 1 + 7)/8); i++) in usb_hub_configure()
676 hub->desc.u.hs.DeviceRemovable[i] = in usb_hub_configure()
679 for (i = 0; i < ((hub->desc.bNbrPorts + 1 + 7)/8); i++) in usb_hub_configure()
680 hub->desc.u.hs.PortPowerCtrlMask[i] = in usb_hub_configure()
686 hubCharacteristics = get_unaligned(&hub->desc.wHubCharacteristics); in usb_hub_configure()
728 hub->tt.multi = true; in usb_hub_configure()
746 hub->tt.think_time = 666; in usb_hub_configure()
748 8, hub->tt.think_time); in usb_hub_configure()
752 hub->tt.think_time = 666 * 2; in usb_hub_configure()
754 16, hub->tt.think_time); in usb_hub_configure()
757 hub->tt.think_time = 666 * 3; in usb_hub_configure()
759 24, hub->tt.think_time); in usb_hub_configure()
762 hub->tt.think_time = 666 * 4; in usb_hub_configure()
764 32, hub->tt.think_time); in usb_hub_configure()
775 hub->desc.u.hs.DeviceRemovable[(i + 1) / 8] & \ in usb_hub_configure()
825 hub->hub_depth = -1; in usb_hub_configure()
836 hub->hub_depth = depth; in usb_hub_configure()
855 usb_hub_power_on(hub); in usb_hub_configure()
863 usb_hub_reset_devices(hub, i + 1); in usb_hub_configure()
881 usb_scan->hub = hub; in usb_hub_configure()
946 int usb_hub_scan(struct udevice *hub) in usb_hub_scan() argument
948 struct usb_device *udev = dev_get_parent_priv(hub); in usb_hub_scan()