1ATA_WAIT_REGISTER(9)            libata Library            ATA_WAIT_REGISTER(9)
2
3
4

NAME

6       ata_wait_register - wait until register value changes
7

SYNOPSIS

9       u32 ata_wait_register(struct ata_port * ap, void __iomem * reg,
10                             u32 mask, u32 val, unsigned long interval,
11                             unsigned long timeout);
12

ARGUMENTS

14       ap
15           ATA port to wait register for, can be NULL
16
17       reg
18           IO-mapped register
19
20       mask
21           Mask to apply to read register value
22
23       val
24           Wait condition
25
26       interval
27           polling interval in milliseconds
28
29       timeout
30           timeout in milliseconds
31

DESCRIPTION

33       Waiting for some bits of register to change is a common operation for
34       ATA controllers. This function reads 32bit LE IO-mapped register reg
35       and tests for the following condition.
36
37       (*reg & mask) != val
38
39       If the condition is met, it returns; otherwise, the process is repeated
40       after interval_msec until timeout.
41

LOCKING

43       Kernel thread context (may sleep)
44

RETURNS

46       The final register value.
47

AUTHOR

49       Jeff Garzik
50           Author.
51
53Kernel Hackers Manual 3.10         June 2019              ATA_WAIT_REGISTER(9)
Impressum