1. NAME▲
ata_wait_register - wait until register value changes
2. SYNOPSIS ▲
u32 ata_wait_register(struct ata_port * ap , void __iomem * reg , u32 mask , u32 val , unsigned long interval , unsigned long timeout );
3. ARGUMENTS ▲
ap
ATA port to wait register for, can be NULL
reg
IO-mapped register
mask
Mask to apply to read register value
val
Wait condition
interval
polling interval in milliseconds
timeout
timeout in milliseconds
4. DESCRIPTION ▲
Waiting for some bits of register to change is a common operation for ATA controllers. This function reads 32bit LE IO-mapped register reg and tests for the following condition.
(*reg & mask) != val
If the condition is met, it returns; otherwise, the process is repeated after interval_msec until timeout.
5. LOCKING ▲
Kernel thread context (may sleep)
6. RETURNS ▲
The final register value.
7. AUTHOR ▲
Jeff Garzik
Author.
8. COPYRIGHT ▲