Lines Matching full:ip
19 #define GET_UNIPERIF_REG(ip, offset, shift, mask) \ argument
20 ((readl_relaxed(ip->base + offset) >> shift) & mask)
21 #define SET_UNIPERIF_REG(ip, offset, shift, mask, value) \ argument
22 writel_relaxed(((readl_relaxed(ip->base + offset) & \
23 ~(mask << shift)) | (((value) & mask) << shift)), ip->base + offset)
24 #define SET_UNIPERIF_BIT_REG(ip, offset, shift, mask, value) \ argument
25 writel_relaxed((((value) & mask) << shift), ip->base + offset)
31 #define UNIPERIF_SOFT_RST_OFFSET(ip) 0x0000 argument
32 #define GET_UNIPERIF_SOFT_RST(ip) \ argument
33 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? \
34 readl_relaxed(ip->base + UNIPERIF_SOFT_RST_OFFSET(ip)) : 0)
35 #define SET_UNIPERIF_SOFT_RST(ip, value) \ argument
36 writel_relaxed(value, ip->base + UNIPERIF_SOFT_RST_OFFSET(ip))
39 #define UNIPERIF_SOFT_RST_SOFT_RST_SHIFT(ip) 0x0 argument
40 #define UNIPERIF_SOFT_RST_SOFT_RST_MASK(ip) 0x1 argument
41 #define SET_UNIPERIF_SOFT_RST_SOFT_RST(ip) \ argument
42 SET_UNIPERIF_BIT_REG(ip, \
43 UNIPERIF_SOFT_RST_OFFSET(ip), \
44 UNIPERIF_SOFT_RST_SOFT_RST_SHIFT(ip), \
45 UNIPERIF_SOFT_RST_SOFT_RST_MASK(ip), 1)
46 #define GET_UNIPERIF_SOFT_RST_SOFT_RST(ip) \ argument
47 GET_UNIPERIF_REG(ip, \
48 UNIPERIF_SOFT_RST_OFFSET(ip), \
49 UNIPERIF_SOFT_RST_SOFT_RST_SHIFT(ip), \
50 UNIPERIF_SOFT_RST_SOFT_RST_MASK(ip))
56 #define UNIPERIF_FIFO_DATA_OFFSET(ip) 0x0004 argument
57 #define SET_UNIPERIF_DATA(ip, value) \ argument
58 writel_relaxed(value, ip->base + UNIPERIF_FIFO_DATA_OFFSET(ip))
64 #define UNIPERIF_CHANNEL_STA_REGN(ip, n) (0x0060 + (4 * n)) argument
65 #define GET_UNIPERIF_CHANNEL_STA_REGN(ip) \ argument
66 readl_relaxed(ip->base + UNIPERIF_CHANNEL_STA_REGN(ip, n))
67 #define SET_UNIPERIF_CHANNEL_STA_REGN(ip, n, value) \ argument
68 writel_relaxed(value, ip->base + \
69 UNIPERIF_CHANNEL_STA_REGN(ip, n))
71 #define UNIPERIF_CHANNEL_STA_REG0_OFFSET(ip) 0x0060 argument
72 #define GET_UNIPERIF_CHANNEL_STA_REG0(ip) \ argument
73 readl_relaxed(ip->base + UNIPERIF_CHANNEL_STA_REG0_OFFSET(ip))
74 #define SET_UNIPERIF_CHANNEL_STA_REG0(ip, value) \ argument
75 writel_relaxed(value, ip->base + UNIPERIF_CHANNEL_STA_REG0_OFFSET(ip))
77 #define UNIPERIF_CHANNEL_STA_REG1_OFFSET(ip) 0x0064 argument
78 #define GET_UNIPERIF_CHANNEL_STA_REG1(ip) \ argument
79 readl_relaxed(ip->base + UNIPERIF_CHANNEL_STA_REG1_OFFSET(ip))
80 #define SET_UNIPERIF_CHANNEL_STA_REG1(ip, value) \ argument
81 writel_relaxed(value, ip->base + UNIPERIF_CHANNEL_STA_REG1_OFFSET(ip))
83 #define UNIPERIF_CHANNEL_STA_REG2_OFFSET(ip) 0x0068 argument
84 #define GET_UNIPERIF_CHANNEL_STA_REG2(ip) \ argument
85 readl_relaxed(ip->base + UNIPERIF_CHANNEL_STA_REG2_OFFSET(ip))
86 #define SET_UNIPERIF_CHANNEL_STA_REG2(ip, value) \ argument
87 writel_relaxed(value, ip->base + UNIPERIF_CHANNEL_STA_REG2_OFFSET(ip))
89 #define UNIPERIF_CHANNEL_STA_REG3_OFFSET(ip) 0x006C argument
90 #define GET_UNIPERIF_CHANNEL_STA_REG3(ip) \ argument
91 readl_relaxed(ip->base + UNIPERIF_CHANNEL_STA_REG3_OFFSET(ip))
92 #define SET_UNIPERIF_CHANNEL_STA_REG3(ip, value) \ argument
93 writel_relaxed(value, ip->base + UNIPERIF_CHANNEL_STA_REG3_OFFSET(ip))
95 #define UNIPERIF_CHANNEL_STA_REG4_OFFSET(ip) 0x0070 argument
96 #define GET_UNIPERIF_CHANNEL_STA_REG4(ip) \ argument
97 readl_relaxed(ip->base + UNIPERIF_CHANNEL_STA_REG4_OFFSET(ip))
98 #define SET_UNIPERIF_CHANNEL_STA_REG4(ip, value) \ argument
99 writel_relaxed(value, ip->base + UNIPERIF_CHANNEL_STA_REG4_OFFSET(ip))
101 #define UNIPERIF_CHANNEL_STA_REG5_OFFSET(ip) 0x0074 argument
102 #define GET_UNIPERIF_CHANNEL_STA_REG5(ip) \ argument
103 readl_relaxed(ip->base + UNIPERIF_CHANNEL_STA_REG5_OFFSET(ip))
104 #define SET_UNIPERIF_CHANNEL_STA_REG5(ip, value) \ argument
105 writel_relaxed(value, ip->base + UNIPERIF_CHANNEL_STA_REG5_OFFSET(ip))
111 #define UNIPERIF_ITS_OFFSET(ip) 0x000C argument
112 #define GET_UNIPERIF_ITS(ip) \ argument
113 readl_relaxed(ip->base + UNIPERIF_ITS_OFFSET(ip))
116 #define UNIPERIF_ITS_MEM_BLK_READ_SHIFT(ip) 5 argument
117 #define UNIPERIF_ITS_MEM_BLK_READ_MASK(ip) \ argument
118 (BIT(UNIPERIF_ITS_MEM_BLK_READ_SHIFT(ip)))
121 #define UNIPERIF_ITS_FIFO_ERROR_SHIFT(ip) \ argument
122 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? 0 : 8)
123 #define UNIPERIF_ITS_FIFO_ERROR_MASK(ip) \ argument
124 (BIT(UNIPERIF_ITS_FIFO_ERROR_SHIFT(ip)))
127 #define UNIPERIF_ITS_DMA_ERROR_SHIFT(ip) 9 argument
128 #define UNIPERIF_ITS_DMA_ERROR_MASK(ip) \ argument
129 (BIT(UNIPERIF_ITS_DMA_ERROR_SHIFT(ip)))
132 #define UNIPERIF_ITS_UNDERFLOW_REC_DONE_SHIFT(ip) \ argument
133 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? -1 : 12)
134 #define UNIPERIF_ITS_UNDERFLOW_REC_DONE_MASK(ip) \ argument
135 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? \
136 0 : (BIT(UNIPERIF_ITS_UNDERFLOW_REC_DONE_SHIFT(ip))))
139 #define UNIPERIF_ITS_UNDERFLOW_REC_FAILED_SHIFT(ip) \ argument
140 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? -1 : 13)
141 #define UNIPERIF_ITS_UNDERFLOW_REC_FAILED_MASK(ip) \ argument
142 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? \
143 0 : (BIT(UNIPERIF_ITS_UNDERFLOW_REC_FAILED_SHIFT(ip))))
150 #define UNIPERIF_ITS_BCLR_FIFO_ERROR_SHIFT(ip) \ argument
151 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? 0 : 8)
152 #define UNIPERIF_ITS_BCLR_FIFO_ERROR_MASK(ip) \ argument
153 (BIT(UNIPERIF_ITS_BCLR_FIFO_ERROR_SHIFT(ip)))
154 #define SET_UNIPERIF_ITS_BCLR_FIFO_ERROR(ip) \ argument
155 SET_UNIPERIF_ITS_BCLR(ip, \
156 UNIPERIF_ITS_BCLR_FIFO_ERROR_MASK(ip))
158 #define UNIPERIF_ITS_BCLR_OFFSET(ip) 0x0010 argument
159 #define SET_UNIPERIF_ITS_BCLR(ip, value) \ argument
160 writel_relaxed(value, ip->base + UNIPERIF_ITS_BCLR_OFFSET(ip))
166 #define UNIPERIF_ITM_OFFSET(ip) 0x0018 argument
167 #define GET_UNIPERIF_ITM(ip) \ argument
168 readl_relaxed(ip->base + UNIPERIF_ITM_OFFSET(ip))
171 #define UNIPERIF_ITM_FIFO_ERROR_SHIFT(ip) \ argument
172 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? 0 : 8)
173 #define UNIPERIF_ITM_FIFO_ERROR_MASK(ip) \ argument
174 (BIT(UNIPERIF_ITM_FIFO_ERROR_SHIFT(ip)))
177 #define UNIPERIF_ITM_UNDERFLOW_REC_DONE_SHIFT(ip) \ argument
178 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? -1 : 12)
179 #define UNIPERIF_ITM_UNDERFLOW_REC_DONE_MASK(ip) \ argument
180 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? \
181 0 : (BIT(UNIPERIF_ITM_UNDERFLOW_REC_DONE_SHIFT(ip))))
184 #define UNIPERIF_ITM_UNDERFLOW_REC_FAILED_SHIFT(ip) \ argument
185 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? -1 : 13)
186 #define UNIPERIF_ITM_UNDERFLOW_REC_FAILED_MASK(ip) \ argument
187 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? \
188 0 : (BIT(UNIPERIF_ITM_UNDERFLOW_REC_FAILED_SHIFT(ip))))
194 #define UNIPERIF_ITM_BCLR_OFFSET(ip) 0x001c argument
195 #define SET_UNIPERIF_ITM_BCLR(ip, value) \ argument
196 writel_relaxed(value, ip->base + UNIPERIF_ITM_BCLR_OFFSET(ip))
199 #define UNIPERIF_ITM_BCLR_FIFO_ERROR_SHIFT(ip) \ argument
200 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? 0 : 8)
201 #define UNIPERIF_ITM_BCLR_FIFO_ERROR_MASK(ip) \ argument
202 (BIT(UNIPERIF_ITM_BCLR_FIFO_ERROR_SHIFT(ip)))
203 #define SET_UNIPERIF_ITM_BCLR_FIFO_ERROR(ip) \ argument
204 SET_UNIPERIF_ITM_BCLR(ip, \
205 UNIPERIF_ITM_BCLR_FIFO_ERROR_MASK(ip))
208 #define UNIPERIF_ITM_BCLR_DMA_ERROR_SHIFT(ip) 9 argument
209 #define UNIPERIF_ITM_BCLR_DMA_ERROR_MASK(ip) \ argument
210 (BIT(UNIPERIF_ITM_BCLR_DMA_ERROR_SHIFT(ip)))
211 #define SET_UNIPERIF_ITM_BCLR_DMA_ERROR(ip) \ argument
212 SET_UNIPERIF_ITM_BCLR(ip, \
213 UNIPERIF_ITM_BCLR_DMA_ERROR_MASK(ip))
219 #define UNIPERIF_ITM_BSET_OFFSET(ip) 0x0020 argument
220 #define SET_UNIPERIF_ITM_BSET(ip, value) \ argument
221 writel_relaxed(value, ip->base + UNIPERIF_ITM_BSET_OFFSET(ip))
224 #define UNIPERIF_ITM_BSET_FIFO_ERROR_SHIFT(ip) \ argument
225 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? 0 : 8)
226 #define UNIPERIF_ITM_BSET_FIFO_ERROR_MASK(ip) \ argument
227 (BIT(UNIPERIF_ITM_BSET_FIFO_ERROR_SHIFT(ip)))
228 #define SET_UNIPERIF_ITM_BSET_FIFO_ERROR(ip) \ argument
229 SET_UNIPERIF_ITM_BSET(ip, \
230 UNIPERIF_ITM_BSET_FIFO_ERROR_MASK(ip))
233 #define UNIPERIF_ITM_BSET_MEM_BLK_READ_SHIFT(ip) 5 argument
234 #define UNIPERIF_ITM_BSET_MEM_BLK_READ_MASK(ip) \ argument
235 (BIT(UNIPERIF_ITM_BSET_MEM_BLK_READ_SHIFT(ip)))
236 #define SET_UNIPERIF_ITM_BSET_MEM_BLK_READ(ip) \ argument
237 SET_UNIPERIF_ITM_BSET(ip, \
238 UNIPERIF_ITM_BSET_MEM_BLK_READ_MASK(ip))
241 #define UNIPERIF_ITM_BSET_DMA_ERROR_SHIFT(ip) 9 argument
242 #define UNIPERIF_ITM_BSET_DMA_ERROR_MASK(ip) \ argument
243 (BIT(UNIPERIF_ITM_BSET_DMA_ERROR_SHIFT(ip)))
244 #define SET_UNIPERIF_ITM_BSET_DMA_ERROR(ip) \ argument
245 SET_UNIPERIF_ITM_BSET(ip, \
246 UNIPERIF_ITM_BSET_DMA_ERROR_MASK(ip))
249 #define UNIPERIF_ITM_BSET_UNDERFLOW_REC_DONE_SHIFT(ip) \ argument
250 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? -1 : 12)
251 #define UNIPERIF_ITM_BSET_UNDERFLOW_REC_DONE_MASK(ip) \ argument
252 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? \
253 0 : (BIT(UNIPERIF_ITM_BSET_UNDERFLOW_REC_DONE_SHIFT(ip))))
254 #define SET_UNIPERIF_ITM_BSET_UNDERFLOW_REC_DONE(ip) \ argument
255 SET_UNIPERIF_ITM_BSET(ip, \
256 UNIPERIF_ITM_BSET_UNDERFLOW_REC_DONE_MASK(ip))
259 #define UNIPERIF_ITM_BSET_UNDERFLOW_REC_FAILED_SHIFT(ip) \ argument
260 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? -1 : 13)
261 #define UNIPERIF_ITM_BSET_UNDERFLOW_REC_FAILED_MASK(ip) \ argument
262 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? \
263 0 : (BIT(UNIPERIF_ITM_BSET_UNDERFLOW_REC_FAILED_SHIFT(ip))))
264 #define SET_UNIPERIF_ITM_BSET_UNDERFLOW_REC_FAILED(ip) \ argument
265 SET_UNIPERIF_ITM_BSET(ip, \
266 UNIPERIF_ITM_BSET_UNDERFLOW_REC_FAILED_MASK(ip))
272 #define UNIPERIF_CONFIG_OFFSET(ip) 0x0040 argument
273 #define GET_UNIPERIF_CONFIG(ip) \ argument
274 readl_relaxed(ip->base + UNIPERIF_CONFIG_OFFSET(ip))
275 #define SET_UNIPERIF_CONFIG(ip, value) \ argument
276 writel_relaxed(value, ip->base + UNIPERIF_CONFIG_OFFSET(ip))
279 #define UNIPERIF_CONFIG_PARITY_CNTR_SHIFT(ip) 0 argument
280 #define UNIPERIF_CONFIG_PARITY_CNTR_MASK(ip) 0x1 argument
281 #define GET_UNIPERIF_CONFIG_PARITY_CNTR(ip) \ argument
282 GET_UNIPERIF_REG(ip, \
283 UNIPERIF_CONFIG_OFFSET(ip), \
284 UNIPERIF_CONFIG_PARITY_CNTR_SHIFT(ip), \
285 UNIPERIF_CONFIG_PARITY_CNTR_MASK(ip))
286 #define SET_UNIPERIF_CONFIG_PARITY_CNTR_BY_HW(ip) \ argument
287 SET_UNIPERIF_REG(ip, \
288 UNIPERIF_CONFIG_OFFSET(ip), \
289 UNIPERIF_CONFIG_PARITY_CNTR_SHIFT(ip), \
290 UNIPERIF_CONFIG_PARITY_CNTR_MASK(ip), 0)
291 #define SET_UNIPERIF_CONFIG_PARITY_CNTR_BY_SW(ip) \ argument
292 SET_UNIPERIF_REG(ip, \
293 UNIPERIF_CONFIG_OFFSET(ip), \
294 UNIPERIF_CONFIG_PARITY_CNTR_SHIFT(ip), \
295 UNIPERIF_CONFIG_PARITY_CNTR_MASK(ip), 1)
298 #define UNIPERIF_CONFIG_CHANNEL_STA_CNTR_SHIFT(ip) 1 argument
299 #define UNIPERIF_CONFIG_CHANNEL_STA_CNTR_MASK(ip) 0x1 argument
300 #define GET_UNIPERIF_CONFIG_CHANNEL_STA_CNTR(ip) \ argument
301 GET_UNIPERIF_REG(ip, \
302 UNIPERIF_CONFIG_OFFSET(ip), \
303 UNIPERIF_CONFIG_CHANNEL_STA_CNTR_SHIFT(ip), \
304 UNIPERIF_CONFIG_CHANNEL_STA_CNTR_MASK(ip))
305 #define SET_UNIPERIF_CONFIG_CHANNEL_STA_CNTR_BY_SW(ip) \ argument
306 SET_UNIPERIF_REG(ip, \
307 UNIPERIF_CONFIG_OFFSET(ip), \
308 UNIPERIF_CONFIG_CHANNEL_STA_CNTR_SHIFT(ip), \
309 UNIPERIF_CONFIG_CHANNEL_STA_CNTR_MASK(ip), 0)
310 #define SET_UNIPERIF_CONFIG_CHANNEL_STA_CNTR_BY_HW(ip) \ argument
311 SET_UNIPERIF_REG(ip, \
312 UNIPERIF_CONFIG_OFFSET(ip), \
313 UNIPERIF_CONFIG_CHANNEL_STA_CNTR_SHIFT(ip), \
314 UNIPERIF_CONFIG_CHANNEL_STA_CNTR_MASK(ip), 1)
317 #define UNIPERIF_CONFIG_USER_DAT_CNTR_SHIFT(ip) 2 argument
318 #define UNIPERIF_CONFIG_USER_DAT_CNTR_MASK(ip) 0x1 argument
319 #define GET_UNIPERIF_CONFIG_USER_DAT_CNTR(ip) \ argument
320 GET_UNIPERIF_REG(ip, \
321 UNIPERIF_CONFIG_OFFSET(ip), \
322 UNIPERIF_CONFIG_USER_DAT_CNTR_SHIFT(ip), \
323 UNIPERIF_CONFIG_USER_DAT_CNTR_MASK(ip))
324 #define SET_UNIPERIF_CONFIG_USER_DAT_CNTR_BY_HW(ip) \ argument
325 SET_UNIPERIF_REG(ip, \
326 UNIPERIF_CONFIG_OFFSET(ip), \
327 UNIPERIF_CONFIG_USER_DAT_CNTR_SHIFT(ip), \
328 UNIPERIF_CONFIG_USER_DAT_CNTR_MASK(ip), 1)
329 #define SET_UNIPERIF_CONFIG_USER_DAT_CNTR_BY_SW(ip) \ argument
330 SET_UNIPERIF_REG(ip, \
331 UNIPERIF_CONFIG_OFFSET(ip), \
332 UNIPERIF_CONFIG_USER_DAT_CNTR_SHIFT(ip), \
333 UNIPERIF_CONFIG_USER_DAT_CNTR_MASK(ip), 0)
336 #define UNIPERIF_CONFIG_VALIDITY_DAT_CNTR_SHIFT(ip) 3 argument
337 #define UNIPERIF_CONFIG_VALIDITY_DAT_CNTR_MASK(ip) 0x1 argument
338 #define GET_UNIPERIF_CONFIG_VALIDITY_DAT_CNTR(ip) \ argument
339 GET_UNIPERIF_REG(ip, \
340 UNIPERIF_CONFIG_OFFSET(ip), \
341 UNIPERIF_CONFIG_VALIDITY_DAT_CNTR_SHIFT(ip), \
342 UNIPERIF_CONFIG_VALIDITY_DAT_CNTR_MASK(ip))
343 #define SET_UNIPERIF_CONFIG_VALIDITY_DAT_CNTR_BY_SW(ip) \ argument
344 SET_UNIPERIF_REG(ip, \
345 UNIPERIF_CONFIG_OFFSET(ip), \
346 UNIPERIF_CONFIG_VALIDITY_DAT_CNTR_SHIFT(ip), \
347 UNIPERIF_CONFIG_VALIDITY_DAT_CNTR_MASK(ip), 0)
348 #define SET_UNIPERIF_CONFIG_VALIDITY_DAT_CNTR_BY_HW(ip) \ argument
349 SET_UNIPERIF_REG(ip, \
350 UNIPERIF_CONFIG_OFFSET(ip), \
351 UNIPERIF_CONFIG_VALIDITY_DAT_CNTR_SHIFT(ip), \
352 UNIPERIF_CONFIG_VALIDITY_DAT_CNTR_MASK(ip), 1)
355 #define UNIPERIF_CONFIG_ONE_BIT_AUD_SHIFT(ip) 4 argument
356 #define UNIPERIF_CONFIG_ONE_BIT_AUD_MASK(ip) 0x1 argument
357 #define GET_UNIPERIF_CONFIG_ONE_BIT_AUD(ip) \ argument
358 GET_UNIPERIF_REG(ip, \
359 UNIPERIF_CONFIG_OFFSET(ip), \
360 UNIPERIF_CONFIG_ONE_BIT_AUD_SHIFT(ip), \
361 UNIPERIF_CONFIG_ONE_BIT_AUD_MASK(ip))
362 #define SET_UNIPERIF_CONFIG_ONE_BIT_AUD_DISABLE(ip) \ argument
363 SET_UNIPERIF_REG(ip, \
364 UNIPERIF_CONFIG_OFFSET(ip), \
365 UNIPERIF_CONFIG_ONE_BIT_AUD_SHIFT(ip), \
366 UNIPERIF_CONFIG_ONE_BIT_AUD_MASK(ip), 0)
367 #define SET_UNIPERIF_CONFIG_ONE_BIT_AUD_ENABLE(ip) \ argument
368 SET_UNIPERIF_REG(ip, \
369 UNIPERIF_CONFIG_OFFSET(ip), \
370 UNIPERIF_CONFIG_ONE_BIT_AUD_SHIFT(ip), \
371 UNIPERIF_CONFIG_ONE_BIT_AUD_MASK(ip), 1)
374 #define UNIPERIF_CONFIG_MEM_FMT_SHIFT(ip) 5 argument
375 #define UNIPERIF_CONFIG_MEM_FMT_MASK(ip) 0x1 argument
376 #define VALUE_UNIPERIF_CONFIG_MEM_FMT_16_0(ip) 0 argument
377 #define VALUE_UNIPERIF_CONFIG_MEM_FMT_16_16(ip) 1 argument
378 #define GET_UNIPERIF_CONFIG_MEM_FMT(ip) \ argument
379 GET_UNIPERIF_REG(ip, \
380 UNIPERIF_CONFIG_OFFSET(ip), \
381 UNIPERIF_CONFIG_MEM_FMT_SHIFT(ip), \
382 UNIPERIF_CONFIG_MEM_FMT_MASK(ip))
383 #define SET_UNIPERIF_CONFIG_MEM_FMT(ip, value) \ argument
384 SET_UNIPERIF_REG(ip, \
385 UNIPERIF_CONFIG_OFFSET(ip), \
386 UNIPERIF_CONFIG_MEM_FMT_SHIFT(ip), \
387 UNIPERIF_CONFIG_MEM_FMT_MASK(ip), value)
388 #define SET_UNIPERIF_CONFIG_MEM_FMT_16_0(ip) \ argument
389 SET_UNIPERIF_CONFIG_MEM_FMT(ip, \
390 VALUE_UNIPERIF_CONFIG_MEM_FMT_16_0(ip))
391 #define SET_UNIPERIF_CONFIG_MEM_FMT_16_16(ip) \ argument
392 SET_UNIPERIF_CONFIG_MEM_FMT(ip, \
393 VALUE_UNIPERIF_CONFIG_MEM_FMT_16_16(ip))
396 #define UNIPERIF_CONFIG_REPEAT_CHL_STS_SHIFT(ip) 6 argument
397 #define UNIPERIF_CONFIG_REPEAT_CHL_STS_MASK(ip) 0x1 argument
398 #define GET_UNIPERIF_CONFIG_REPEAT_CHL_STS(ip) \ argument
399 GET_UNIPERIF_REG(ip, \
400 UNIPERIF_CONFIG_OFFSET(ip), \
401 UNIPERIF_CONFIG_REPEAT_CHL_STS_SHIFT(ip), \
402 UNIPERIF_CONFIG_REPEAT_CHL_STS_MASK(ip))
403 #define SET_UNIPERIF_CONFIG_REPEAT_CHL_STS_ENABLE(ip) \ argument
404 SET_UNIPERIF_REG(ip, \
405 UNIPERIF_CONFIG_OFFSET(ip), \
406 UNIPERIF_CONFIG_REPEAT_CHL_STS_SHIFT(ip), \
407 UNIPERIF_CONFIG_REPEAT_CHL_STS_MASK(ip), 0)
408 #define SET_UNIPERIF_CONFIG_REPEAT_CHL_STS_DISABLE(ip) \ argument
409 SET_UNIPERIF_REG(ip, \
410 UNIPERIF_CONFIG_OFFSET(ip), \
411 UNIPERIF_CONFIG_REPEAT_CHL_STS_SHIFT(ip), \
412 UNIPERIF_CONFIG_REPEAT_CHL_STS_MASK(ip), 1)
415 #define UNIPERIF_CONFIG_BACK_STALL_REQ_SHIFT(ip) \ argument
416 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? 7 : -1)
417 #define UNIPERIF_CONFIG_BACK_STALL_REQ_MASK(ip) 0x1 argument
418 #define GET_UNIPERIF_CONFIG_BACK_STALL_REQ(ip) \ argument
419 GET_UNIPERIF_REG(ip, \
420 UNIPERIF_CONFIG_OFFSET(ip), \
421 UNIPERIF_CONFIG_BACK_STALL_REQ_SHIFT(ip), \
422 UNIPERIF_CONFIG_BACK_STALL_REQ_MASK(ip))
423 #define SET_UNIPERIF_CONFIG_BACK_STALL_REQ_DISABLE(ip) \ argument
424 SET_UNIPERIF_REG(ip, \
425 UNIPERIF_CONFIG_OFFSET(ip), \
426 UNIPERIF_CONFIG_BACK_STALL_REQ_SHIFT(ip), \
427 UNIPERIF_CONFIG_BACK_STALL_REQ_MASK(ip), 0)
428 #define SET_UNIPERIF_CONFIG_BACK_STALL_REQ_ENABLE(ip) \ argument
429 SET_UNIPERIF_REG(ip, \
430 UNIPERIF_CONFIG_OFFSET(ip), \
431 UNIPERIF_CONFIG_BACK_STALL_REQ_SHIFT(ip), \
432 UNIPERIF_CONFIG_BACK_STALL_REQ_MASK(ip), 1)
435 #define UNIPERIF_CONFIG_DMA_TRIG_LIMIT_SHIFT(ip) 8 argument
436 #define UNIPERIF_CONFIG_DMA_TRIG_LIMIT_MASK(ip) 0x7F argument
437 #define GET_UNIPERIF_CONFIG_DMA_TRIG_LIMIT(ip) \ argument
438 GET_UNIPERIF_REG(ip, \
439 UNIPERIF_CONFIG_OFFSET(ip), \
440 UNIPERIF_CONFIG_DMA_TRIG_LIMIT_SHIFT(ip), \
441 UNIPERIF_CONFIG_DMA_TRIG_LIMIT_MASK(ip))
442 #define SET_UNIPERIF_CONFIG_DMA_TRIG_LIMIT(ip, value) \ argument
443 SET_UNIPERIF_REG(ip, \
444 UNIPERIF_CONFIG_OFFSET(ip), \
445 UNIPERIF_CONFIG_DMA_TRIG_LIMIT_SHIFT(ip), \
446 UNIPERIF_CONFIG_DMA_TRIG_LIMIT_MASK(ip), value)
449 #define UNIPERIF_CONFIG_CHL_STS_UPDATE_SHIFT(ip) \ argument
450 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? 16 : -1)
451 #define UNIPERIF_CONFIG_CHL_STS_UPDATE_MASK(ip) 0x1 argument
452 #define GET_UNIPERIF_CONFIG_CHL_STS_UPDATE(ip) \ argument
453 GET_UNIPERIF_REG(ip, \
454 UNIPERIF_CONFIG_OFFSET(ip), \
455 UNIPERIF_CONFIG_CHL_STS_UPDATE_SHIFT(ip), \
456 UNIPERIF_CONFIG_CHL_STS_UPDATE_MASK(ip))
457 #define SET_UNIPERIF_CONFIG_CHL_STS_UPDATE(ip) \ argument
458 SET_UNIPERIF_REG(ip, \
459 UNIPERIF_CONFIG_OFFSET(ip), \
460 UNIPERIF_CONFIG_CHL_STS_UPDATE_SHIFT(ip), \
461 UNIPERIF_CONFIG_CHL_STS_UPDATE_MASK(ip), 1)
464 #define UNIPERIF_CONFIG_IDLE_MOD_SHIFT(ip) 18 argument
465 #define UNIPERIF_CONFIG_IDLE_MOD_MASK(ip) 0x1 argument
466 #define GET_UNIPERIF_CONFIG_IDLE_MOD(ip) \ argument
467 GET_UNIPERIF_REG(ip, \
468 UNIPERIF_CONFIG_OFFSET(ip), \
469 UNIPERIF_CONFIG_IDLE_MOD_SHIFT(ip), \
470 UNIPERIF_CONFIG_IDLE_MOD_MASK(ip))
471 #define SET_UNIPERIF_CONFIG_IDLE_MOD_DISABLE(ip) \ argument
472 SET_UNIPERIF_REG(ip, \
473 UNIPERIF_CONFIG_OFFSET(ip), \
474 UNIPERIF_CONFIG_IDLE_MOD_SHIFT(ip), \
475 UNIPERIF_CONFIG_IDLE_MOD_MASK(ip), 0)
476 #define SET_UNIPERIF_CONFIG_IDLE_MOD_ENABLE(ip) \ argument
477 SET_UNIPERIF_REG(ip, \
478 UNIPERIF_CONFIG_OFFSET(ip), \
479 UNIPERIF_CONFIG_IDLE_MOD_SHIFT(ip), \
480 UNIPERIF_CONFIG_IDLE_MOD_MASK(ip), 1)
483 #define UNIPERIF_CONFIG_SUBFRAME_SEL_SHIFT(ip) 19 argument
484 #define UNIPERIF_CONFIG_SUBFRAME_SEL_MASK(ip) 0x1 argument
485 #define GET_UNIPERIF_CONFIG_SUBFRAME_SEL(ip) \ argument
486 GET_UNIPERIF_REG(ip, \
487 UNIPERIF_CONFIG_OFFSET(ip), \
488 UNIPERIF_CONFIG_SUBFRAME_SEL_SHIFT(ip), \
489 UNIPERIF_CONFIG_SUBFRAME_SEL_MASK(ip))
490 #define SET_UNIPERIF_CONFIG_SUBFRAME_SEL_SUBF1_SUBF0(ip) \ argument
491 SET_UNIPERIF_REG(ip, \
492 UNIPERIF_CONFIG_OFFSET(ip), \
493 UNIPERIF_CONFIG_SUBFRAME_SEL_SHIFT(ip), \
494 UNIPERIF_CONFIG_SUBFRAME_SEL_MASK(ip), 1)
495 #define SET_UNIPERIF_CONFIG_SUBFRAME_SEL_SUBF0_SUBF1(ip) \ argument
496 SET_UNIPERIF_REG(ip, \
497 UNIPERIF_CONFIG_OFFSET(ip), \
498 UNIPERIF_CONFIG_SUBFRAME_SEL_SHIFT(ip), \
499 UNIPERIF_CONFIG_SUBFRAME_SEL_MASK(ip), 0)
502 #define UNIPERIF_CONFIG_SPDIF_SW_CTRL_SHIFT(ip) 20 argument
503 #define UNIPERIF_CONFIG_SPDIF_SW_CTRL_MASK(ip) 0x1 argument
504 #define GET_UNIPERIF_CONFIG_SPDIF_SW_CTRL(ip) \ argument
505 GET_UNIPERIF_REG(ip, \
506 UNIPERIF_CONFIG_OFFSET(ip), \
507 UNIPERIF_CONFIG_SPDIF_SW_CTRL_SHIFT(ip), \
508 UNIPERIF_CONFIG_SPDIF_SW_CTRL_MASK(ip))
509 #define SET_UNIPERIF_CONFIG_SPDIF_SW_CTRL_ENABLE(ip) \ argument
510 SET_UNIPERIF_REG(ip, \
511 UNIPERIF_CONFIG_OFFSET(ip), \
512 UNIPERIF_CONFIG_SPDIF_SW_CTRL_SHIFT(ip), \
513 UNIPERIF_CONFIG_SPDIF_SW_CTRL_MASK(ip), 1)
514 #define SET_UNIPERIF_CONFIG_SPDIF_SW_CTRL_DISABLE(ip) \ argument
515 SET_UNIPERIF_REG(ip, \
516 UNIPERIF_CONFIG_OFFSET(ip), \
517 UNIPERIF_CONFIG_SPDIF_SW_CTRL_SHIFT(ip), \
518 UNIPERIF_CONFIG_SPDIF_SW_CTRL_MASK(ip), 0)
521 #define UNIPERIF_CONFIG_MSTR_CLKEDGE_SHIFT(ip) \ argument
522 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? 24 : -1)
523 #define UNIPERIF_CONFIG_MSTR_CLKEDGE_MASK(ip) 0x1 argument
524 #define GET_UNIPERIF_CONFIG_MSTR_CLKEDGE(ip) \ argument
525 GET_UNIPERIF_REG(ip, \
526 UNIPERIF_CONFIG_OFFSET(ip), \
527 UNIPERIF_CONFIG_MSTR_CLKEDGE_SHIFT(ip), \
528 UNIPERIF_CONFIG_MSTR_CLKEDGE_MASK(ip))
529 #define SET_UNIPERIF_CONFIG_MSTR_CLKEDGE_FALLING(ip) \ argument
530 SET_UNIPERIF_REG(ip, \
531 UNIPERIF_CONFIG_OFFSET(ip), \
532 UNIPERIF_CONFIG_MSTR_CLKEDGE_SHIFT(ip), \
533 UNIPERIF_CONFIG_MSTR_CLKEDGE_MASK(ip), 1)
534 #define SET_UNIPERIF_CONFIG_MSTR_CLKEDGE_RISING(ip) \ argument
535 SET_UNIPERIF_REG(ip, \
536 UNIPERIF_CONFIG_OFFSET(ip), \
537 UNIPERIF_CONFIG_MSTR_CLKEDGE_SHIFT(ip), \
538 UNIPERIF_CONFIG_MSTR_CLKEDGE_MASK(ip), 0)
544 #define UNIPERIF_CTRL_OFFSET(ip) 0x0044 argument
545 #define GET_UNIPERIF_CTRL(ip) \ argument
546 readl_relaxed(ip->base + UNIPERIF_CTRL_OFFSET(ip))
547 #define SET_UNIPERIF_CTRL(ip, value) \ argument
548 writel_relaxed(value, ip->base + UNIPERIF_CTRL_OFFSET(ip))
551 #define UNIPERIF_CTRL_OPERATION_SHIFT(ip) 0 argument
552 #define UNIPERIF_CTRL_OPERATION_MASK(ip) 0x7 argument
553 #define GET_UNIPERIF_CTRL_OPERATION(ip) \ argument
554 GET_UNIPERIF_REG(ip, \
555 UNIPERIF_CTRL_OFFSET(ip), \
556 UNIPERIF_CTRL_OPERATION_SHIFT(ip), \
557 UNIPERIF_CTRL_OPERATION_MASK(ip))
558 #define VALUE_UNIPERIF_CTRL_OPERATION_OFF(ip) 0 argument
559 #define SET_UNIPERIF_CTRL_OPERATION_OFF(ip) \ argument
560 SET_UNIPERIF_REG(ip, \
561 UNIPERIF_CTRL_OFFSET(ip), \
562 UNIPERIF_CTRL_OPERATION_SHIFT(ip), \
563 UNIPERIF_CTRL_OPERATION_MASK(ip), \
564 VALUE_UNIPERIF_CTRL_OPERATION_OFF(ip))
565 #define VALUE_UNIPERIF_CTRL_OPERATION_MUTE_PCM_NULL(ip) \ argument
566 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? 1 : -1)
567 #define SET_UNIPERIF_CTRL_OPERATION_MUTE_PCM_NULL(ip) \ argument
568 SET_UNIPERIF_REG(ip, \
569 UNIPERIF_CTRL_OFFSET(ip), \
570 UNIPERIF_CTRL_OPERATION_SHIFT(ip), \
571 UNIPERIF_CTRL_OPERATION_MASK(ip), \
572 VALUE_UNIPERIF_CTRL_OPERATION_MUTE_PCM_NULL(ip))
573 #define VALUE_UNIPERIF_CTRL_OPERATION_MUTE_PAUSE_BURST(ip) \ argument
574 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? 2 : -1)
575 #define SET_UNIPERIF_CTRL_OPERATION_MUTE_PAUSE_BURST(ip) \ argument
576 SET_UNIPERIF_REG(ip, \
577 UNIPERIF_CTRL_OFFSET(ip), \
578 UNIPERIF_CTRL_OPERATION_SHIFT(ip), \
579 UNIPERIF_CTRL_OPERATION_MASK(ip), \
580 VALUE_UNIPERIF_CTRL_OPERATION_MUTE_PAUSE_BURST(ip))
581 #define VALUE_UNIPERIF_CTRL_OPERATION_PCM_DATA(ip) 3 argument
582 #define SET_UNIPERIF_CTRL_OPERATION_PCM_DATA(ip) \ argument
583 SET_UNIPERIF_REG(ip, \
584 UNIPERIF_CTRL_OFFSET(ip), \
585 UNIPERIF_CTRL_OPERATION_SHIFT(ip), \
586 UNIPERIF_CTRL_OPERATION_MASK(ip), \
587 VALUE_UNIPERIF_CTRL_OPERATION_PCM_DATA(ip))
589 #define VALUE_UNIPERIF_CTRL_OPERATION_AUDIO_DATA(ip) 3 argument
590 #define SET_UNIPERIF_CTRL_OPERATION_AUDIO_DATA(ip) \ argument
591 SET_UNIPERIF_REG(ip, \
592 UNIPERIF_CTRL_OFFSET(ip), \
593 UNIPERIF_CTRL_OPERATION_SHIFT(ip), \
594 UNIPERIF_CTRL_OPERATION_MASK(ip), \
595 VALUE_UNIPERIF_CTRL_OPERATION_AUDIO_DATA(ip))
596 #define VALUE_UNIPERIF_CTRL_OPERATION_ENC_DATA(ip) 4 argument
597 #define SET_UNIPERIF_CTRL_OPERATION_ENC_DATA(ip) \ argument
598 SET_UNIPERIF_REG(ip, \
599 UNIPERIF_CTRL_OFFSET(ip), \
600 UNIPERIF_CTRL_OPERATION_SHIFT(ip), \
601 UNIPERIF_CTRL_OPERATION_MASK(ip), \
602 VALUE_UNIPERIF_CTRL_OPERATION_ENC_DATA(ip))
603 #define VALUE_UNIPERIF_CTRL_OPERATION_CD_DATA(ip) \ argument
604 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? 5 : -1)
605 #define SET_UNIPERIF_CTRL_OPERATION_CD_DATA(ip) \ argument
606 SET_UNIPERIF_REG(ip, \
607 UNIPERIF_CTRL_OFFSET(ip), \
608 UNIPERIF_CTRL_OPERATION_SHIFT(ip), \
609 UNIPERIF_CTRL_OPERATION_MASK(ip), \
610 VALUE_UNIPERIF_CTRL_OPERATION_CD_DATA(ip))
611 #define VALUE_UNIPERIF_CTRL_OPERATION_STANDBY(ip) \ argument
612 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? -1 : 7)
613 #define SET_UNIPERIF_CTRL_OPERATION_STANDBY(ip) \ argument
614 SET_UNIPERIF_REG(ip, \
615 UNIPERIF_CTRL_OFFSET(ip), \
616 UNIPERIF_CTRL_OPERATION_SHIFT(ip), \
617 UNIPERIF_CTRL_OPERATION_MASK(ip), \
618 VALUE_UNIPERIF_CTRL_OPERATION_STANDBY(ip))
621 #define UNIPERIF_CTRL_EXIT_STBY_ON_EOBLOCK_SHIFT(ip) \ argument
622 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? -1 : 3)
623 #define UNIPERIF_CTRL_EXIT_STBY_ON_EOBLOCK_MASK(ip) 0x1 argument
624 #define GET_UNIPERIF_CTRL_EXIT_STBY_ON_EOBLOCK(ip) \ argument
625 GET_UNIPERIF_REG(ip, \
626 UNIPERIF_CTRL_OFFSET(ip), \
627 UNIPERIF_CTRL_EXIT_STBY_ON_EOBLOCK_SHIFT(ip), \
628 UNIPERIF_CTRL_EXIT_STBY_ON_EOBLOCK_MASK(ip))
629 #define SET_UNIPERIF_CTRL_EXIT_STBY_ON_EOBLOCK_OFF(ip) \ argument
630 SET_UNIPERIF_REG(ip, \
631 UNIPERIF_CTRL_OFFSET(ip), \
632 UNIPERIF_CTRL_EXIT_STBY_ON_EOBLOCK_SHIFT(ip), \
633 UNIPERIF_CTRL_EXIT_STBY_ON_EOBLOCK_MASK(ip), 0)
634 #define SET_UNIPERIF_CTRL_EXIT_STBY_ON_EOBLOCK_ON(ip) \ argument
635 SET_UNIPERIF_REG(ip, \
636 UNIPERIF_CTRL_OFFSET(ip), \
637 UNIPERIF_CTRL_EXIT_STBY_ON_EOBLOCK_SHIFT(ip), \
638 UNIPERIF_CTRL_EXIT_STBY_ON_EOBLOCK_MASK(ip), 1)
641 #define UNIPERIF_CTRL_ROUNDING_SHIFT(ip) 4 argument
642 #define UNIPERIF_CTRL_ROUNDING_MASK(ip) 0x1 argument
643 #define GET_UNIPERIF_CTRL_ROUNDING(ip) \ argument
644 GET_UNIPERIF_REG(ip, \
645 UNIPERIF_CTRL_OFFSET(ip), \
646 UNIPERIF_CTRL_ROUNDING_SHIFT(ip), \
647 UNIPERIF_CTRL_ROUNDING_MASK(ip))
648 #define SET_UNIPERIF_CTRL_ROUNDING_OFF(ip) \ argument
649 SET_UNIPERIF_REG(ip, \
650 UNIPERIF_CTRL_OFFSET(ip), \
651 UNIPERIF_CTRL_ROUNDING_SHIFT(ip), \
652 UNIPERIF_CTRL_ROUNDING_MASK(ip), 0)
653 #define SET_UNIPERIF_CTRL_ROUNDING_ON(ip) \ argument
654 SET_UNIPERIF_REG(ip, \
655 UNIPERIF_CTRL_OFFSET(ip), \
656 UNIPERIF_CTRL_ROUNDING_SHIFT(ip), \
657 UNIPERIF_CTRL_ROUNDING_MASK(ip), 1)
660 #define UNIPERIF_CTRL_DIVIDER_SHIFT(ip) 5 argument
661 #define UNIPERIF_CTRL_DIVIDER_MASK(ip) 0xff argument
662 #define GET_UNIPERIF_CTRL_DIVIDER(ip) \ argument
663 GET_UNIPERIF_REG(ip, \
664 UNIPERIF_CTRL_OFFSET(ip), \
665 UNIPERIF_CTRL_DIVIDER_SHIFT(ip), \
666 UNIPERIF_CTRL_DIVIDER_MASK(ip))
667 #define SET_UNIPERIF_CTRL_DIVIDER(ip, value) \ argument
668 SET_UNIPERIF_REG(ip, \
669 UNIPERIF_CTRL_OFFSET(ip), \
670 UNIPERIF_CTRL_DIVIDER_SHIFT(ip), \
671 UNIPERIF_CTRL_DIVIDER_MASK(ip), value)
674 #define UNIPERIF_CTRL_BYTE_SWP_SHIFT(ip) \ argument
675 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? 13 : -1)
676 #define UNIPERIF_CTRL_BYTE_SWP_MASK(ip) 0x1 argument
677 #define GET_UNIPERIF_CTRL_BYTE_SWP(ip) \ argument
678 GET_UNIPERIF_REG(ip, \
679 UNIPERIF_CTRL_OFFSET(ip), \
680 UNIPERIF_CTRL_BYTE_SWP_SHIFT(ip), \
681 UNIPERIF_CTRL_BYTE_SWP_MASK(ip))
682 #define SET_UNIPERIF_CTRL_BYTE_SWP_OFF(ip) \ argument
683 SET_UNIPERIF_REG(ip, \
684 UNIPERIF_CTRL_OFFSET(ip), \
685 UNIPERIF_CTRL_BYTE_SWP_SHIFT(ip), \
686 UNIPERIF_CTRL_BYTE_SWP_MASK(ip), 0)
687 #define SET_UNIPERIF_CTRL_BYTE_SWP_ON(ip) \ argument
688 SET_UNIPERIF_REG(ip, \
689 UNIPERIF_CTRL_OFFSET(ip), \
690 UNIPERIF_CTRL_BYTE_SWP_SHIFT(ip), \
691 UNIPERIF_CTRL_BYTE_SWP_MASK(ip), 1)
694 #define UNIPERIF_CTRL_ZERO_STUFF_SHIFT(ip) \ argument
695 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? 14 : -1)
696 #define UNIPERIF_CTRL_ZERO_STUFF_MASK(ip) 0x1 argument
697 #define GET_UNIPERIF_CTRL_ZERO_STUFF(ip) \ argument
698 GET_UNIPERIF_REG(ip, \
699 UNIPERIF_CTRL_OFFSET(ip), \
700 UNIPERIF_CTRL_ZERO_STUFF_SHIFT(ip), \
701 UNIPERIF_CTRL_ZERO_STUFF_MASK(ip))
702 #define SET_UNIPERIF_CTRL_ZERO_STUFF_HW(ip) \ argument
703 SET_UNIPERIF_REG(ip, \
704 UNIPERIF_CTRL_OFFSET(ip), \
705 UNIPERIF_CTRL_ZERO_STUFF_SHIFT(ip), \
706 UNIPERIF_CTRL_ZERO_STUFF_MASK(ip), 1)
707 #define SET_UNIPERIF_CTRL_ZERO_STUFF_SW(ip) \ argument
708 SET_UNIPERIF_REG(ip, \
709 UNIPERIF_CTRL_OFFSET(ip), \
710 UNIPERIF_CTRL_ZERO_STUFF_SHIFT(ip), \
711 UNIPERIF_CTRL_ZERO_STUFF_MASK(ip), 0)
714 #define UNIPERIF_CTRL_SPDIF_LAT_SHIFT(ip) \ argument
715 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? 16 : -1)
716 #define UNIPERIF_CTRL_SPDIF_LAT_MASK(ip) 0x1 argument
717 #define GET_UNIPERIF_CTRL_SPDIF_LAT(ip) \ argument
718 GET_UNIPERIF_REG(ip, \
719 UNIPERIF_CTRL_OFFSET(ip), \
720 UNIPERIF_CTRL_SPDIF_LAT_SHIFT(ip), \
721 UNIPERIF_CTRL_SPDIF_LAT_MASK(ip))
722 #define SET_UNIPERIF_CTRL_SPDIF_LAT_ON(ip) \ argument
723 SET_UNIPERIF_REG(ip, \
724 UNIPERIF_CTRL_OFFSET(ip), \
725 UNIPERIF_CTRL_SPDIF_LAT_SHIFT(ip), \
726 UNIPERIF_CTRL_SPDIF_LAT_MASK(ip), 1)
727 #define SET_UNIPERIF_CTRL_SPDIF_LAT_OFF(ip) \ argument
728 SET_UNIPERIF_REG(ip, \
729 UNIPERIF_CTRL_OFFSET(ip), \
730 UNIPERIF_CTRL_SPDIF_LAT_SHIFT(ip), \
731 UNIPERIF_CTRL_SPDIF_LAT_MASK(ip), 0)
734 #define UNIPERIF_CTRL_SPDIF_FMT_SHIFT(ip) 17 argument
735 #define UNIPERIF_CTRL_SPDIF_FMT_MASK(ip) 0x1 argument
736 #define GET_UNIPERIF_CTRL_SPDIF_FMT(ip) \ argument
737 GET_UNIPERIF_REG(ip, \
738 UNIPERIF_CTRL_OFFSET(ip), \
739 UNIPERIF_CTRL_SPDIF_FMT_SHIFT(ip), \
740 UNIPERIF_CTRL_SPDIF_FMT_MASK(ip))
741 #define SET_UNIPERIF_CTRL_SPDIF_FMT_ON(ip) \ argument
742 SET_UNIPERIF_REG(ip, \
743 UNIPERIF_CTRL_OFFSET(ip), \
744 UNIPERIF_CTRL_SPDIF_FMT_SHIFT(ip), \
745 UNIPERIF_CTRL_SPDIF_FMT_MASK(ip), 1)
746 #define SET_UNIPERIF_CTRL_SPDIF_FMT_OFF(ip) \ argument
747 SET_UNIPERIF_REG(ip, \
748 UNIPERIF_CTRL_OFFSET(ip), \
749 UNIPERIF_CTRL_SPDIF_FMT_SHIFT(ip), \
750 UNIPERIF_CTRL_SPDIF_FMT_MASK(ip), 0)
753 #define UNIPERIF_CTRL_READER_OUT_SEL_SHIFT(ip) \ argument
754 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? 18 : -1)
755 #define UNIPERIF_CTRL_READER_OUT_SEL_MASK(ip) 0x1 argument
756 #define GET_UNIPERIF_CTRL_READER_OUT_SEL(ip) \ argument
757 GET_UNIPERIF_REG(ip, \
758 UNIPERIF_CTRL_OFFSET(ip), \
759 UNIPERIF_CTRL_READER_OUT_SEL_SHIFT(ip), \
760 UNIPERIF_CTRL_READER_OUT_SEL_MASK(ip))
761 #define SET_UNIPERIF_CTRL_READER_OUT_SEL_IN_MEM(ip) \ argument
762 SET_UNIPERIF_REG(ip, \
763 UNIPERIF_CTRL_OFFSET(ip), \
764 UNIPERIF_CTRL_READER_OUT_SEL_SHIFT(ip), \
765 UNIPERIF_CTRL_READER_OUT_SEL_MASK(ip), 0)
766 #define SET_UNIPERIF_CTRL_READER_OUT_SEL_ON_I2S_LINE(ip) \ argument
767 SET_UNIPERIF_REG(ip, \
768 UNIPERIF_CTRL_OFFSET(ip), \
769 UNIPERIF_CTRL_READER_OUT_SEL_SHIFT(ip), \
770 UNIPERIF_CTRL_READER_OUT_SEL_MASK(ip), 1)
773 #define UNIPERIF_CTRL_UNDERFLOW_REC_WINDOW_SHIFT(ip) 20 argument
774 #define UNIPERIF_CTRL_UNDERFLOW_REC_WINDOW_MASK(ip) 0xff argument
775 #define GET_UNIPERIF_CTRL_UNDERFLOW_REC_WINDOW(ip) \ argument
776 GET_UNIPERIF_REG(ip, \
777 UNIPERIF_CTRL_OFFSET(ip), \
778 UNIPERIF_CTRL_UNDERFLOW_REC_WINDOW_SHIFT(ip), \
779 UNIPERIF_CTRL_UNDERFLOW_REC_WINDOW_MASK(ip))
780 #define SET_UNIPERIF_CTRL_UNDERFLOW_REC_WINDOW(ip, value) \ argument
781 SET_UNIPERIF_REG(ip, \
782 UNIPERIF_CTRL_OFFSET(ip), \
783 UNIPERIF_CTRL_UNDERFLOW_REC_WINDOW_SHIFT(ip), \
784 UNIPERIF_CTRL_UNDERFLOW_REC_WINDOW_MASK(ip), value)
790 #define UNIPERIF_I2S_FMT_OFFSET(ip) 0x0048 argument
791 #define GET_UNIPERIF_I2S_FMT(ip) \ argument
792 readl_relaxed(ip->base + UNIPERIF_I2S_FMT_OFFSET(ip))
793 #define SET_UNIPERIF_I2S_FMT(ip, value) \ argument
794 writel_relaxed(value, ip->base + UNIPERIF_I2S_FMT_OFFSET(ip))
797 #define UNIPERIF_I2S_FMT_NBIT_SHIFT(ip) 0 argument
798 #define UNIPERIF_I2S_FMT_NBIT_MASK(ip) 0x1 argument
799 #define GET_UNIPERIF_I2S_FMT_NBIT(ip) \ argument
800 GET_UNIPERIF_REG(ip, \
801 UNIPERIF_I2S_FMT_OFFSET(ip), \
802 UNIPERIF_I2S_FMT_NBIT_SHIFT(ip), \
803 UNIPERIF_I2S_FMT_NBIT_MASK(ip))
804 #define SET_UNIPERIF_I2S_FMT_NBIT_32(ip) \ argument
805 SET_UNIPERIF_REG(ip, \
806 UNIPERIF_I2S_FMT_OFFSET(ip), \
807 UNIPERIF_I2S_FMT_NBIT_SHIFT(ip), \
808 UNIPERIF_I2S_FMT_NBIT_MASK(ip), 0)
809 #define SET_UNIPERIF_I2S_FMT_NBIT_16(ip) \ argument
810 SET_UNIPERIF_REG(ip, \
811 UNIPERIF_I2S_FMT_OFFSET(ip), \
812 UNIPERIF_I2S_FMT_NBIT_SHIFT(ip), \
813 UNIPERIF_I2S_FMT_NBIT_MASK(ip), 1)
816 #define UNIPERIF_I2S_FMT_DATA_SIZE_SHIFT(ip) 1 argument
817 #define UNIPERIF_I2S_FMT_DATA_SIZE_MASK(ip) 0x7 argument
818 #define GET_UNIPERIF_I2S_FMT_DATA_SIZE(ip) \ argument
819 GET_UNIPERIF_REG(ip, \
820 UNIPERIF_I2S_FMT_OFFSET(ip), \
821 UNIPERIF_I2S_FMT_DATA_SIZE_SHIFT(ip), \
822 UNIPERIF_I2S_FMT_DATA_SIZE_MASK(ip))
823 #define SET_UNIPERIF_I2S_FMT_DATA_SIZE_16(ip) \ argument
824 SET_UNIPERIF_REG(ip, \
825 UNIPERIF_I2S_FMT_OFFSET(ip), \
826 UNIPERIF_I2S_FMT_DATA_SIZE_SHIFT(ip), \
827 UNIPERIF_I2S_FMT_DATA_SIZE_MASK(ip), 0)
828 #define SET_UNIPERIF_I2S_FMT_DATA_SIZE_18(ip) \ argument
829 SET_UNIPERIF_REG(ip, \
830 UNIPERIF_I2S_FMT_OFFSET(ip), \
831 UNIPERIF_I2S_FMT_DATA_SIZE_SHIFT(ip), \
832 UNIPERIF_I2S_FMT_DATA_SIZE_MASK(ip), 1)
833 #define SET_UNIPERIF_I2S_FMT_DATA_SIZE_20(ip) \ argument
834 SET_UNIPERIF_REG(ip, \
835 UNIPERIF_I2S_FMT_OFFSET(ip), \
836 UNIPERIF_I2S_FMT_DATA_SIZE_SHIFT(ip), \
837 UNIPERIF_I2S_FMT_DATA_SIZE_MASK(ip), 2)
838 #define SET_UNIPERIF_I2S_FMT_DATA_SIZE_24(ip) \ argument
839 SET_UNIPERIF_REG(ip, \
840 UNIPERIF_I2S_FMT_OFFSET(ip), \
841 UNIPERIF_I2S_FMT_DATA_SIZE_SHIFT(ip), \
842 UNIPERIF_I2S_FMT_DATA_SIZE_MASK(ip), 3)
843 #define SET_UNIPERIF_I2S_FMTL_DATA_SIZE_28(ip) \ argument
844 SET_UNIPERIF_REG(ip, \
845 UNIPERIF_I2S_FMT_OFFSET(ip), \
846 UNIPERIF_I2S_FMT_DATA_SIZE_SHIFT(ip), \
847 UNIPERIF_I2S_FMT_DATA_SIZE_MASK(ip), 4)
848 #define SET_UNIPERIF_I2S_FMT_DATA_SIZE_32(ip) \ argument
849 SET_UNIPERIF_REG(ip, \
850 UNIPERIF_I2S_FMT_OFFSET(ip), \
851 UNIPERIF_I2S_FMT_DATA_SIZE_SHIFT(ip), \
852 UNIPERIF_I2S_FMT_DATA_SIZE_MASK(ip), 5)
855 #define UNIPERIF_I2S_FMT_LR_POL_SHIFT(ip) 4 argument
856 #define UNIPERIF_I2S_FMT_LR_POL_MASK(ip) 0x1 argument
857 #define VALUE_UNIPERIF_I2S_FMT_LR_POL_LOW(ip) 0x0 argument
858 #define VALUE_UNIPERIF_I2S_FMT_LR_POL_HIG(ip) 0x1 argument
859 #define GET_UNIPERIF_I2S_FMT_LR_POL(ip) \ argument
860 GET_UNIPERIF_REG(ip, \
861 UNIPERIF_I2S_FMT_OFFSET(ip), \
862 UNIPERIF_I2S_FMT_LR_POL_SHIFT(ip), \
863 UNIPERIF_I2S_FMT_LR_POL_MASK(ip))
864 #define SET_UNIPERIF_I2S_FMT_LR_POL(ip, value) \ argument
865 SET_UNIPERIF_REG(ip, \
866 UNIPERIF_I2S_FMT_OFFSET(ip), \
867 UNIPERIF_I2S_FMT_LR_POL_SHIFT(ip), \
868 UNIPERIF_I2S_FMT_LR_POL_MASK(ip), value)
869 #define SET_UNIPERIF_I2S_FMT_LR_POL_LOW(ip) \ argument
870 SET_UNIPERIF_I2S_FMT_LR_POL(ip, \
871 VALUE_UNIPERIF_I2S_FMT_LR_POL_LOW(ip))
872 #define SET_UNIPERIF_I2S_FMT_LR_POL_HIG(ip) \ argument
873 SET_UNIPERIF_I2S_FMT_LR_POL(ip, \
874 VALUE_UNIPERIF_I2S_FMT_LR_POL_HIG(ip))
877 #define UNIPERIF_I2S_FMT_SCLK_EDGE_SHIFT(ip) 5 argument
878 #define UNIPERIF_I2S_FMT_SCLK_EDGE_MASK(ip) 0x1 argument
879 #define GET_UNIPERIF_I2S_FMT_SCLK_EDGE(ip) \ argument
880 GET_UNIPERIF_REG(ip, \
881 UNIPERIF_I2S_FMT_OFFSET(ip), \
882 UNIPERIF_I2S_FMT_SCLK_EDGE_SHIFT(ip), \
883 UNIPERIF_I2S_FMT_SCLK_EDGE_MASK(ip))
884 #define SET_UNIPERIF_I2S_FMT_SCLK_EDGE_RISING(ip) \ argument
885 SET_UNIPERIF_REG(ip, \
886 UNIPERIF_I2S_FMT_OFFSET(ip), \
887 UNIPERIF_I2S_FMT_SCLK_EDGE_SHIFT(ip), \
888 UNIPERIF_I2S_FMT_SCLK_EDGE_MASK(ip), 0)
889 #define SET_UNIPERIF_I2S_FMT_SCLK_EDGE_FALLING(ip) \ argument
890 SET_UNIPERIF_REG(ip, \
891 UNIPERIF_I2S_FMT_OFFSET(ip), \
892 UNIPERIF_I2S_FMT_SCLK_EDGE_SHIFT(ip), \
893 UNIPERIF_I2S_FMT_SCLK_EDGE_MASK(ip), 1)
896 #define UNIPERIF_I2S_FMT_PADDING_SHIFT(ip) 6 argument
897 #define UNIPERIF_I2S_FMT_PADDING_MASK(ip) 0x1 argument
898 #define UNIPERIF_I2S_FMT_PADDING_MASK(ip) 0x1 argument
899 #define VALUE_UNIPERIF_I2S_FMT_PADDING_I2S_MODE(ip) 0x0 argument
900 #define VALUE_UNIPERIF_I2S_FMT_PADDING_SONY_MODE(ip) 0x1 argument
901 #define GET_UNIPERIF_I2S_FMT_PADDING(ip) \ argument
902 GET_UNIPERIF_REG(ip, \
903 UNIPERIF_I2S_FMT_OFFSET(ip), \
904 UNIPERIF_I2S_FMT_PADDING_SHIFT(ip), \
905 UNIPERIF_I2S_FMT_PADDING_MASK(ip))
906 #define SET_UNIPERIF_I2S_FMT_PADDING(ip, value) \ argument
907 SET_UNIPERIF_REG(ip, \
908 UNIPERIF_I2S_FMT_OFFSET(ip), \
909 UNIPERIF_I2S_FMT_PADDING_SHIFT(ip), \
910 UNIPERIF_I2S_FMT_PADDING_MASK(ip), value)
911 #define SET_UNIPERIF_I2S_FMT_PADDING_I2S_MODE(ip) \ argument
912 SET_UNIPERIF_I2S_FMT_PADDING(ip, \
913 VALUE_UNIPERIF_I2S_FMT_PADDING_I2S_MODE(ip))
914 #define SET_UNIPERIF_I2S_FMT_PADDING_SONY_MODE(ip) \ argument
915 SET_UNIPERIF_I2S_FMT_PADDING(ip, \
916 VALUE_UNIPERIF_I2S_FMT_PADDING_SONY_MODE(ip))
919 #define UNIPERIF_I2S_FMT_ALIGN_SHIFT(ip) 7 argument
920 #define UNIPERIF_I2S_FMT_ALIGN_MASK(ip) 0x1 argument
921 #define GET_UNIPERIF_I2S_FMT_ALIGN(ip) \ argument
922 GET_UNIPERIF_REG(ip, \
923 UNIPERIF_I2S_FMT_OFFSET(ip), \
924 UNIPERIF_I2S_FMT_ALIGN_SHIFT(ip), \
925 UNIPERIF_I2S_FMT_ALIGN_MASK(ip))
926 #define SET_UNIPERIF_I2S_FMT_ALIGN_LEFT(ip) \ argument
927 SET_UNIPERIF_REG(ip, \
928 UNIPERIF_I2S_FMT_OFFSET(ip), \
929 UNIPERIF_I2S_FMT_ALIGN_SHIFT(ip), \
930 UNIPERIF_I2S_FMT_ALIGN_MASK(ip), 0)
931 #define SET_UNIPERIF_I2S_FMT_ALIGN_RIGHT(ip) \ argument
932 SET_UNIPERIF_REG(ip, \
933 UNIPERIF_I2S_FMT_OFFSET(ip), \
934 UNIPERIF_I2S_FMT_ALIGN_SHIFT(ip), \
935 UNIPERIF_I2S_FMT_ALIGN_MASK(ip), 1)
938 #define UNIPERIF_I2S_FMT_ORDER_SHIFT(ip) 8 argument
939 #define UNIPERIF_I2S_FMT_ORDER_MASK(ip) 0x1 argument
940 #define GET_UNIPERIF_I2S_FMT_ORDER(ip) \ argument
941 GET_UNIPERIF_REG(ip, \
942 UNIPERIF_I2S_FMT_OFFSET(ip), \
943 UNIPERIF_I2S_FMT_ORDER_SHIFT(ip), \
944 UNIPERIF_I2S_FMT_ORDER_MASK(ip))
945 #define SET_UNIPERIF_I2S_FMT_ORDER_LSB(ip) \ argument
946 SET_UNIPERIF_REG(ip, \
947 UNIPERIF_I2S_FMT_OFFSET(ip), \
948 UNIPERIF_I2S_FMT_ORDER_SHIFT(ip), \
949 UNIPERIF_I2S_FMT_ORDER_MASK(ip), 0)
950 #define SET_UNIPERIF_I2S_FMT_ORDER_MSB(ip) \ argument
951 SET_UNIPERIF_REG(ip, \
952 UNIPERIF_I2S_FMT_OFFSET(ip), \
953 UNIPERIF_I2S_FMT_ORDER_SHIFT(ip), \
954 UNIPERIF_I2S_FMT_ORDER_MASK(ip), 1)
957 #define UNIPERIF_I2S_FMT_NUM_CH_SHIFT(ip) 9 argument
958 #define UNIPERIF_I2S_FMT_NUM_CH_MASK(ip) 0x7 argument
959 #define GET_UNIPERIF_I2S_FMT_NUM_CH(ip) \ argument
960 GET_UNIPERIF_REG(ip, \
961 UNIPERIF_I2S_FMT_OFFSET(ip), \
962 UNIPERIF_I2S_FMT_NUM_CH_SHIFT(ip), \
963 UNIPERIF_I2S_FMT_NUM_CH_MASK(ip))
964 #define SET_UNIPERIF_I2S_FMT_NUM_CH(ip, value) \ argument
965 SET_UNIPERIF_REG(ip, \
966 UNIPERIF_I2S_FMT_OFFSET(ip), \
967 UNIPERIF_I2S_FMT_NUM_CH_SHIFT(ip), \
968 UNIPERIF_I2S_FMT_NUM_CH_MASK(ip), value)
971 #define UNIPERIF_I2S_FMT_NO_OF_SAMPLES_TO_READ_SHIFT(ip) 12 argument
972 #define UNIPERIF_I2S_FMT_NO_OF_SAMPLES_TO_READ_MASK(ip) 0xfffff argument
973 #define GET_UNIPERIF_I2S_FMT_NO_OF_SAMPLES_TO_READ(ip) \ argument
974 GET_UNIPERIF_REG(ip, \
975 UNIPERIF_I2S_FMT_OFFSET(ip), \
976 UNIPERIF_I2S_FMT_NO_OF_SAMPLES_TO_READ_SHIFT(ip), \
977 UNIPERIF_I2S_FMT_NO_OF_SAMPLES_TO_READ_MASK(ip))
978 #define SET_UNIPERIF_I2S_FMT_NO_OF_SAMPLES_TO_READ(ip, value) \ argument
979 SET_UNIPERIF_REG(ip, \
980 UNIPERIF_I2S_FMT_OFFSET(ip), \
981 UNIPERIF_I2S_FMT_NO_OF_SAMPLES_TO_READ_SHIFT(ip), \
982 UNIPERIF_I2S_FMT_NO_OF_SAMPLES_TO_READ_MASK(ip), value)
988 #define UNIPERIF_BIT_CONTROL_OFFSET(ip) \ argument
989 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? -1 : 0x004c)
990 #define GET_UNIPERIF_BIT_CONTROL(ip) \ argument
991 readl_relaxed(ip->base + UNIPERIF_BIT_CONTROL_OFFSET(ip))
992 #define SET_UNIPERIF_BIT_CONTROL(ip, value) \ argument
993 writel_relaxed(value, ip->base + UNIPERIF_BIT_CONTROL_OFFSET(ip))
996 #define UNIPERIF_BIT_CONTROL_CLR_UNDERFLOW_DURATION_SHIFT(ip) 0 argument
997 #define UNIPERIF_BIT_CONTROL_CLR_UNDERFLOW_DURATION_MASK(ip) 0x1 argument
998 #define GET_UNIPERIF_BIT_CONTROL_CLR_UNDERFLOW_DURATION(ip) \ argument
999 GET_UNIPERIF_REG(ip, \
1000 UNIPERIF_BIT_CONTROL_OFFSET(ip), \
1001 UNIPERIF_BIT_CONTROL_CLR_UNDERFLOW_DURATION_SHIFT(ip), \
1002 UNIPERIF_BIT_CONTROL_CLR_UNDERFLOW_DURATION_MASK(ip))
1003 #define SET_UNIPERIF_BIT_CONTROL_CLR_UNDERFLOW_DURATION(ip) \ argument
1004 SET_UNIPERIF_REG(ip, \
1005 UNIPERIF_BIT_CONTROL_OFFSET(ip), \
1006 UNIPERIF_BIT_CONTROL_CLR_UNDERFLOW_DURATION_SHIFT(ip), \
1007 UNIPERIF_BIT_CONTROL_CLR_UNDERFLOW_DURATION_MASK(ip), 1)
1010 #define UNIPERIF_BIT_CONTROL_CHL_STS_UPDATE_SHIFT(ip) 1 argument
1011 #define UNIPERIF_BIT_CONTROL_CHL_STS_UPDATE_MASK(ip) 0x1 argument
1012 #define GET_UNIPERIF_BIT_CONTROL_CHL_STS_UPDATE(ip) \ argument
1013 GET_UNIPERIF_REG(ip, \
1014 UNIPERIF_BIT_CONTROL_OFFSET(ip), \
1015 UNIPERIF_BIT_CONTROL_CHL_STS_UPDATE_SHIFT(ip), \
1016 UNIPERIF_BIT_CONTROL_CHL_STS_UPDATE_MASK(ip))
1017 #define SET_UNIPERIF_BIT_CONTROL_CHL_STS_UPDATE(ip) \ argument
1018 SET_UNIPERIF_BIT_REG(ip, \
1019 UNIPERIF_BIT_CONTROL_OFFSET(ip), \
1020 UNIPERIF_BIT_CONTROL_CHL_STS_UPDATE_SHIFT(ip), \
1021 UNIPERIF_BIT_CONTROL_CHL_STS_UPDATE_MASK(ip), 1)
1027 #define UNIPERIF_STATUS_1_OFFSET(ip) 0x0050 argument
1028 #define GET_UNIPERIF_STATUS_1(ip) \ argument
1029 readl_relaxed(ip->base + UNIPERIF_STATUS_1_OFFSET(ip))
1030 #define SET_UNIPERIF_STATUS_1(ip, value) \ argument
1031 writel_relaxed(value, ip->base + UNIPERIF_STATUS_1_OFFSET(ip))
1034 #define UNIPERIF_STATUS_1_UNDERFLOW_DURATION_SHIFT(ip) \ argument
1035 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? -1 : 0)
1036 #define UNIPERIF_STATUS_1_UNDERFLOW_DURATION_MASK(ip) 0xff argument
1037 #define GET_UNIPERIF_STATUS_1_UNDERFLOW_DURATION(ip) \ argument
1038 GET_UNIPERIF_REG(ip, \
1039 UNIPERIF_STATUS_1_OFFSET(ip), \
1040 UNIPERIF_STATUS_1_UNDERFLOW_DURATION_SHIFT(ip), \
1041 UNIPERIF_STATUS_1_UNDERFLOW_DURATION_MASK(ip))
1042 #define SET_UNIPERIF_STATUS_1_UNDERFLOW_DURATION(ip, value) \ argument
1043 SET_UNIPERIF_REG(ip, \
1044 UNIPERIF_STATUS_1_OFFSET(ip), \
1045 UNIPERIF_STATUS_1_UNDERFLOW_DURATION_SHIFT(ip), \
1046 UNIPERIF_STATUS_1_UNDERFLOW_DURATION_MASK(ip), value)
1052 #define UNIPERIF_CHANNEL_STA_REGN(ip, n) (0x0060 + (4 * n)) argument
1053 #define GET_UNIPERIF_CHANNEL_STA_REGN(ip) \ argument
1054 readl_relaxed(ip->base + UNIPERIF_CHANNEL_STA_REGN(ip, n))
1055 #define SET_UNIPERIF_CHANNEL_STA_REGN(ip, n, value) \ argument
1056 writel_relaxed(value, ip->base + \
1057 UNIPERIF_CHANNEL_STA_REGN(ip, n))
1063 #define UNIPERIF_USER_VALIDITY_OFFSET(ip) 0x0090 argument
1064 #define GET_UNIPERIF_USER_VALIDITY(ip) \ argument
1065 readl_relaxed(ip->base + UNIPERIF_USER_VALIDITY_OFFSET(ip))
1066 #define SET_UNIPERIF_USER_VALIDITY(ip, value) \ argument
1067 writel_relaxed(value, ip->base + UNIPERIF_USER_VALIDITY_OFFSET(ip))
1070 #define UNIPERIF_USER_VALIDITY_VALIDITY_LR_SHIFT(ip) 0 argument
1071 #define UNIPERIF_USER_VALIDITY_VALIDITY_LR_MASK(ip) 0x3 argument
1072 #define GET_UNIPERIF_USER_VALIDITY_VALIDITY_LR(ip) \ argument
1073 GET_UNIPERIF_REG(ip, \
1074 UNIPERIF_USER_VALIDITY_OFFSET(ip), \
1075 UNIPERIF_USER_VALIDITY_VALIDITY_LR_SHIFT(ip), \
1076 UNIPERIF_USER_VALIDITY_VALIDITY_LR_MASK(ip))
1077 #define SET_UNIPERIF_USER_VALIDITY_VALIDITY_LR(ip, value) \ argument
1078 SET_UNIPERIF_REG(ip, \
1079 UNIPERIF_USER_VALIDITY_OFFSET(ip), \
1080 UNIPERIF_USER_VALIDITY_VALIDITY_LR_SHIFT(ip), \
1081 UNIPERIF_USER_VALIDITY_VALIDITY_LR_MASK(ip), \
1087 #define UNIPERIF_DBG_STANDBY_LEFT_SP_OFFSET(ip) 0x0150 argument
1088 #define UNIPERIF_DBG_STANDBY_LEFT_SP_SHIFT(ip) \ argument
1089 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? -1 : 0)
1090 #define UNIPERIF_DBG_STANDBY_LEFT_SP_MASK(ip) \ argument
1091 ((ip)->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 ? 0 : 0xFFFFFF)
1092 #define GET_UNIPERIF_DBG_STANDBY_LEFT_SP(ip) \ argument
1093 GET_UNIPERIF_REG(ip, \
1094 UNIPERIF_DBG_STANDBY_LEFT_SP_OFFSET(ip), \
1095 UNIPERIF_DBG_STANDBY_LEFT_SP_SHIFT(ip), \
1096 UNIPERIF_DBG_STANDBY_LEFT_SP_MASK(ip))
1097 #define SET_UNIPERIF_DBG_STANDBY_LEFT_SP(ip, value) \ argument
1098 SET_UNIPERIF_REG(ip, \
1099 UNIPERIF_DBG_STANDBY_LEFT_SP_OFFSET(ip), \
1100 UNIPERIF_DBG_STANDBY_LEFT_SP_SHIFT(ip), \
1101 UNIPERIF_DBG_STANDBY_LEFT_SP_MASK(ip), value)
1106 #define UNIPERIF_TDM_ENABLE_OFFSET(ip) 0x0118 argument
1107 #define GET_UNIPERIF_TDM_ENABLE(ip) \ argument
1108 readl_relaxed(ip->base + UNIPERIF_TDM_ENABLE_OFFSET(ip))
1109 #define SET_UNIPERIF_TDM_ENABLE(ip, value) \ argument
1110 writel_relaxed(value, ip->base + UNIPERIF_TDM_ENABLE_OFFSET(ip))
1113 #define UNIPERIF_TDM_ENABLE_EN_TDM_SHIFT(ip) 0x0 argument
1114 #define UNIPERIF_TDM_ENABLE_EN_TDM_MASK(ip) 0x1 argument
1115 #define GET_UNIPERIF_TDM_ENABLE_EN_TDM(ip) \ argument
1116 GET_UNIPERIF_REG(ip, \
1117 UNIPERIF_TDM_ENABLE_OFFSET(ip), \
1118 UNIPERIF_TDM_ENABLE_EN_TDM_SHIFT(ip), \
1119 UNIPERIF_TDM_ENABLE_EN_TDM_MASK(ip))
1120 #define SET_UNIPERIF_TDM_ENABLE_TDM_ENABLE(ip) \ argument
1121 SET_UNIPERIF_REG(ip, \
1122 UNIPERIF_TDM_ENABLE_OFFSET(ip), \
1123 UNIPERIF_TDM_ENABLE_EN_TDM_SHIFT(ip), \
1124 UNIPERIF_TDM_ENABLE_EN_TDM_MASK(ip), 1)
1125 #define SET_UNIPERIF_TDM_ENABLE_TDM_DISABLE(ip) \ argument
1126 SET_UNIPERIF_REG(ip, \
1127 UNIPERIF_TDM_ENABLE_OFFSET(ip), \
1128 UNIPERIF_TDM_ENABLE_EN_TDM_SHIFT(ip), \
1129 UNIPERIF_TDM_ENABLE_EN_TDM_MASK(ip), 0)
1134 #define UNIPERIF_TDM_FS_REF_FREQ_OFFSET(ip) 0x011c argument
1135 #define GET_UNIPERIF_TDM_FS_REF_FREQ(ip) \ argument
1136 readl_relaxed(ip->base + UNIPERIF_TDM_FS_REF_FREQ_OFFSET(ip))
1137 #define SET_UNIPERIF_TDM_FS_REF_FREQ(ip, value) \ argument
1138 writel_relaxed(value, ip->base + \
1139 UNIPERIF_TDM_FS_REF_FREQ_OFFSET(ip))
1142 #define UNIPERIF_TDM_FS_REF_FREQ_REF_FREQ_SHIFT(ip) 0x0 argument
1143 #define VALUE_UNIPERIF_TDM_FS_REF_FREQ_8KHZ(ip) 0 argument
1144 #define VALUE_UNIPERIF_TDM_FS_REF_FREQ_16KHZ(ip) 1 argument
1145 #define VALUE_UNIPERIF_TDM_FS_REF_FREQ_32KHZ(ip) 2 argument
1146 #define VALUE_UNIPERIF_TDM_FS_REF_FREQ_48KHZ(ip) 3 argument
1147 #define UNIPERIF_TDM_FS_REF_FREQ_REF_FREQ_MASK(ip) 0x3 argument
1148 #define GET_UNIPERIF_TDM_FS_REF_FREQ_REF_FREQ(ip) \ argument
1149 GET_UNIPERIF_REG(ip, \
1150 UNIPERIF_TDM_FS_REF_FREQ_OFFSET(ip), \
1151 UNIPERIF_TDM_FS_REF_FREQ_REF_FREQ_SHIFT(ip), \
1152 UNIPERIF_TDM_FS_REF_FREQ_REF_FREQ_MASK(ip))
1153 #define SET_UNIPERIF_TDM_FS_REF_FREQ_8KHZ(ip) \ argument
1154 SET_UNIPERIF_REG(ip, \
1155 UNIPERIF_TDM_FS_REF_FREQ_OFFSET(ip), \
1156 UNIPERIF_TDM_FS_REF_FREQ_REF_FREQ_SHIFT(ip), \
1157 UNIPERIF_TDM_FS_REF_FREQ_REF_FREQ_MASK(ip), \
1158 VALUE_UNIPERIF_TDM_FS_REF_FREQ_8KHZ(ip))
1159 #define SET_UNIPERIF_TDM_FS_REF_FREQ_16KHZ(ip) \ argument
1160 SET_UNIPERIF_REG(ip, \
1161 UNIPERIF_TDM_FS_REF_FREQ_OFFSET(ip), \
1162 UNIPERIF_TDM_FS_REF_FREQ_REF_FREQ_SHIFT(ip), \
1163 UNIPERIF_TDM_FS_REF_FREQ_REF_FREQ_MASK(ip), \
1164 VALUE_UNIPERIF_TDM_FS_REF_FREQ_16KHZ(ip))
1165 #define SET_UNIPERIF_TDM_FS_REF_FREQ_32KHZ(ip) \ argument
1166 SET_UNIPERIF_REG(ip, \
1167 UNIPERIF_TDM_FS_REF_FREQ_OFFSET(ip), \
1168 UNIPERIF_TDM_FS_REF_FREQ_REF_FREQ_SHIFT(ip), \
1169 UNIPERIF_TDM_FS_REF_FREQ_REF_FREQ_MASK(ip), \
1170 VALUE_UNIPERIF_TDM_FS_REF_FREQ_32KHZ(ip))
1171 #define SET_UNIPERIF_TDM_FS_REF_FREQ_48KHZ(ip) \ argument
1172 SET_UNIPERIF_REG(ip, \
1173 UNIPERIF_TDM_FS_REF_FREQ_OFFSET(ip), \
1174 UNIPERIF_TDM_FS_REF_FREQ_REF_FREQ_SHIFT(ip), \
1175 UNIPERIF_TDM_FS_REF_FREQ_REF_FREQ_MASK(ip), \
1176 VALUE_UNIPERIF_TDM_FS_REF_FREQ_48KHZ(ip))
1181 #define UNIPERIF_TDM_FS_REF_DIV_OFFSET(ip) 0x0120 argument
1182 #define GET_UNIPERIF_TDM_FS_REF_DIV(ip) \ argument
1183 readl_relaxed(ip->base + UNIPERIF_TDM_FS_REF_DIV_OFFSET(ip))
1184 #define SET_UNIPERIF_TDM_FS_REF_DIV(ip, value) \ argument
1185 writel_relaxed(value, ip->base + \
1186 UNIPERIF_TDM_FS_REF_DIV_OFFSET(ip))
1189 #define UNIPERIF_TDM_FS_REF_DIV_NUM_TIMESLOT_SHIFT(ip) 0x0 argument
1190 #define UNIPERIF_TDM_FS_REF_DIV_NUM_TIMESLOT_MASK(ip) 0xff argument
1191 #define GET_UNIPERIF_TDM_FS_REF_DIV_NUM_TIMESLOT(ip) \ argument
1192 GET_UNIPERIF_REG(ip, \
1193 UNIPERIF_TDM_FS_REF_DIV_OFFSET(ip), \
1194 UNIPERIF_TDM_FS_REF_DIV_NUM_TIMESLOT_SHIFT(ip), \
1195 UNIPERIF_TDM_FS_REF_DIV_NUM_TIMESLOT_MASK(ip))
1196 #define SET_UNIPERIF_TDM_FS_REF_DIV_NUM_TIMESLOT(ip, value) \ argument
1197 SET_UNIPERIF_REG(ip, \
1198 UNIPERIF_TDM_FS_REF_DIV_OFFSET(ip), \
1199 UNIPERIF_TDM_FS_REF_DIV_NUM_TIMESLOT_SHIFT(ip), \
1200 UNIPERIF_TDM_FS_REF_DIV_NUM_TIMESLOT_MASK(ip), value)
1206 #define UNIPERIF_TDM_WORD_POS_1_2_OFFSET(ip) 0x013c argument
1207 #define UNIPERIF_TDM_WORD_POS_3_4_OFFSET(ip) 0x0140 argument
1208 #define UNIPERIF_TDM_WORD_POS_5_6_OFFSET(ip) 0x0144 argument
1209 #define UNIPERIF_TDM_WORD_POS_7_8_OFFSET(ip) 0x0148 argument
1210 #define GET_UNIPERIF_TDM_WORD_POS(ip, words) \ argument
1211 readl_relaxed(ip->base + UNIPERIF_TDM_WORD_POS_##words##_OFFSET(ip))
1212 #define SET_UNIPERIF_TDM_WORD_POS(ip, words, value) \ argument
1213 writel_relaxed(value, ip->base + \
1214 UNIPERIF_TDM_WORD_POS_##words##_OFFSET(ip))
1216 * uniperipheral IP capabilities
1235 * Uniperipheral IP revisions
1298 int id; /* instance value of the uniperipheral IP */
1299 int ver; /* IP version, used by register access macros */