1
2
3
4
5
6 #define PKUNITY_AC97_CONR (PKUNITY_AC97_BASE + 0x0000)
7 #define PKUNITY_AC97_OCR (PKUNITY_AC97_BASE + 0x0004)
8 #define PKUNITY_AC97_ICR (PKUNITY_AC97_BASE + 0x0008)
9 #define PKUNITY_AC97_CRAC (PKUNITY_AC97_BASE + 0x000C)
10 #define PKUNITY_AC97_INTR (PKUNITY_AC97_BASE + 0x0010)
11 #define PKUNITY_AC97_INTRSTAT (PKUNITY_AC97_BASE + 0x0014)
12 #define PKUNITY_AC97_INTRCLEAR (PKUNITY_AC97_BASE + 0x0018)
13 #define PKUNITY_AC97_ENABLE (PKUNITY_AC97_BASE + 0x001C)
14 #define PKUNITY_AC97_OUT_FIFO (PKUNITY_AC97_BASE + 0x0020)
15 #define PKUNITY_AC97_IN_FIFO (PKUNITY_AC97_BASE + 0x0030)
16
17 #define AC97_CODEC_REG(v) FIELD((v), 7, 16)
18 #define AC97_CODEC_VAL(v) FIELD((v), 16, 0)
19 #define AC97_CODEC_WRITECOMPLETE FIELD(1, 1, 2)
20
21
22
23
24 #define AC97_CMD_VPSAMPLE (FIELD(3, 2, 16) | FIELD(3, 2, 0))
25
26
27
28
29 #define AC97_CMD_FCSAMPLE FIELD(7, 3, 0)
30
31 #define AC97_CMD_RESET FIELD(1, 1, 0)
32 #define AC97_CMD_ENABLE FIELD(1, 1, 0)
33 #define AC97_CMD_DISABLE FIELD(0, 1, 0)