mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-09-20 21:31:32 +02:00
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-usb
This commit is contained in:
commit
c326bb6792
@ -61,7 +61,7 @@ static int dwc3_ep0_start_trans(struct dwc3 *dwc, u8 epnum, dma_addr_t buf_dma,
|
|||||||
|
|
||||||
dep = dwc->eps[epnum];
|
dep = dwc->eps[epnum];
|
||||||
if (dep->flags & DWC3_EP_BUSY) {
|
if (dep->flags & DWC3_EP_BUSY) {
|
||||||
dev_vdbg(dwc->dev, "%s still busy", dep->name);
|
dev_vdbg(dwc->dev, "%s still busy\n", dep->name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -238,9 +238,9 @@ int dwc3_gadget_ep0_queue(struct usb_ep *ep, struct usb_request *request,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_vdbg(dwc->dev, "queueing request %p to %s length %d state '%s'",
|
dev_vdbg(dwc->dev, "queueing request %p to %s length %d state '%s\n'",
|
||||||
request, dep->name, request->length,
|
request, dep->name, request->length,
|
||||||
dwc3_ep0_state_string(dwc->ep0state));
|
dwc3_ep0_state_string(dwc->ep0state));
|
||||||
|
|
||||||
ret = __dwc3_gadget_ep0_queue(dep, req);
|
ret = __dwc3_gadget_ep0_queue(dep, req);
|
||||||
|
|
||||||
@ -697,35 +697,35 @@ static int dwc3_ep0_std_request(struct dwc3 *dwc, struct usb_ctrlrequest *ctrl)
|
|||||||
|
|
||||||
switch (ctrl->bRequest) {
|
switch (ctrl->bRequest) {
|
||||||
case USB_REQ_GET_STATUS:
|
case USB_REQ_GET_STATUS:
|
||||||
dev_vdbg(dwc->dev, "USB_REQ_GET_STATUS");
|
dev_vdbg(dwc->dev, "USB_REQ_GET_STATUS\n");
|
||||||
ret = dwc3_ep0_handle_status(dwc, ctrl);
|
ret = dwc3_ep0_handle_status(dwc, ctrl);
|
||||||
break;
|
break;
|
||||||
case USB_REQ_CLEAR_FEATURE:
|
case USB_REQ_CLEAR_FEATURE:
|
||||||
dev_vdbg(dwc->dev, "USB_REQ_CLEAR_FEATURE");
|
dev_vdbg(dwc->dev, "USB_REQ_CLEAR_FEATURE\n");
|
||||||
ret = dwc3_ep0_handle_feature(dwc, ctrl, 0);
|
ret = dwc3_ep0_handle_feature(dwc, ctrl, 0);
|
||||||
break;
|
break;
|
||||||
case USB_REQ_SET_FEATURE:
|
case USB_REQ_SET_FEATURE:
|
||||||
dev_vdbg(dwc->dev, "USB_REQ_SET_FEATURE");
|
dev_vdbg(dwc->dev, "USB_REQ_SET_FEATURE\n");
|
||||||
ret = dwc3_ep0_handle_feature(dwc, ctrl, 1);
|
ret = dwc3_ep0_handle_feature(dwc, ctrl, 1);
|
||||||
break;
|
break;
|
||||||
case USB_REQ_SET_ADDRESS:
|
case USB_REQ_SET_ADDRESS:
|
||||||
dev_vdbg(dwc->dev, "USB_REQ_SET_ADDRESS");
|
dev_vdbg(dwc->dev, "USB_REQ_SET_ADDRESS\n");
|
||||||
ret = dwc3_ep0_set_address(dwc, ctrl);
|
ret = dwc3_ep0_set_address(dwc, ctrl);
|
||||||
break;
|
break;
|
||||||
case USB_REQ_SET_CONFIGURATION:
|
case USB_REQ_SET_CONFIGURATION:
|
||||||
dev_vdbg(dwc->dev, "USB_REQ_SET_CONFIGURATION");
|
dev_vdbg(dwc->dev, "USB_REQ_SET_CONFIGURATION\n");
|
||||||
ret = dwc3_ep0_set_config(dwc, ctrl);
|
ret = dwc3_ep0_set_config(dwc, ctrl);
|
||||||
break;
|
break;
|
||||||
case USB_REQ_SET_SEL:
|
case USB_REQ_SET_SEL:
|
||||||
dev_vdbg(dwc->dev, "USB_REQ_SET_SEL");
|
dev_vdbg(dwc->dev, "USB_REQ_SET_SEL\n");
|
||||||
ret = dwc3_ep0_set_sel(dwc, ctrl);
|
ret = dwc3_ep0_set_sel(dwc, ctrl);
|
||||||
break;
|
break;
|
||||||
case USB_REQ_SET_ISOCH_DELAY:
|
case USB_REQ_SET_ISOCH_DELAY:
|
||||||
dev_vdbg(dwc->dev, "USB_REQ_SET_ISOCH_DELAY");
|
dev_vdbg(dwc->dev, "USB_REQ_SET_ISOCH_DELAY\n");
|
||||||
ret = dwc3_ep0_set_isoch_delay(dwc, ctrl);
|
ret = dwc3_ep0_set_isoch_delay(dwc, ctrl);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
dev_vdbg(dwc->dev, "Forwarding to gadget driver");
|
dev_vdbg(dwc->dev, "Forwarding to gadget driver\n");
|
||||||
ret = dwc3_ep0_delegate_req(dwc, ctrl);
|
ret = dwc3_ep0_delegate_req(dwc, ctrl);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -911,17 +911,17 @@ static void dwc3_ep0_xfer_complete(struct dwc3 *dwc,
|
|||||||
|
|
||||||
switch (dwc->ep0state) {
|
switch (dwc->ep0state) {
|
||||||
case EP0_SETUP_PHASE:
|
case EP0_SETUP_PHASE:
|
||||||
dev_vdbg(dwc->dev, "Setup Phase");
|
dev_vdbg(dwc->dev, "Setup Phase\n");
|
||||||
dwc3_ep0_inspect_setup(dwc, event);
|
dwc3_ep0_inspect_setup(dwc, event);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EP0_DATA_PHASE:
|
case EP0_DATA_PHASE:
|
||||||
dev_vdbg(dwc->dev, "Data Phase");
|
dev_vdbg(dwc->dev, "Data Phase\n");
|
||||||
dwc3_ep0_complete_data(dwc, event);
|
dwc3_ep0_complete_data(dwc, event);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EP0_STATUS_PHASE:
|
case EP0_STATUS_PHASE:
|
||||||
dev_vdbg(dwc->dev, "Status Phase");
|
dev_vdbg(dwc->dev, "Status Phase\n");
|
||||||
dwc3_ep0_complete_status(dwc, event);
|
dwc3_ep0_complete_status(dwc, event);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -1047,7 +1047,7 @@ static void dwc3_ep0_xfernotready(struct dwc3 *dwc,
|
|||||||
|
|
||||||
switch (event->status) {
|
switch (event->status) {
|
||||||
case DEPEVT_STATUS_CONTROL_DATA:
|
case DEPEVT_STATUS_CONTROL_DATA:
|
||||||
dev_vdbg(dwc->dev, "Control Data");
|
dev_vdbg(dwc->dev, "Control Data\n");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We already have a DATA transfer in the controller's cache,
|
* We already have a DATA transfer in the controller's cache,
|
||||||
@ -1061,7 +1061,7 @@ static void dwc3_ep0_xfernotready(struct dwc3 *dwc,
|
|||||||
if (dwc->ep0_expect_in != event->endpoint_number) {
|
if (dwc->ep0_expect_in != event->endpoint_number) {
|
||||||
struct dwc3_ep *dep = dwc->eps[dwc->ep0_expect_in];
|
struct dwc3_ep *dep = dwc->eps[dwc->ep0_expect_in];
|
||||||
|
|
||||||
dev_vdbg(dwc->dev, "Wrong direction for Data phase");
|
dev_vdbg(dwc->dev, "Wrong direction for Data phase\n");
|
||||||
dwc3_ep0_end_control_data(dwc, dep);
|
dwc3_ep0_end_control_data(dwc, dep);
|
||||||
dwc3_ep0_stall_and_restart(dwc);
|
dwc3_ep0_stall_and_restart(dwc);
|
||||||
return;
|
return;
|
||||||
@ -1073,13 +1073,13 @@ static void dwc3_ep0_xfernotready(struct dwc3 *dwc,
|
|||||||
if (dwc->ep0_next_event != DWC3_EP0_NRDY_STATUS)
|
if (dwc->ep0_next_event != DWC3_EP0_NRDY_STATUS)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
dev_vdbg(dwc->dev, "Control Status");
|
dev_vdbg(dwc->dev, "Control Status\n");
|
||||||
|
|
||||||
dwc->ep0state = EP0_STATUS_PHASE;
|
dwc->ep0state = EP0_STATUS_PHASE;
|
||||||
|
|
||||||
if (dwc->delayed_status) {
|
if (dwc->delayed_status) {
|
||||||
WARN_ON_ONCE(event->endpoint_number != 1);
|
WARN_ON_ONCE(event->endpoint_number != 1);
|
||||||
dev_vdbg(dwc->dev, "Delayed Status");
|
dev_vdbg(dwc->dev, "Delayed Status\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1092,10 +1092,10 @@ void dwc3_ep0_interrupt(struct dwc3 *dwc,
|
|||||||
{
|
{
|
||||||
u8 epnum = event->endpoint_number;
|
u8 epnum = event->endpoint_number;
|
||||||
|
|
||||||
dev_dbg(dwc->dev, "%s while ep%d%s in state '%s'",
|
dev_dbg(dwc->dev, "%s while ep%d%s in state '%s'\n",
|
||||||
dwc3_ep_event_string(event->endpoint_event),
|
dwc3_ep_event_string(event->endpoint_event),
|
||||||
epnum >> 1, (epnum & 1) ? "in" : "out",
|
epnum >> 1, (epnum & 1) ? "in" : "out",
|
||||||
dwc3_ep0_state_string(dwc->ep0state));
|
dwc3_ep0_state_string(dwc->ep0state));
|
||||||
|
|
||||||
switch (event->endpoint_event) {
|
switch (event->endpoint_event) {
|
||||||
case DWC3_DEPEVT_XFERCOMPLETE:
|
case DWC3_DEPEVT_XFERCOMPLETE:
|
||||||
|
@ -388,7 +388,7 @@ int usb_init(void)
|
|||||||
|
|
||||||
/* if we were not able to find at least one working bus, bail out */
|
/* if we were not able to find at least one working bus, bail out */
|
||||||
if (controllers_initialized == 0)
|
if (controllers_initialized == 0)
|
||||||
printf("No working controllers found\n");
|
printf("No USB controllers found\n");
|
||||||
|
|
||||||
return usb_started ? 0 : -ENOENT;
|
return usb_started ? 0 : -ENOENT;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user