The host software processes the interrupt
generated by the UFS host controller for command completion. In the interrupt
service routine, the host software checks the UFS_IS register to determine if there
is an interrupt pending. If the UFS host controller has an interrupt pending:
- The host software determines
the cause of the interrupt by reading the UFS_IS register. If the UFS_IS[9]
UTMRCS bit is set this indicates that a UTP Task Management Request has
completed.
- The host software clears
appropriate bits in the UFS_IS register corresponding to the cause of the
interrupt.
- The host software reads the
UFS_UTMRLDBR register, and compares the current value to the list of
commands previously issued by the host software that are still outstanding.
The host software completes with success any outstanding command whose
corresponding bit has been cleared in the respective register. The
UFS_UTMRLDBR register is a volatile. The software should only use its value
to determine commands that have completed, not to determine which commands
have previously been issued.
- If there were errors, noted
in the UFS_IS register, the host software performs error recovery
actions.