USB Host Controller Access to System Memory
14-84
unrecoverable error via the USB host interrupt mechanisms. If the USB host
local bus time-out feature is disabled, the USB host controller instead waits
indefinitely for completion of the local bus access and therefore locks up the
local bus.
14.6.2 Cache Coherency in OHCI Data Structures and Data Buffers
The OMAP5910 traffic controller does not provide mechanisms to flush (or
writeback) the MPU cache when a DMA controller or local bus access to
system memory occurs. Because there is no forced coherency mechanism,
the system implementation must ensure that the OMAP5910 USB host
controller can access the correct data from system memory, and that the MPU
accesses that same data. This requires that any system memory accessed by
the USB host controller be allocated in non-cached system memory.
If the OHCI data structures and/or data buffers are allocated in cached portions
of system memory, a cache coherency problem can exist because the MPU
can read from, and, if in writeback mode, write to the cache; but the USB host
controller accesses are always directly to the physical system memory. If the
data structures are in a cached portion of system memory and writeback mode
is enabled, it is possible the USB host controller could read stale data that has
not been updated by a cache writeback.
Similarly, if the data structure is in memory that is currently in the MPU cache
(either writeback or writethrough mode) and the OHCI controller modifies the
information in physical memory, the MPU can read stale data from the cache.
Cache coherency problems can be avoided by allocating the OHCI data struc-
tures (HCCA, EDs, and TDs) and the USB data buffers in noncacheable
system memory. In this case, every MPU access directly accesses physical
memory, so there is not a coherency issue. Configuration of cacheable
portions of the MPU virtual address space is provided via the MPU memory
management unit. See the description of the MPU MMU in Chapter 2, MPU
Subsystem.
14.6.3 Local Bus Addressing and OHCI Data Structure Pointers
Because of the limitations described in Section 14.6.1, Local Bus Virtual
Addressing, care is needed when programming the USB host controller OHCI
registers that are pointers to data structures and when initializing the pointers
inside those data structures. The USB host controller OHCI registers that point
to the HCCA and the ED lists must be programmed with values that are local
bus virtual addresses that correspond to the physical addresses of the particu-
lar data structure. In most cases, the USB host controller OHCI registers that
point to data structures in system memory are not programmed with the
address that the MPU software uses to access those data structures.