mtd: lpddr: fix Kconfig dependency, for I/O accessors
[linux/fpc-iii.git] / sound / soc / sirf / sirf-audio-port.h
blobf32dc54f44992ccb2d1aa6cb7685dd0cda67ce6d
1 /*
2 * SiRF Audio port controllers define
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
6 * Licensed under GPLv2 or later.
7 */
9 #ifndef _SIRF_AUDIO_PORT_H
10 #define _SIRF_AUDIO_PORT_H
12 #define AUDIO_PORT_TX_FIFO_LEVEL_CHECK_MASK 0x3F
13 #define AUDIO_PORT_TX_FIFO_SC_OFFSET 0
14 #define AUDIO_PORT_TX_FIFO_LC_OFFSET 10
15 #define AUDIO_PORT_TX_FIFO_HC_OFFSET 20
17 #define TX_FIFO_SC(x) (((x) & AUDIO_PORT_TX_FIFO_LEVEL_CHECK_MASK) \
18 << AUDIO_PORT_TX_FIFO_SC_OFFSET)
19 #define TX_FIFO_LC(x) (((x) & AUDIO_PORT_TX_FIFO_LEVEL_CHECK_MASK) \
20 << AUDIO_PORT_TX_FIFO_LC_OFFSET)
21 #define TX_FIFO_HC(x) (((x) & AUDIO_PORT_TX_FIFO_LEVEL_CHECK_MASK) \
22 << AUDIO_PORT_TX_FIFO_HC_OFFSET)
24 #define AUDIO_PORT_RX_FIFO_LEVEL_CHECK_MASK 0x0F
25 #define AUDIO_PORT_RX_FIFO_SC_OFFSET 0
26 #define AUDIO_PORT_RX_FIFO_LC_OFFSET 10
27 #define AUDIO_PORT_RX_FIFO_HC_OFFSET 20
29 #define RX_FIFO_SC(x) (((x) & AUDIO_PORT_RX_FIFO_LEVEL_CHECK_MASK) \
30 << AUDIO_PORT_RX_FIFO_SC_OFFSET)
31 #define RX_FIFO_LC(x) (((x) & AUDIO_PORT_RX_FIFO_LEVEL_CHECK_MASK) \
32 << AUDIO_PORT_RX_FIFO_LC_OFFSET)
33 #define RX_FIFO_HC(x) (((x) & AUDIO_PORT_RX_FIFO_LEVEL_CHECK_MASK) \
34 << AUDIO_PORT_RX_FIFO_HC_OFFSET)
35 #define AUDIO_PORT_IC_CODEC_TX_CTRL (0x00F4)
36 #define AUDIO_PORT_IC_CODEC_RX_CTRL (0x00F8)
38 #define AUDIO_PORT_IC_TXFIFO_OP (0x00FC)
39 #define AUDIO_PORT_IC_TXFIFO_LEV_CHK (0x0100)
40 #define AUDIO_PORT_IC_TXFIFO_STS (0x0104)
41 #define AUDIO_PORT_IC_TXFIFO_INT (0x0108)
42 #define AUDIO_PORT_IC_TXFIFO_INT_MSK (0x010C)
44 #define AUDIO_PORT_IC_RXFIFO_OP (0x0110)
45 #define AUDIO_PORT_IC_RXFIFO_LEV_CHK (0x0114)
46 #define AUDIO_PORT_IC_RXFIFO_STS (0x0118)
47 #define AUDIO_PORT_IC_RXFIFO_INT (0x011C)
48 #define AUDIO_PORT_IC_RXFIFO_INT_MSK (0x0120)
50 #define AUDIO_FIFO_START (1 << 0)
51 #define AUDIO_FIFO_RESET (1 << 1)
53 #define AUDIO_FIFO_FULL (1 << 0)
54 #define AUDIO_FIFO_EMPTY (1 << 1)
55 #define AUDIO_FIFO_OFLOW (1 << 2)
56 #define AUDIO_FIFO_UFLOW (1 << 3)
58 #define IC_TX_ENABLE (0x03)
59 #define IC_RX_ENABLE_MONO (0x01)
60 #define IC_RX_ENABLE_STEREO (0x03)
62 #endif /*__SIRF_AUDIO_PORT_H*/