| Age | Commit message (Collapse) | Author |
|
* license: use SPDX identifiers for src/ headers
Replace the full ~20-line MIT license boilerplate on every src/ file with a
two-line SPDX tag (SPDX-FileCopyrightText + SPDX-License-Identifier), following
the REUSE convention used by CircuitPython and the Linux kernel. Removes ~3500
lines of duplicated boilerplate.
|
|
Signed-off-by: HiFiPhile <[email protected]>
|
|
|
|
|
|
|
|
# Conflicts:
- hw/bsp/lpc17/family.cmake
- hw/bsp/lpc40/family.cmake
- hw/bsp/lpc55/family.cmake
|
|
fix compiling with nuc family
|
|
|
|
|
|
|
|
|
|
Signed-off-by: HiFiPhile <[email protected]>
|
|
Signed-off-by: HiFiPhile <[email protected]>
|
|
This code is written very carefully to always use an uncached view
of memory to read/write EDs. An uncached view must *always* be used,
or else cache behavior can corrupt the ED.
As part of this change, combine access into as few word-sized accesses
as possible. This makes the code perform better. Doing this involves
giving type names to the bitfields that make up the ED's data words.
|
|
|
|
The initial motivation for doing this is to remove the `used` flag
in the TD. If we use this flag, we end up being required to read from TDs
that the OHCI controller might be modifying (i.e. the OHCI controller
logically owns the TD). This happens when we try to allocate a
new, empty TD while the OHCI host controller is working on a transfer.
Move the `used` flag to `gtd_extra_data_t`. This data is only used
by the CPU, and the OHCI controller never accesses it.
The existing allocation method for TDs does *not* put an empty TD
onto each ED (i.e it does *not* do what is shown in Figure 5-6
of the OHCI specification). Instead, the NextTD field of the last
TD is set to 0. The TailP field of the ED is also set to 0.
This works in many cases. However, this implementation means that
the CPU may end up trying to write to the NextTD field of an
in-progress transfer while the OHCI host controller logically owns it.
Change the implementation to use an empty TD, as suggested by the
specification, for endpoints other than EP0. This avoids the
above issue. It is not necessary to make the change for EP0
because only at most one TD can ever be pending at a time.
The above change should also remove the need for the stall workaround.
In the future, we want to modify the code to access EDs through
an uncached mapping. Because uncached mappings are slow, we want to
access EDs as little as possible. Currently, when a TD completes,
we access an ED in order to figure out the device address and
endpoint number of the TD which was completed.
Because moving `used` to `gtd_extra_data_t` necessitates expanding it,
we have enough room to also store the device address and endpoint number
of the TD. This patch does so.
With the above two changes, we no longer need to access an ED when
a TD completes. Also remove the `index` field from TDs as it is
no longer necessary.
|
|
|
|
|
|
|
|
hcd_bus_info_get
streamline bus info to usbh_devies, also replace dev0 (renamed to dev0_bus)
|
|
|
|
consistent
|
|
|
|
|
|
also rename gtd_data to gtd_extra
|
|
|
|
change tuh_int_handler() to take in_isr as optional parameter (default =
true)
|
|
|
|
|
|
|
|
|
|
- CFG_TUD_MEM_SECTION and CFG_TUD_MEM_ALIGN
- CFG_TUH_MEM_SECTION and CFG_TUH_MEM_ALIGN
- fix missing mem section and align for host
|
|
temporarily disable codespell
|
|
|
|
also add place holder for tusb_app_dcache_flush() and
tusb_app_dcache_invalidate()
|
|
|
|
completion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|