Revision 1.0 21 www.national.com
Geode™ CS4210
Operational Description (Continued)
3.3.2.1 ContextControl.run
The ContextControl.run bit is set by software when the
CS4210 is to begin processing descriptors for the context.
Before software sets ContextControl.run, ContextCon-
trol.active must not be set, and the CommandPtr register
for the context must contain a valid descriptor block
address and a Z value that is appropriate for the descriptor
block address. Software may stop the CS4210 from further
processing of a context by clearing ContextControl.run.
When a ContextControl.run is cleared, the CS4210 will
stop processing of the context in a manner that will not
impact the operation of any other context or DMA control-
ler. The CS4210 may require a significant amount of time
to safely stop processing for a context but when the
CS4210 does stop, it clears ContextControl.active. If soft-
ware clears a ContextControl.run for an isochronous con-
text while the CS4210 is processing a packet for the
context, the CS4210 continues to receive or transmit the
packet and update descriptor status. The CS4210 does,
however, stop at the conclusion of that packet. If Context-
Control.run is cleared for a non-isochronous context, the
CS4210 may stop processing at any convenient point as
long as the context and descriptors end up in a consistent
state (e.g., status updated if a packet was sent and
acknowledged). Clearing ContextControl.run may have
other side effects that are DMA controller dependent.
These effects are described in the subsections of Section
4.4 "OHCI Configuration Registers" starting on page 48
that cover each of the DMA controllers. When software
clears ContextControl.run and the CS4210 has stopped,
the CS4210 is not necessarily in a state that can be
restarted simply by setting ContextControl.run. Software
should always ensure that CommandPtr.descriptorAddress
and CommandPtr.Z are set to valid values before setting
ContextControl.run.
3.3.2.2 ContextControl.wake
When software adds to a list of descriptors for a context,
the CS4210 may have already read the descriptor that was
at the end of the list before it was updated. The value that
the CS4210 read may contain a Z value of zero indicating
the end of the descriptor list. The ContextControl.wake bit
provides a simple semaphore to the hardware to indicate
that the list may have changed since the last time the
CS4210 read a descriptor. Therefore, if the CS4210 had
fetched a descriptor and the indicated branch address had
a Z value of zero, then the CS4210 rereads the pointer
value.
For transmit contexts and receive contexts in buffer-fill
mode (a mode in which a context can receive multiple
packets into one data buffer), if the Z value is still zero, then
the end of the list was reached and the CS4210 clears
ContextControl.active. For receive contexts in buffer-fill
mode, if the Z value is still zero on the reread, then the
packet cannot be accepted.
For asynchronous contexts, the CS4210 returns the appro-
priate ack_busy* code. In addition, the CS4210 “backs out”
the packet by not updating the buffer’s byte count (res-
Count), and flushes the packet from the FIFO. The CS4210
does not go inactive, as there is still buffer space available
and software is attempting to provide more buffer space.
For both transmit and receive contexts, if the Z value is now
non-zero, the CS4210 continues processing. In order to
ensure that a wake condition is not missed, the CS4210
clears ContextControl.wake before it reads or rereads a
descriptor. ContextControl.wake is ignored when Context-
Control.run is zero.
3.3.2.3 ContextControl.active
ContextControl.active is set and cleared only by the
CS4210. It is set when the CS4210 receives an indication
from software that a valid descriptor is available for pro-
cessing. This indication occurs as a result of software set-
ting the ContextControl.run or by software setting
ContextControl.wake while ContextControl.run is set.
TherearefourcasesinwhichtheCS4210clearsContext-
Control.active:
1) When a branch is indicated by a descriptor but the Z
value of the branch address is 0.
2) When software clears ContextControl.run and the
CS4210 has reached a safe stopping point.
3) While ContextControl.dead is set.
4) After a hardware or software reset of the CS4210.
Additionally, for the asynchronous transmit contexts
(request and response), the CS4210 clears ContextCon-
trol.active when a bus reset occurs. When ContextCon-
trol.active is cleared and ContextControl.run is already
clear, the CS4210 sets the IntEvent bit for the context. This
interrupt is the same interrupt that would have been gener-
ated by the context if a completed descriptor had indicated
that an interrupt should be generated.
3.3.2.4 ContextControl.dead
ContextControl.dead is used to indicate a fatal error in pro-
cessing a descriptor. When ContextControl.dead is set by
the CS4210, ContextControl.active is immediately cleared
but ContextControl.run remains set. In addition, setting
ContextControl.dead causes an unrecoverableError inter-
rupt event and blocks a normal context event interrupt from
being set. ContextControl.dead is immediately cleared
when software clears ContextControl.run or by either a
hardware or software reset of the CS4210. Software can
determine the cause of a context going dead by checking
the ContextControl.event code. The defined reasons for the
CS4210 to set ContextControl.dead are described in Sec-
tion 3.7 "Host Bus Errors" on page 28.