summaryrefslogtreecommitdiff
path: root/common/usbx_host_controllers/src
diff options
context:
space:
mode:
authorYuxin Zhou <[email protected]>2021-04-03 01:05:33 +0000
committerYuxin Zhou <[email protected]>2021-04-03 01:05:33 +0000
commitdfb4460f72adebdb045a2d92e39a31df9a503898 (patch)
tree67f8da386698fb20ae35314b770aca74d6bd83bf /common/usbx_host_controllers/src
parentf6be93a662e24ed3ee57fc9e28aaeecb498093f5 (diff)
Release 6.1.6v6.1.6_rel
Diffstat (limited to 'common/usbx_host_controllers/src')
-rwxr-xr-xcommon/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_create.c13
-rwxr-xr-xcommon/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_destroy.c8
-rwxr-xr-xcommon/usbx_host_controllers/src/ux_hcd_ehci_isochronous_endpoint_create.c15
-rwxr-xr-xcommon/usbx_host_controllers/src/ux_hcd_ehci_isochronous_endpoint_destroy.c20
-rwxr-xr-xcommon/usbx_host_controllers/src/ux_hcd_ehci_least_traffic_list_get.c8
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_interrupt_endpoint_create.c12
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_isochronous_endpoint_create.c13
7 files changed, 66 insertions, 23 deletions
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_create.c b/common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_create.c
index e57dd13..488c54f 100755
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_create.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_create.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_interrupt_endpoint_create PORTABLE C */
-/* 6.1.2 */
+/* 6.1.6 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -96,6 +96,11 @@
/* 11-09-2020 Chaoqiong Xiao Modified comment(s), */
/* fixed compile warnings, */
/* resulting in version 6.1.2 */
+/* 04-02-2021 Chaoqiong Xiao Modified comment(s), */
+/* fixed compile issues with */
+/* some macro options, */
+/* filled max transfer length, */
+/* resulting in version 6.1.6 */
/* */
/**************************************************************************/
UINT _ux_hcd_ehci_interrupt_endpoint_create(UX_HCD_EHCI *hcd_ehci, UX_ENDPOINT *endpoint)
@@ -131,6 +136,10 @@ UINT i;
return(UX_FUNCTION_NOT_SUPPORTED);
#endif
+ /* We need to take into account the nature of the HCD to define the max size
+ of any transfer in the transfer request. */
+ endpoint -> ux_endpoint_transfer_request.ux_transfer_request_maximum_length = UX_EHCI_MAX_PAYLOAD;
+
/* Obtain a ED for this new endpoint. This ED will live as long as the endpoint is
active and will be the container for the tds. */
ed = _ux_hcd_ehci_ed_obtain(hcd_ehci);
@@ -331,7 +340,7 @@ UINT i;
}
/* Reserve count for SSplit (Max 16). */
- ed_anchor -> ux_ehci_ed_microframe_ssplit_count[i] ++;
+ ed_anchor ->REF_AS.ANCHOR.ux_ehci_ed_microframe_ssplit_count[i] ++;
/* Reserve packet bytes for microframe load. */
if (endpoint -> ux_endpoint_descriptor.bEndpointAddress & UX_ENDPOINT_DIRECTION)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_destroy.c b/common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_destroy.c
index 9b99668..822c7bc 100755
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_destroy.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_destroy.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_interrupt_endpoint_destroy PORTABLE C */
-/* 6.1.2 */
+/* 6.1.6 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -75,6 +75,10 @@
/* 11-09-2020 Chaoqiong Xiao Modified comment(s), */
/* fixed compile warnings, */
/* resulting in version 6.1.2 */
+/* 04-02-2021 Chaoqiong Xiao Modified comment(s), */
+/* fixed compile issues with */
+/* some macro options, */
+/* resulting in version 6.1.6 */
/* */
/**************************************************************************/
UINT _ux_hcd_ehci_interrupt_endpoint_destroy(UX_HCD_EHCI *hcd_ehci, UX_ENDPOINT *endpoint)
@@ -157,7 +161,7 @@ ULONG max_packet_size;
{
/* Decrement the start split count. */
- ed -> REF_AS.INTR.ux_ehci_ed_anchor -> ux_ehci_ed_microframe_ssplit_count[frindex] --;
+ ed -> REF_AS.INTR.ux_ehci_ed_anchor -> REF_AS.ANCHOR.ux_ehci_ed_microframe_ssplit_count[frindex] --;
/* Check next endpoint if it's IN (load in C-Mask). */
if (endpoint -> ux_endpoint_descriptor.bEndpointAddress & UX_ENDPOINT_DIRECTION)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_isochronous_endpoint_create.c b/common/usbx_host_controllers/src/ux_hcd_ehci_isochronous_endpoint_create.c
index 2c594c2..29dd251 100755
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_isochronous_endpoint_create.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_isochronous_endpoint_create.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_isochronous_endpoint_create PORTABLE C */
-/* 6.1.2 */
+/* 6.1.6 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -79,6 +79,11 @@
/* 11-09-2020 Chaoqiong Xiao Modified comment(s), */
/* fixed compile warnings, */
/* resulting in version 6.1.2 */
+/* 04-02-2021 Chaoqiong Xiao Modified comment(s), */
+/* fixed compile issues with */
+/* some macro options, */
+/* filled max transfer length, */
+/* resulting in version 6.1.6 */
/* */
/**************************************************************************/
UINT _ux_hcd_ehci_isochronous_endpoint_create(UX_HCD_EHCI *hcd_ehci, UX_ENDPOINT *endpoint)
@@ -158,6 +163,10 @@ UINT status;
/* Get max transfer size. */
max_trans_size = max_packet_size * mult;
+ /* We need to take into account the nature of the HCD to define the max size
+ of any transfer in the transfer request. */
+ endpoint -> ux_endpoint_transfer_request.ux_transfer_request_maximum_length = max_trans_size;
+
/* Get the Endpt, Device Address, I/O, Maximum Packet Size, Mult. */
endpt = (endpoint -> ux_endpoint_descriptor.bEndpointAddress << UX_EHCI_HSISO_ENDPT_SHIFT) & UX_EHCI_HSISO_ENDPT_MASK;
device_address = device -> ux_device_address & UX_EHCI_HSISO_DEVICE_ADDRESS_MASK;
@@ -430,7 +439,7 @@ UINT status;
ed_anchor -> REF_AS.ANCHOR.ux_ehci_ed_microframe_load[i] = (USHORT)(ed_anchor -> REF_AS.ANCHOR.ux_ehci_ed_microframe_load[i] + 188u);
/* Increment SSplit count. */
- ed_anchor -> ux_ehci_ed_microframe_ssplit_count[i] ++;
+ ed_anchor -> REF_AS.ANCHOR.ux_ehci_ed_microframe_ssplit_count[i] ++;
}
}
else
@@ -481,7 +490,7 @@ UINT status;
}
/* Increment SSplit count. */
- ed_anchor -> ux_ehci_ed_microframe_ssplit_count[i] ++;
+ ed_anchor -> REF_AS.ANCHOR.ux_ehci_ed_microframe_ssplit_count[i] ++;
}
}
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_isochronous_endpoint_destroy.c b/common/usbx_host_controllers/src/ux_hcd_ehci_isochronous_endpoint_destroy.c
index bc5c15f..92c3bf0 100755
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_isochronous_endpoint_destroy.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_isochronous_endpoint_destroy.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_isochronous_endpoint_destroy PORTABLE C */
-/* 6.1.2 */
+/* 6.1.6 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -75,6 +75,10 @@
/* 11-09-2020 Chaoqiong Xiao Modified comment(s), */
/* fixed compile warnings, */
/* resulting in version 6.1.2 */
+/* 04-02-2021 Chaoqiong Xiao Modified comment(s), */
+/* fixed compile issues with */
+/* some macro options, */
+/* resulting in version 6.1.6 */
/* */
/**************************************************************************/
UINT _ux_hcd_ehci_isochronous_endpoint_destroy(UX_HCD_EHCI *hcd_ehci, UX_ENDPOINT *endpoint)
@@ -221,7 +225,7 @@ ULONG last_size;
{
/* Update start split count. */
- ed_td.sitd_ptr -> ux_ehci_fsiso_td_anchor -> ux_ehci_ed_microframe_ssplit_count[frindex] --;
+ ed_td.sitd_ptr -> ux_ehci_fsiso_td_anchor -> REF_AS.ANCHOR.ux_ehci_ed_microframe_ssplit_count[frindex] --;
/* Update load for OUT. */
if ((endpoint -> ux_endpoint_descriptor.bEndpointAddress & UX_ENDPOINT_DIRECTION) == 0)
@@ -231,19 +235,19 @@ ULONG last_size;
last_size = max_packet_size % 188;
if (last_size == 0 &&
frindex == last_frindex)
- ed_td.sitd_ptr -> ux_ehci_fsiso_td_anchor -> ux_ehci_ed_microframe_load[frindex] = (USHORT)
- (ed_td.sitd_ptr -> ux_ehci_fsiso_td_anchor -> ux_ehci_ed_microframe_load[frindex] - last_size);
+ ed_td.sitd_ptr -> ux_ehci_fsiso_td_anchor -> REF_AS.ANCHOR.ux_ehci_ed_microframe_load[frindex] = (USHORT)
+ (ed_td.sitd_ptr -> ux_ehci_fsiso_td_anchor -> REF_AS.ANCHOR.ux_ehci_ed_microframe_load[frindex] - last_size);
else
- ed_td.sitd_ptr -> ux_ehci_fsiso_td_anchor -> ux_ehci_ed_microframe_load[frindex] = (USHORT)
- (ed_td.sitd_ptr -> ux_ehci_fsiso_td_anchor -> ux_ehci_ed_microframe_load[frindex] - 188u);
+ ed_td.sitd_ptr -> ux_ehci_fsiso_td_anchor -> REF_AS.ANCHOR.ux_ehci_ed_microframe_load[frindex] = (USHORT)
+ (ed_td.sitd_ptr -> ux_ehci_fsiso_td_anchor -> REF_AS.ANCHOR.ux_ehci_ed_microframe_load[frindex] - 188u);
}
}
/* Update complete split related (IN only). */
if (ed_td.sitd_ptr -> ux_ehci_fsiso_td_cap1 & (UX_EHCI_CMASK_0 << frindex))
- ed_td.sitd_ptr -> ux_ehci_fsiso_td_anchor -> ux_ehci_ed_microframe_load[frindex] = (USHORT)
- (ed_td.sitd_ptr -> ux_ehci_fsiso_td_anchor -> ux_ehci_ed_microframe_load[frindex] - 188u);
+ ed_td.sitd_ptr -> ux_ehci_fsiso_td_anchor -> REF_AS.ANCHOR.ux_ehci_ed_microframe_load[frindex] = (USHORT)
+ (ed_td.sitd_ptr -> ux_ehci_fsiso_td_anchor -> REF_AS.ANCHOR.ux_ehci_ed_microframe_load[frindex] - 188u);
}
}
else
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_least_traffic_list_get.c b/common/usbx_host_controllers/src/ux_hcd_ehci_least_traffic_list_get.c
index 8611ef2..6297762 100755
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_least_traffic_list_get.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_least_traffic_list_get.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_least_traffic_list_get PORTABLE C */
-/* 6.1.2 */
+/* 6.1.6 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -75,6 +75,10 @@
/* 11-09-2020 Chaoqiong Xiao Modified comment(s), */
/* fixed compile warnings, */
/* resulting in version 6.1.2 */
+/* 04-02-2021 Chaoqiong Xiao Modified comment(s), */
+/* fixed compile issues with */
+/* some macro options, */
+/* resulting in version 6.1.6 */
/* */
/**************************************************************************/
UX_EHCI_ED *_ux_hcd_ehci_least_traffic_list_get(UX_HCD_EHCI *hcd_ehci,
@@ -132,7 +136,7 @@ ULONG bandwidth_used;
{
microframe_load[frindex] += ed -> REF_AS.ANCHOR.ux_ehci_ed_microframe_load[frindex];
#if defined(UX_HCD_EHCI_SPLIT_TRANSFER_ENABLE)
- microframe_ssplit_count[frindex] += ed -> ux_ehci_ed_microframe_ssplit_count[frindex];
+ microframe_ssplit_count[frindex] += ed -> REF_AS.ANCHOR.ux_ehci_ed_microframe_ssplit_count[frindex];
#endif
}
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_interrupt_endpoint_create.c b/common/usbx_host_controllers/src/ux_hcd_ohci_interrupt_endpoint_create.c
index 0deb9f5..28df4d8 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_interrupt_endpoint_create.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_interrupt_endpoint_create.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_interrupt_endpoint_create PORTABLE C */
-/* 6.1 */
+/* 6.1.6 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -91,6 +91,9 @@
/* fixed physical and virtual */
/* address conversion, */
/* resulting in version 6.1 */
+/* 04-02-2021 Chaoqiong Xiao Modified comment(s), */
+/* filled max transfer length, */
+/* resulting in version 6.1.6 */
/* */
/**************************************************************************/
UINT _ux_hcd_ohci_interrupt_endpoint_create(UX_HCD_OHCI *hcd_ohci, UX_ENDPOINT *endpoint)
@@ -123,9 +126,12 @@ UINT interval_ohci;
/* Attach the ED to the endpoint container. */
endpoint -> ux_endpoint_ed = (VOID *) ed;
-
- /* Program the ED for subsequent transfers we need to set the following things:
+ /* We need to take into account the nature of the HCD to define the max size
+ of any transfer in the transfer request. */
+ endpoint -> ux_endpoint_transfer_request.ux_transfer_request_maximum_length = UX_OHCI_MAX_PAYLOAD;
+
+ /* Program the ED for subsequent transfers we need to set the following things:
1) Address of the device
2) endpoint number
3) speed
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_isochronous_endpoint_create.c b/common/usbx_host_controllers/src/ux_hcd_ohci_isochronous_endpoint_create.c
index 2c342d2..6abc362 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_isochronous_endpoint_create.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_isochronous_endpoint_create.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_isochronous_endpoint_create PORTABLE C */
-/* 6.1 */
+/* 6.1.6 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -71,6 +71,9 @@
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
/* resulting in version 6.1 */
+/* 04-02-2021 Chaoqiong Xiao Modified comment(s), */
+/* filled max transfer length, */
+/* resulting in version 6.1.6 */
/* */
/**************************************************************************/
UINT _ux_hcd_ohci_isochronous_endpoint_create(UX_HCD_OHCI *hcd_ohci, UX_ENDPOINT *endpoint)
@@ -102,9 +105,13 @@ UX_OHCI_ISO_TD *td;
/* Attach the ED to the endpoint container. */
endpoint -> ux_endpoint_ed = (VOID *) ed;
-
- /* Program the ED for subsequent transfers we need to set the following things:
+ /* We need to take into account the nature of the HCD to define the max size
+ of any transfer in the transfer request. */
+ endpoint -> ux_endpoint_transfer_request.ux_transfer_request_maximum_length =
+ endpoint -> ux_endpoint_descriptor.wMaxPacketSize;
+
+ /* Program the ED for subsequent transfers we need to set the following things:
1) Address of the device
2) endpoint number
3) speed (always full speed for iso)