summaryrefslogtreecommitdiff
path: root/common/usbx_host_controllers/src
diff options
context:
space:
mode:
authorYuxin Zhou <[email protected]>2022-04-20 05:09:21 +0000
committerYuxin Zhou <[email protected]>2022-04-20 05:09:21 +0000
commitb693cdd782f1dc0742d6b1915cdc3d08f6d0959c (patch)
tree03881d21bea4d34cb61fa5596bd6ba90f7b22639 /common/usbx_host_controllers/src
parent388e9732d1ae4b6f98906ae29deec2af88fee8b0 (diff)
Release 6.1.11v6.1.11_rel
Diffstat (limited to 'common/usbx_host_controllers/src')
-rwxr-xr-xcommon/usbx_host_controllers/src/ux_hcd_ehci_done_queue_process.c17
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_initialize.c19
-rwxr-xr-xcommon/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_create.c15
-rwxr-xr-xcommon/usbx_host_controllers/src/ux_hcd_ehci_interrupt_endpoint_destroy.c13
-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.c13
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_regular_td_obtain.c15
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ehci_request_isochronous_transfer.c13
-rwxr-xr-xcommon/usbx_host_controllers/src/ux_hcd_ehci_transfer_abort.c13
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_asynchronous_endpoint_create.c8
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_asynchronous_endpoint_destroy.c8
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_initialize.c15
-rw-r--r--common/usbx_host_controllers/src/ux_hcd_ohci_regular_td_obtain.c15
13 files changed, 114 insertions, 65 deletions
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_done_queue_process.c b/common/usbx_host_controllers/src/ux_hcd_ehci_done_queue_process.c
index d04571e..7c2dfec 100755
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_done_queue_process.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_done_queue_process.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_done_queue_process PORTABLE C */
-/* 6.1.2 */
+/* 6.1.11 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -79,6 +79,9 @@
/* 11-09-2020 Chaoqiong Xiao Modified comment(s), */
/* fixed compile warning, */
/* resulting in version 6.1.2 */
+/* 04-25-2022 Chaoqiong Xiao Modified comment(s), */
+/* fixed standalone compile, */
+/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
VOID _ux_hcd_ehci_done_queue_process(UX_HCD_EHCI *hcd_ehci)
@@ -93,7 +96,7 @@ UX_EHCI_ED *start_ed;
UX_EHCI_PERIODIC_LINK_POINTER lp;
/* We scan the active isochronous list first. */
- _ux_utility_mutex_on(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_on(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
lp.itd_ptr = hcd_ehci -> ux_hcd_ehci_hsiso_scan_list;
while(lp.itd_ptr != UX_NULL)
{
@@ -101,12 +104,12 @@ UX_EHCI_PERIODIC_LINK_POINTER lp;
/* Process the iTD, return next active TD. */
lp.itd_ptr = _ux_hcd_ehci_hsisochronous_tds_process(hcd_ehci, lp.itd_ptr);
}
- _ux_utility_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
#if defined(UX_HCD_EHCI_SPLIT_TRANSFER_ENABLE)
/* We scan the split isochronous list then. */
- _ux_utility_mutex_on(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_on(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
lp.sitd_ptr = hcd_ehci -> ux_hcd_ehci_fsiso_scan_list;
while(lp.sitd_ptr != UX_NULL)
{
@@ -114,13 +117,13 @@ UX_EHCI_PERIODIC_LINK_POINTER lp;
/* Process the iTD, return next active TD. */
lp.sitd_ptr = _ux_hcd_ehci_fsisochronous_tds_process(hcd_ehci, lp.sitd_ptr);
}
- _ux_utility_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
#endif
#endif
/* We scan the linked interrupt list then. */
- _ux_utility_mutex_on(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_on(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
ed.ed_ptr = hcd_ehci -> ux_hcd_ehci_interrupt_ed_list;
while(ed.ed_ptr != UX_NULL)
{
@@ -135,7 +138,7 @@ UX_EHCI_PERIODIC_LINK_POINTER lp;
/* Next ED. */
ed.ed_ptr = ed.ed_ptr -> ux_ehci_ed_next_ed;
}
- _ux_utility_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
/* Now we can parse the asynchronous list. The head ED is always empty and
used as an anchor only. */
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_initialize.c b/common/usbx_host_controllers/src/ux_hcd_ehci_initialize.c
index ec2cbc4..24b849d 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_initialize.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_initialize.c
@@ -60,7 +60,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_initialize PORTABLE C */
-/* 6.1.10 */
+/* 6.1.11 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -90,8 +90,8 @@
/* _ux_utility_physical_address Get physical address */
/* _ux_host_semaphore_create Create semaphore */
/* _ux_host_semaphore_delete Delete semaphore */
-/* _ux_utility_mutex_create Create mutex */
-/* _ux_utility_mutex_delete Delete mutex */
+/* _ux_host_mutex_create Create mutex */
+/* _ux_host_mutex_delete Delete mutex */
/* _ux_utility_set_interrupt_handler Set interrupt handler */
/* _ux_utility_delay_ms Delay ms */
/* */
@@ -114,10 +114,17 @@
/* 01-31-2022 Chaoqiong Xiao Modified comment(s), */
/* refined macros names, */
/* resulting in version 6.1.10 */
+/* 04-25-2022 Chaoqiong Xiao Modified comment(s), */
+/* fixed standalone compile, */
+/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UINT _ux_hcd_ehci_initialize(UX_HCD *hcd)
{
+#if defined(UX_HOST_STANDALONE)
+ UX_PARAMETER_NOT_USED(hcd);
+ return(UX_FUNCTION_NOT_SUPPORTED);
+#else
UX_HCD_EHCI *hcd_ehci;
UX_EHCI_ED *ed;
@@ -329,7 +336,7 @@ UINT status = UX_SUCCESS;
_ux_hcd_ehci_register_write(hcd_ehci, EHCI_HCOR_CONFIG_FLAG, UX_EHCI_ROUTE_TO_LOCAL_HC);
/* Create mutex for periodic list modification. */
- status = _ux_utility_mutex_create(&hcd_ehci -> ux_hcd_ehci_periodic_mutex, "ehci_periodic_mutex");
+ status = _ux_host_mutex_create(&hcd_ehci -> ux_hcd_ehci_periodic_mutex, "ehci_periodic_mutex");
if (status != UX_SUCCESS)
status = (UX_MUTEX_ERROR);
}
@@ -420,7 +427,7 @@ UINT status = UX_SUCCESS;
_ux_utility_memory_free(hcd_ehci -> ux_hcd_ehci_hsiso_td_list);
#endif
if (hcd_ehci -> ux_hcd_ehci_periodic_mutex.tx_mutex_id != 0)
- _ux_utility_mutex_delete(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_delete(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
if (hcd_ehci -> ux_hcd_ehci_protect_semaphore.tx_semaphore_id != 0)
_ux_host_semaphore_delete(&hcd_ehci -> ux_hcd_ehci_protect_semaphore);
if (hcd_ehci -> ux_hcd_ehci_doorbell_semaphore.tx_semaphore_id != 0)
@@ -429,5 +436,5 @@ UINT status = UX_SUCCESS;
/* Return error status code. */
return(status);
+#endif
}
-
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 488c54f..21de45b 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.6 */
+/* 6.1.11 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -76,8 +76,8 @@
/* _ux_hcd_ehci_least_traffic_list_get Get least traffic list */
/* _ux_hcd_ehci_poll_rate_entry_get Get anchor for poll rate */
/* _ux_utility_physical_address Get physical address */
-/* _ux_utility_mutex_on Get mutex */
-/* _ux_utility_mutex_off Put mutex */
+/* _ux_host_mutex_on Get mutex */
+/* _ux_host_mutex_off Put mutex */
/* _ux_hcd_ehci_periodic_descriptor_link Link/unlink descriptor */
/* */
/* CALLED BY */
@@ -101,6 +101,9 @@
/* some macro options, */
/* filled max transfer length, */
/* resulting in version 6.1.6 */
+/* 04-25-2022 Chaoqiong Xiao Modified comment(s), */
+/* fixed standalone compile, */
+/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UINT _ux_hcd_ehci_interrupt_endpoint_create(UX_HCD_EHCI *hcd_ehci, UX_ENDPOINT *endpoint)
@@ -245,7 +248,7 @@ UINT i;
interval = (1u << interval); /* 1 (1/8ms), 2, 4, 8 (1ms) */
/* We are now updating the periodic list. */
- _ux_utility_mutex_on(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_on(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
/* Get the list index with the least traffic. */
ed_list = _ux_hcd_ehci_least_traffic_list_get(hcd_ehci, microframe_load, microframe_ssplit_count);
@@ -292,7 +295,7 @@ UINT i;
not be error but we check it any way. */
if (i >= interval)
{
- _ux_utility_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
ed -> ux_ehci_ed_status = UX_UNUSED;
return(UX_NO_BANDWIDTH_AVAILABLE);
}
@@ -411,7 +414,7 @@ UINT i;
hcd_ehci -> ux_hcd_ehci_interrupt_ed_list = ed;
/* Release the periodic list. */
- _ux_utility_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
/* Return successful completion. */
return(UX_SUCCESS);
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 822c7bc..3e7284e 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.6 */
+/* 6.1.11 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -57,8 +57,8 @@
/* */
/* _ux_hcd_ehci_door_bell_wait Setup doorbell wait */
/* _ux_utility_physical_address Get physical address */
-/* _ux_utility_mutex_on Get mutex */
-/* _ux_utility_mutex_off Put mutex */
+/* _ux_host_mutex_on Get mutex */
+/* _ux_host_mutex_off Put mutex */
/* _ux_hcd_ehci_periodic_descriptor_link Link/unlink descriptor */
/* */
/* CALLED BY */
@@ -79,6 +79,9 @@
/* fixed compile issues with */
/* some macro options, */
/* resulting in version 6.1.6 */
+/* 04-25-2022 Chaoqiong Xiao Modified comment(s), */
+/* fixed standalone compile, */
+/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UINT _ux_hcd_ehci_interrupt_endpoint_destroy(UX_HCD_EHCI *hcd_ehci, UX_ENDPOINT *endpoint)
@@ -94,7 +97,7 @@ ULONG max_packet_size;
ed = (UX_EHCI_ED *) endpoint -> ux_endpoint_ed;
/* Access to periodic list. */
- _ux_utility_mutex_on(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_on(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
/* Unlink the periodic item. */
_ux_hcd_ehci_periodic_descriptor_link(ed -> ux_ehci_ed_previous_ed,
@@ -190,7 +193,7 @@ ULONG max_packet_size;
}
/* Release periodic list. */
- _ux_utility_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
/* Arm the doorbell and wait for its completion. */
_ux_hcd_ehci_door_bell_wait(hcd_ehci);
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 29dd251..ef068a0 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.6 */
+/* 6.1.11 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -61,8 +61,8 @@
/* _ux_hcd_ehci_least_traffic_list_get Get least traffic list */
/* _ux_hcd_ehci_poll_rate_entry_get Get anchor for poll rate */
/* _ux_utility_physical_address Get physical address */
-/* _ux_utility_mutex_on Get mutex */
-/* _ux_utility_mutex_off Put mutex */
+/* _ux_host_mutex_on Get mutex */
+/* _ux_host_mutex_off Put mutex */
/* _ux_hcd_ehci_periodic_descriptor_link Link/unlink descriptor */
/* */
/* CALLED BY */
@@ -84,6 +84,9 @@
/* some macro options, */
/* filled max transfer length, */
/* resulting in version 6.1.6 */
+/* 04-25-2022 Chaoqiong Xiao Modified comment(s), */
+/* fixed standalone compile, */
+/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UINT _ux_hcd_ehci_isochronous_endpoint_create(UX_HCD_EHCI *hcd_ehci, UX_ENDPOINT *endpoint)
@@ -326,7 +329,7 @@ UINT status;
}
/* Lock the periodic list to update. */
- _ux_utility_mutex_on(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_on(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
/* Get the list index with the least traffic. */
ed_list = _ux_hcd_ehci_least_traffic_list_get(hcd_ehci, microframe_load, microframe_ssplit_count);
@@ -370,7 +373,7 @@ UINT status;
not be error but we check it any way. */
if (microframe_i >= interval)
{
- _ux_utility_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
for (i = 0; i < ed -> ux_ehci_hsiso_ed_nb_tds; i ++)
ed -> ux_ehci_hsiso_ed_fr_td[i] -> ux_ehci_hsiso_td_status = UX_UNUSED;
_ux_utility_memory_free(ed);
@@ -555,7 +558,7 @@ UINT status;
}
/* Release the periodic table. */
- _ux_utility_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
/* Return successful completion. */
return(UX_SUCCESS);
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 92c3bf0..8fa5720 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.6 */
+/* 6.1.11 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -56,8 +56,8 @@
/* CALLS */
/* */
/* None */
-/* _ux_utility_mutex_on Get mutex */
-/* _ux_utility_mutex_off Put mutex */
+/* _ux_host_mutex_on Get mutex */
+/* _ux_host_mutex_off Put mutex */
/* _ux_hcd_ehci_periodic_descriptor_link Link/unlink descriptor */
/* _ux_utility_memory_free Free memory */
/* */
@@ -79,6 +79,9 @@
/* fixed compile issues with */
/* some macro options, */
/* resulting in version 6.1.6 */
+/* 04-25-2022 Chaoqiong Xiao Modified comment(s), */
+/* fixed standalone compile, */
+/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UINT _ux_hcd_ehci_isochronous_endpoint_destroy(UX_HCD_EHCI *hcd_ehci, UX_ENDPOINT *endpoint)
@@ -114,7 +117,7 @@ ULONG last_size;
ed_td.void_ptr = endpoint -> ux_endpoint_ed;
/* Access to periodic list. */
- _ux_utility_mutex_on(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_on(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
/* Check active iTD/siTD and unlink it. */
#if defined(UX_HCD_EHCI_SPLIT_TRANSFER_ENABLE)
@@ -269,7 +272,7 @@ ULONG last_size;
}
/* Release periodic list. */
- _ux_utility_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
/* Now we can safely make the iTD/siTDs free. */
#if defined(UX_HCD_EHCI_SPLIT_TRANSFER_ENABLE)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_regular_td_obtain.c b/common/usbx_host_controllers/src/ux_hcd_ehci_regular_td_obtain.c
index 7a5a08b..d4af36d 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_regular_td_obtain.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_regular_td_obtain.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_regular_td_obtain PORTABLE C */
-/* 6.1 */
+/* 6.1.11 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -55,8 +55,8 @@
/* CALLS */
/* */
/* _ux_utility_memory_set Set memory block */
-/* _ux_utility_mutex_on Get protection mutex */
-/* _ux_utility_mutex_off Release protection mutex */
+/* _ux_host_mutex_on Get protection mutex */
+/* _ux_host_mutex_off Release protection mutex */
/* */
/* CALLED BY */
/* */
@@ -71,6 +71,9 @@
/* verified memset and memcpy */
/* cases, */
/* resulting in version 6.1 */
+/* 04-25-2022 Chaoqiong Xiao Modified comment(s), */
+/* fixed standalone compile, */
+/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UX_EHCI_TD *_ux_hcd_ehci_regular_td_obtain(UX_HCD_EHCI *hcd_ehci)
@@ -82,7 +85,7 @@ ULONG td_element;
/* Get the mutex as this is a critical section. */
- _ux_utility_mutex_on(&_ux_system -> ux_system_mutex);
+ _ux_host_mutex_on(&_ux_system -> ux_system_mutex);
/* Start the search from the beginning of the list. */
td = hcd_ehci -> ux_hcd_ehci_td_list;
@@ -105,7 +108,7 @@ ULONG td_element;
td -> ux_ehci_td_alternate_link_pointer = (UX_EHCI_TD *) td_element;
/* Release the protection. */
- _ux_utility_mutex_off(&_ux_system -> ux_system_mutex);
+ _ux_host_mutex_off(&_ux_system -> ux_system_mutex);
/* Success, return TD pointer. */
return(td);
@@ -118,7 +121,7 @@ ULONG td_element;
/* There is no available TD in the TD list. */
/* Release protection. */
- _ux_utility_mutex_off(&_ux_system -> ux_system_mutex);
+ _ux_host_mutex_off(&_ux_system -> ux_system_mutex);
/* Error, return a null. */
return(UX_NULL);
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_request_isochronous_transfer.c b/common/usbx_host_controllers/src/ux_hcd_ehci_request_isochronous_transfer.c
index 22a68c1..d3df179 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_request_isochronous_transfer.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_request_isochronous_transfer.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_request_isochronous_transfer PORTABLE C */
-/* 6.1.10 */
+/* 6.1.11 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -65,8 +65,8 @@
/* */
/* CALLS */
/* */
-/* _ux_utility_mutex_on Get mutex */
-/* _ux_utility_mutex_off Put mutex */
+/* _ux_host_mutex_on Get mutex */
+/* _ux_host_mutex_off Put mutex */
/* _ux_host_semaphore_put Put semaphore */
/* */
/* CALLED BY */
@@ -83,6 +83,9 @@
/* 01-31-2022 Chaoqiong Xiao Modified comment(s), */
/* refined macros names, */
/* resulting in version 6.1.10 */
+/* 04-25-2022 Chaoqiong Xiao Modified comment(s), */
+/* fixed standalone compile, */
+/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UINT _ux_hcd_ehci_request_isochronous_transfer(UX_HCD_EHCI *hcd_ehci, UX_TRANSFER *transfer_request)
@@ -116,7 +119,7 @@ UCHAR start = UX_FALSE;
lp.ed_ptr = endpoint -> ux_endpoint_ed;
/* Lock the periodic list to update. */
- _ux_utility_mutex_on(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_on(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
/* Append the request to iTD/siTD request list tail. */
#if defined(UX_HCD_EHCI_SPLIT_TRANSFER_ENABLE)
@@ -167,7 +170,7 @@ UCHAR start = UX_FALSE;
(*tail) = ((*tail) -> ux_transfer_request_next_transfer_request);
/* Release the periodic table. */
- _ux_utility_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
/* Simulate iTD/siTD done to start - HCD signal. */
if (start)
diff --git a/common/usbx_host_controllers/src/ux_hcd_ehci_transfer_abort.c b/common/usbx_host_controllers/src/ux_hcd_ehci_transfer_abort.c
index 74c280c..f2df19a 100755
--- a/common/usbx_host_controllers/src/ux_hcd_ehci_transfer_abort.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ehci_transfer_abort.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ehci_transfer_abort PORTABLE C */
-/* 6.1.8 */
+/* 6.1.11 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -57,8 +57,8 @@
/* CALLS */
/* */
/* _ux_utility_virtual_address Get virtual address */
-/* _ux_utility_mutex_on Get mutex */
-/* _ux_utility_mutex_off Put mutex */
+/* _ux_host_mutex_on Get mutex */
+/* _ux_host_mutex_off Put mutex */
/* _ux_utility_delay_ms Delay milliseconds */
/* _ux_hcd_ehci_ed_clean Clean TDs on ED */
/* */
@@ -79,6 +79,9 @@
/* 08-02-2021 Wen Wang Modified comment(s), */
/* fixed spelling error, */
/* resulting in version 6.1.8 */
+/* 04-25-2022 Chaoqiong Xiao Modified comment(s), */
+/* fixed standalone compile, */
+/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UINT _ux_hcd_ehci_transfer_abort(UX_HCD_EHCI *hcd_ehci,UX_TRANSFER *transfer_request)
@@ -116,7 +119,7 @@ ULONG remain_count;
{
/* Lock the periodic table. */
- _ux_utility_mutex_on(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_on(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
#if defined(UX_HCD_EHCI_SPLIT_TRANSFER_ENABLE)
if (endpoint -> ux_endpoint_device -> ux_device_speed != UX_HIGH_SPEED_DEVICE)
@@ -177,7 +180,7 @@ ULONG remain_count;
_ux_utility_delay_ms(1);
/* Release the periodic table. */
- _ux_utility_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
+ _ux_host_mutex_off(&hcd_ehci -> ux_hcd_ehci_periodic_mutex);
}
else
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_asynchronous_endpoint_create.c b/common/usbx_host_controllers/src/ux_hcd_ohci_asynchronous_endpoint_create.c
index 6012699..497707c 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_asynchronous_endpoint_create.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_asynchronous_endpoint_create.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_asynchronous_endpoint_create PORTABLE C */
-/* 6.1 */
+/* 6.1.11 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -72,6 +72,9 @@
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
/* resulting in version 6.1 */
+/* 04-25-2022 Chaoqiong Xiao Modified comment(s), */
+/* fixed an addressing issue, */
+/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UINT _ux_hcd_ohci_asynchronous_endpoint_create(UX_HCD_OHCI *hcd_ohci, UX_ENDPOINT *endpoint)
@@ -161,7 +164,10 @@ ULONG ohci_register;
/* Build the back chaining pointer. The previous head ED needs to know about the
inserted ED. */
if (head_ed != UX_NULL)
+ {
+ head_ed = _ux_utility_physical_address(head_ed);
head_ed -> ux_ohci_ed_previous_ed = ed;
+ }
/* Return successful completion. */
return(UX_SUCCESS);
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_asynchronous_endpoint_destroy.c b/common/usbx_host_controllers/src/ux_hcd_ohci_asynchronous_endpoint_destroy.c
index d197298..439da05 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_asynchronous_endpoint_destroy.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_asynchronous_endpoint_destroy.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_asynchronous_endpoint_destroy PORTABLE C */
-/* 6.1 */
+/* 6.1.11 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -74,6 +74,9 @@
/* fixed physical and virtual */
/* address conversion, */
/* resulting in version 6.1 */
+/* 04-25-2022 Chaoqiong Xiao Modified comment(s), */
+/* fixed an addressing issue, */
+/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UINT _ux_hcd_ohci_asynchronous_endpoint_destroy(UX_HCD_OHCI *hcd_ohci, UX_ENDPOINT *endpoint)
@@ -164,7 +167,10 @@ ULONG ohci_register;
/* Update the previous ED pointer in the next ED if exists. */
if (next_ed != UX_NULL)
+ {
+ next_ed = _ux_utility_virtual_address(next_ed);
next_ed -> ux_ohci_ed_previous_ed = previous_ed;
+ }
/* Ensure that the potential Halt bit is removed in the head ED. */
value_td = (ULONG) _ux_utility_virtual_address(ed -> ux_ohci_ed_head_td) & UX_OHCI_ED_MASK_TD;
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_initialize.c b/common/usbx_host_controllers/src/ux_hcd_ohci_initialize.c
index 2ad6205..b8400c2 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_initialize.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_initialize.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_initialize PORTABLE C */
-/* 6.1.10 */
+/* 6.1.11 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -61,8 +61,8 @@
/* _ux_hcd_ohci_register_read Read OHCI register */
/* _ux_hcd_ohci_register_write Write OHCI register */
/* _ux_utility_memory_allocate Allocate memory block */
-/* _ux_utility_mutex_on Get mutex protection */
-/* _ux_utility_mutex_off Release mutex protection */
+/* _ux_host_mutex_on Get mutex protection */
+/* _ux_host_mutex_off Release mutex protection */
/* _ux_utility_physical_address Get physical address */
/* _ux_utility_set_interrupt_handler Setup interrupt handler */
/* */
@@ -82,6 +82,9 @@
/* 01-31-2022 Xiuwen Cai Modified comment(s), */
/* fixed HcPeriodicStart value,*/
/* resulting in version 6.1.10 */
+/* 04-25-2022 Chaoqiong Xiao Modified comment(s), */
+/* fixed standalone compile, */
+/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UINT _ux_hcd_ohci_initialize(UX_HCD *hcd)
@@ -161,7 +164,7 @@ UINT status;
/* The following is time critical. If we get interrupted here, the controller will go in
suspend mode. Get the protection mutex. */
- _ux_utility_mutex_on(&_ux_system -> ux_system_mutex);
+ _ux_host_mutex_on(&_ux_system -> ux_system_mutex);
/* Send the reset command to the controller. The controller should ack
this command within 10us. We try this several time and check for timeout. */
@@ -180,7 +183,7 @@ UINT status;
{
/* Release the thread protection. */
- _ux_utility_mutex_off(&_ux_system -> ux_system_mutex);
+ _ux_host_mutex_off(&_ux_system -> ux_system_mutex);
/* Error trap. */
_ux_system_error_handler(UX_SYSTEM_LEVEL_THREAD, UX_SYSTEM_CONTEXT_HCD, UX_CONTROLLER_INIT_FAILED);
@@ -206,7 +209,7 @@ UINT status;
hcd -> ux_hcd_status = UX_HCD_STATUS_OPERATIONAL;
/* We can safely release the mutex protection. */
- _ux_utility_mutex_off(&_ux_system -> ux_system_mutex);
+ _ux_host_mutex_off(&_ux_system -> ux_system_mutex);
/* Set the controller interval. */
ohci_register = _ux_hcd_ohci_register_read(hcd_ohci, OHCI_HC_FM_INTERVAL) & OHCI_HC_FM_INTERVAL_CLEAR;
diff --git a/common/usbx_host_controllers/src/ux_hcd_ohci_regular_td_obtain.c b/common/usbx_host_controllers/src/ux_hcd_ohci_regular_td_obtain.c
index 71bf441..064dcc8 100644
--- a/common/usbx_host_controllers/src/ux_hcd_ohci_regular_td_obtain.c
+++ b/common/usbx_host_controllers/src/ux_hcd_ohci_regular_td_obtain.c
@@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _ux_hcd_ohci_regular_td_obtain PORTABLE C */
-/* 6.1 */
+/* 6.1.11 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
@@ -55,8 +55,8 @@
/* CALLS */
/* */
/* _ux_utility_memory_set Set memory block */
-/* _ux_utility_mutex_on Get protection mutex */
-/* _ux_utility_mutex_off Release protection mutex */
+/* _ux_host_mutex_on Get protection mutex */
+/* _ux_host_mutex_off Release protection mutex */
/* */
/* CALLED BY */
/* */
@@ -71,6 +71,9 @@
/* verified memset and memcpy */
/* cases, */
/* resulting in version 6.1 */
+/* 04-25-2022 Chaoqiong Xiao Modified comment(s), */
+/* fixed standalone compile, */
+/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UX_OHCI_TD *_ux_hcd_ohci_regular_td_obtain(UX_HCD_OHCI *hcd_ohci)
@@ -81,7 +84,7 @@ ULONG td_index;
/* Set the Mutex as this is a critical section. */
- _ux_utility_mutex_on(&_ux_system -> ux_system_mutex);
+ _ux_host_mutex_on(&_ux_system -> ux_system_mutex);
/* Start the search from the beginning of the regular TD list. */
td = hcd_ohci -> ux_hcd_ohci_td_list;
@@ -100,7 +103,7 @@ ULONG td_index;
td -> ux_ohci_td_status = UX_USED;
/* Release the protection. */
- _ux_utility_mutex_off(&_ux_system -> ux_system_mutex);
+ _ux_host_mutex_off(&_ux_system -> ux_system_mutex);
/* Return TD pointer - success! */
return(td);
@@ -113,7 +116,7 @@ ULONG td_index;
/* There is no available TD in the TD list. */
/* Release protection. */
- _ux_utility_mutex_off(&_ux_system -> ux_system_mutex);
+ _ux_host_mutex_off(&_ux_system -> ux_system_mutex);
/* Return NULL to caller. */
return(UX_NULL);