Adding Queue Heads To Asynchronous Schedule; Removing Queue Heads From Asynchronous Schedule - Freescale Semiconductor MPC8313E Family Reference Manual

Powerquicc ii pro integrated processor
Hide thumbs Also See for MPC8313E:
Table of Contents

Advertisement

Universal Serial Bus Interface
The maximum packet size field in a queue head is sized to accommodate the use of this data structure for
all non-isochronous transfer types. The USB Specification, Revision 2.0 specifies the maximum packet
sizes for all transfer types and transfer speeds. System software should always parameterize the queue head
data structures according to the core specification requirements.
16.6.9.1

Adding Queue Heads to Asynchronous Schedule

This is a software requirement section. There are two independent events for adding queue heads to the
asynchronous schedule. The first is the initial activation of the asynchronous list. The second is inserting
a new queue head into an activated asynchronous list.
Activation of the list is simple. System software writes the physical memory address of a queue head into
the ASYNCLISTADDR register, then enables the list by setting USBCMD[ASE] to a one.
When inserting a queue head into an active list, software must ensure that the schedule is always coherent
from the host controllers' point of view. This means that the system software must ensure that all queue
head pointer fields are valid. For example qTD pointers have T-Bits set or reference valid qTDs and the
Horizontal Pointer references a valid queue head data structure. The following algorithm represents the
functional requirements:
InsertQueueHead (pQHeadCurrent, pQueueHeadNew)
--
-- Requirement: all inputs must be properly initialized.
--
-- pQHeadCurrent is a pointer to a queue head that is
-- already in the active list
-- pQHeadNew is a pointer to the queue head to be added
--
-- This algorithm links a new queue head into a existing
-- list
--
pQueueHeadNew.HorizontalPointer = pQueueHeadCurrent.HorizontalPointer
pQueueHeadCurrent.HorizontalPointer = physicalAddressOf(pQueueHeadNew)
End InsertQueueHead
16.6.9.2

Removing Queue Heads from Asynchronous Schedule

This is a software requirement section. There are two independent events for removing queue heads from
the asynchronous schedule. The first is shutting down (deactivating) the asynchronous list. The second is
extracting a single queue head from an activated list. Software deactivates the asynchronous schedule by
setting USBCMD[ASE] to a zero. Software can determine when the list is idle when USBSTS[AS] is
cleared. The normal mode of operation is that software removes queue heads from the asynchronous
schedule without shutting it down. Software must not remove an active queue head from the schedule.
Software should first deactivate all active qTDs, wait for the queue head to go inactive, then remove the
queue head from the asynchronous list. Software removes a queue head from the asynchronous list using
the following algorithm. Software merely must ensure all of the link pointers reachable by the host
controller are kept consistent.
UnlinkQueueHead (pQHeadPrevious, pQueueHeadToUnlink, pQHeadNext)
--
-- Requirement: all inputs must be properly initialized.
--
MPC8313E PowerQUICC II Pro Integrated Processor Family Reference Manual, Rev. 3
16-84
Freescale Semiconductor

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mpc8313

Table of Contents