|
1 | 1 | /*
|
2 |
| - * Copyright (c) 2006-2020, RT-Thread Development Team |
| 2 | + * Copyright (c) 2006-2021, RT-Thread Development Team |
3 | 3 | *
|
4 | 4 | * SPDX-License-Identifier: Apache-2.0
|
5 | 5 | *
|
|
14 | 14 | #define PL041_BASE_ADDR (0x10004000)
|
15 | 15 |
|
16 | 16 | /* offsets in CTRL_CH */
|
17 |
| -#define AACI_RXCR 0x00 /* 29 bits Control Rx FIFO */ |
18 |
| -#define AACI_TXCR 0x04 /* 17 bits Control Tx FIFO */ |
19 |
| -#define AACI_SR 0x08 /* 12 bits Status */ |
20 |
| -#define AACI_ISR 0x0C /* 7 bits Int Status */ |
21 |
| -#define AACI_IE 0x10 /* 7 bits Int Enable */ |
| 17 | +#define AACI_RXCR 0x00 /* 29 bits Control Rx FIFO */ |
| 18 | +#define AACI_TXCR 0x04 /* 17 bits Control Tx FIFO */ |
| 19 | +#define AACI_SR 0x08 /* 12 bits Status */ |
| 20 | +#define AACI_ISR 0x0C /* 7 bits Int Status */ |
| 21 | +#define AACI_IE 0x10 /* 7 bits Int Enable */ |
22 | 22 |
|
23 | 23 | /* both for AACI_RXCR and AACI_TXCR */
|
24 | 24 | #define AACI_CR_FEN (1 << 16) /* fifo enable */
|
|
39 | 39 | #define AACI_CR_SL3 (1 << 3)
|
40 | 40 | #define AACI_CR_SL2 (1 << 2)
|
41 | 41 | #define AACI_CR_SL1 (1 << 1)
|
42 |
| -#define AACI_CR_EN (1 << 0) /* receive enable */ |
| 42 | +#define AACI_CR_EN (1 << 0) /* receive enable */ |
43 | 43 |
|
44 | 44 | /* status register bits */
|
45 | 45 | #define AACI_SR_RXTOFE (1 << 11) /* rx timeout fifo empty */
|
|
66 | 66 | /* interrupt enable */
|
67 | 67 | #define AACI_IE_RXTOIE (1 << 6) /*rx timeout interrupt enable*/
|
68 | 68 | #define AACI_IE_URIE (1 << 5) /*Transmit underrun interrupt enable*/
|
69 |
| -#define AACI_IE_ORIE (1 << 4) /*Overrun receive interrupt enable*/ |
| 69 | +#define AACI_IE_ORIE (1 << 4) /*Overrun receive interrupt enable*/ |
70 | 70 | #define AACI_IE_RXIE (1 << 3) /*Receive interrupt enable*/
|
71 | 71 | #define AACI_IE_TXIE (1 << 2) /*Transmit interrupt enable*/
|
72 | 72 | #define AACI_IE_RXTIE (1 << 1) /*Receive timeout interrupt enable*/
|
73 |
| -#define AACI_IE_TXCIE (1 << 0) /*Transmit complete interrupt enable*/ |
| 73 | +#define AACI_IE_TXCIE (1 << 0) /*Transmit complete interrupt enable*/ |
74 | 74 |
|
75 | 75 | /* interrupt status */
|
76 |
| -#define AACI_ISR_RXTOFE (1 << 6) /* rx timeout fifo empty */ |
77 |
| -#define AACI_ISR_UR (1 << 5) /* tx fifo underrun */ |
78 |
| -#define AACI_ISR_OR (1 << 4) /* rx fifo overrun */ |
79 |
| -#define AACI_ISR_RX (1 << 3) /* rx interrupt status */ |
80 |
| -#define AACI_ISR_TX (1 << 2) /* tx interrupt status */ |
81 |
| -#define AACI_ISR_RXTO (1 << 1) /* rx timeout */ |
82 |
| -#define AACI_ISR_TXC (1 << 0) /* tx complete */ |
| 76 | +#define AACI_ISR_RXTOFE (1 << 6) /* rx timeout fifo empty */ |
| 77 | +#define AACI_ISR_UR (1 << 5) /* tx fifo underrun */ |
| 78 | +#define AACI_ISR_OR (1 << 4) /* rx fifo overrun */ |
| 79 | +#define AACI_ISR_RX (1 << 3) /* rx interrupt status */ |
| 80 | +#define AACI_ISR_TX (1 << 2) /* tx interrupt status */ |
| 81 | +#define AACI_ISR_RXTO (1 << 1) /* rx timeout */ |
| 82 | +#define AACI_ISR_TXC (1 << 0) /* tx complete */ |
83 | 83 |
|
84 | 84 | /* interrupt enable */
|
85 |
| -#define AACI_IE_RXTOFE (1 << 6) /* rx timeout fifo empty */ |
86 |
| -#define AACI_IE_UR (1 << 5) /* tx fifo underrun */ |
87 |
| -#define AACI_IE_OR (1 << 4) /* rx fifo overrun */ |
88 |
| -#define AACI_IE_RX (1 << 3) /* rx interrupt status */ |
89 |
| -#define AACI_IE_TX (1 << 2) /* tx interrupt status */ |
90 |
| -#define AACI_IE_RXTO (1 << 1) /* rx timeout */ |
91 |
| -#define AACI_IE_TXC (1 << 0) /* tx complete */ |
| 85 | +#define AACI_IE_RXTOFE (1 << 6) /* rx timeout fifo empty */ |
| 86 | +#define AACI_IE_UR (1 << 5) /* tx fifo underrun */ |
| 87 | +#define AACI_IE_OR (1 << 4) /* rx fifo overrun */ |
| 88 | +#define AACI_IE_RX (1 << 3) /* rx interrupt status */ |
| 89 | +#define AACI_IE_TX (1 << 2) /* tx interrupt status */ |
| 90 | +#define AACI_IE_RXTO (1 << 1) /* rx timeout */ |
| 91 | +#define AACI_IE_TXC (1 << 0) /* tx complete */ |
92 | 92 |
|
93 | 93 | /* slot flag register bits */
|
94 | 94 | #define AACI_SLFR_RWIS (1 << 13) /* raw wake-up interrupt status */
|
|
120 | 120 | #define AACI_ICLR_RXOEC2 (1 << 2) /* Receive overrun error clear */
|
121 | 121 | #define AACI_ICLR_RXOEC1 (1 << 1) /* Receive overrun error clear */
|
122 | 122 | #define AACI_ICLR_WISC (1 << 0) /* Wake-up interrupt status clear */
|
123 |
| - |
| 123 | + |
124 | 124 | /* Main control register bits AACI_MAINCR */
|
125 | 125 | #define AACI_MAINCR_SCRA(x) ((x) << 10) /* secondary codec reg access */
|
126 | 126 | #define AACI_MAINCR_DMAEN (1 << 9) /* dma enable */
|
|
141 | 141 | #define SYNC_FORCE (1 << 0)
|
142 | 142 |
|
143 | 143 | /* Main flag register bits. P66 */
|
144 |
| -#define MAINFR_TXB (1 << 1) /* transmit busy */ |
145 |
| -#define MAINFR_RXB (1 << 0) /* receive busy */ |
| 144 | +#define MAINFR_TXB (1 << 1) /* transmit busy */ |
| 145 | +#define MAINFR_RXB (1 << 0) /* receive busy */ |
146 | 146 |
|
147 | 147 | #define PL041_CHANNEL_LEFT_DAC (0x1 << 3)
|
148 | 148 | #define PL041_CHANNEL_RIGHT_DAC (0x1 << 3)
|
|
0 commit comments