Architecture
1352
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Serial ATA (SATA) Controller
28.2.10.2 Issuing a Command
Once the host and device are configured, perform the following steps to issue a command:
1. Create the appropriate FIS in system memory.
2. Create the PRD.
3. Queue the command to the command queue list (location specified by the port command list base
address register (P0CLB).
For detailed information, see the AHCI Specification Version 1.1.
28.2.11 Interrupt Support
The AHCI controller supports both standard interrupt sourcing, where interrupts are generated when
enabled events occur, or a different type method of generating interrupts that minimize interrupt loading by
either generating interrupts in a batch or periodically.
The interrupt handling method where interrupt loading issue is a factor is handled using Command
Completion Coalescing method.
28.2.11.1 Command Completion Coalescing
Command Completion Coalescing (CCC) is a feature designed to reduce the interrupt and command
completion overhead in a heavily loaded system. The feature enables the number of interrupts taken per
completion to be reduced significantly, while ensuring a minimum quality of service for command
completions. When software specified number of commands have completed or a software specified
timeout has expired, an interrupt is generated by hardware to allow software to process completed
commands. the command completion coalescing ports register (CCC_PORTS) should be programmed
with 1 to indicate that the single available port, Port0, is selected.
For a detailed explanation of the CCC initialization and usage, see the AHCI Specification 1.1
Section 11.6.
28.2.11.1.1 CCC Interrupt Based on Timer Expiration
When CCC is enabled and the desired method to receive an interrupt is based on a timer elapse
condition, then you need to communicate a resolution for a 1ms time by programming the BIST DWORD
error count register (TIMER1MS) with the VBUS cycle count derived from the VBUS clock frequency
sourced to the SATA controller. For a CPU clock frequency of 300 MHz, the VBUS Clock is 150 MHz and
the 1ms cycle count is 150 MHz/1000 = 150000. This means that when the TV bit in the command
completion coalescing control register (CCC_CTL) is a non-zero value and the EN bit in CCC_CTL is set
to 1 (CCC is enabled), it will take 15 ms or 15 × 150000 = 2,250,000 VBUS cycles for the timer to elapse
and when it does, the CCC generates an interrupt. This happens periodically until disabled.
NOTE:
Make sure the CC bit in the command completion coalescing control register (CCC_CTL) is
cleared to 0.
28.2.11.1.2 CCC Interrupt Based on Completion Count
When CCC is enabled and the desired method to receive an interrupt is based on a completion count, that
is, the CC bit in the command completion coalescing control register (CCC_CTL) is programmed with a
non-zero value and the CCC interrupt is enabled (EN bit in CCC_CTL is set to 1), an interrupt is sourced
from the SATA controller when the programmed desired number of interrupt is received.
NOTE:
Make sure the TV bit in the command completion coalescing control register (CCC_CTL) is
cleared to 0.