mirror of
https://github.com/CTCaer/switch-l4t-atf.git
synced 2024-11-23 09:49:39 +00:00
Merge changes from topic "st_usb" into integration
* changes: fix(drivers/usb): add a optional ops get_other_speed_config_desc fix(drivers/usb): remove unnecessary cast
This commit is contained in:
commit
2e43638e95
@ -73,8 +73,7 @@ static void usb_core_get_desc(struct usb_handle *pdev, struct usb_setup_req *req
|
||||
break;
|
||||
|
||||
case USB_DESC_TYPE_CONFIGURATION:
|
||||
pbuf = (uint8_t *)pdev->desc->get_config_desc(&len);
|
||||
pbuf[1] = USB_DESC_TYPE_CONFIGURATION;
|
||||
pbuf = pdev->desc->get_config_desc(&len);
|
||||
break;
|
||||
|
||||
case USB_DESC_TYPE_STRING:
|
||||
@ -112,12 +111,15 @@ static void usb_core_get_desc(struct usb_handle *pdev, struct usb_setup_req *req
|
||||
break;
|
||||
|
||||
case USB_DESC_TYPE_DEVICE_QUALIFIER:
|
||||
pbuf = (uint8_t *)pdev->desc->get_device_qualifier_desc(&len);
|
||||
pbuf = pdev->desc->get_device_qualifier_desc(&len);
|
||||
break;
|
||||
|
||||
case USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION:
|
||||
pbuf = (uint8_t *)pdev->desc->get_config_desc(&len);
|
||||
pbuf[1] = USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION;
|
||||
if (pdev->desc->get_other_speed_config_desc == NULL) {
|
||||
usb_core_ctl_error(pdev);
|
||||
return;
|
||||
}
|
||||
pbuf = pdev->desc->get_other_speed_config_desc(&len);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -166,6 +166,8 @@ struct usb_desc {
|
||||
uint8_t *(*get_usr_desc)(uint8_t index, uint16_t *length);
|
||||
uint8_t *(*get_config_desc)(uint16_t *length);
|
||||
uint8_t *(*get_device_qualifier_desc)(uint16_t *length);
|
||||
/* optional: high speed capable device operating at its other speed */
|
||||
uint8_t *(*get_other_speed_config_desc)(uint16_t *length);
|
||||
};
|
||||
|
||||
/* USB Device handle structure */
|
||||
|
@ -338,6 +338,8 @@ static const struct usb_desc dfu_desc = {
|
||||
.get_usr_desc = stm32mp1_get_usr_desc,
|
||||
.get_config_desc = stm32mp1_get_config_desc,
|
||||
.get_device_qualifier_desc = stm32mp1_get_qualifier_desc,
|
||||
/* only HS is supported, as ROM code */
|
||||
.get_other_speed_config_desc = NULL,
|
||||
};
|
||||
|
||||
static struct usb_handle usb_core_handle;
|
||||
|
Loading…
Reference in New Issue
Block a user