The host processing of the commands initiated by the system host is done independent of the system host and software. The exact steps the UFS host controller will perform may vary, but the baseline steps for a read/write operation are given below:
- The UFS host controller will read the selected command list entry with one 4-beat burst.
- Depending on the command type, further actions are taken. In case the command is read/write:
- The UFS host controller will fetch the first part of the UPIU (till the data segment) in 4-beat bursts. This will bring the header information and the SCSI command into the controller.
- The UFS host controller will read the first PRD entry with a 2-beat burst.
- Now the UFS host controller will set up its internal data structure and variables.
- To start the device communication, the UFS host controller will send the already fetched UPIU packet to the device.
- Now the device will initiate the data transfer phase by sending Ready-To-Transfer (RTT) UPIUs to the UFS host controller.
- The device either sends a RTT UPIU (in case of a write) or directly a Data In UPIU (in case of a read). The size of the Data In UPIU is not predefined.
- The UFS host controller either sends back the requested data with a Data Out UPIU, or takes the data and stores it in an internal buffer.
The above transactions between the UFS host controller and the device are executed until all data is transferred or an error occurred.
In parallel to the transactions between the UFS host controller and device, the data is transferred between the UFS host controller and system memory.
- On receiving the Response UPIU, the UFS host controller updates the Transfer Response field of the UTP Command Descriptor with the received UPIU.
- Once a command has been completed, depending on
the Interrupt Enable register (UFS_IE), an interrupt may be asserted to
signal the system host that the transfer is done.