1ATA_WAIT_REGISTER(9) libata Library ATA_WAIT_REGISTER(9)
2
3
4
6 ata_wait_register - wait until register value changes
7
9 u32 ata_wait_register(void __iomem * reg, u32 mask, u32 val,
10 unsigned long interval, unsigned long timeout);
11
13 reg
14 IO-mapped register
15
16 mask
17 Mask to apply to read register value
18
19 val
20 Wait condition
21
22 interval
23 polling interval in milliseconds
24
25 timeout
26 timeout in milliseconds
27
29 Waiting for some bits of register to change is a common operation for
30 ATA controllers. This function reads 32bit LE IO-mapped register reg
31 and tests for the following condition.
32
33 (*reg & mask) != val
34
35 If the condition is met, it returns; otherwise, the process is repeated
36 after interval_msec until timeout.
37
39 Kernel thread context (may sleep)
40
42 The final register value.
43
45 Jeff Garzik
46 Author.
47
49Kernel Hackers Manual 2.6. November 2011 ATA_WAIT_REGISTER(9)