1
2
3
4
5
6
7
8
9
10 #ifndef __SOUND_MIXART_HWDEP_H
11 #define __SOUND_MIXART_HWDEP_H
12
13 #include <sound/hwdep.h>
14
15 #ifndef readl_be
16 #define readl_be(x) be32_to_cpu((__force __be32)__raw_readl(x))
17 #endif
18
19 #ifndef writel_be
20 #define writel_be(data,addr) __raw_writel((__force u32)cpu_to_be32(data),addr)
21 #endif
22
23 #ifndef readl_le
24 #define readl_le(x) le32_to_cpu((__force __le32)__raw_readl(x))
25 #endif
26
27 #ifndef writel_le
28 #define writel_le(data,addr) __raw_writel((__force u32)cpu_to_le32(data),addr)
29 #endif
30
31 #define MIXART_MEM(mgr,x) ((mgr)->mem[0].virt + (x))
32 #define MIXART_REG(mgr,x) ((mgr)->mem[1].virt + (x))
33
34
35
36 #define DAUGHTER_TYPE_MASK 0x0F
37 #define DAUGHTER_VER_MASK 0xF0
38 #define DAUGHTER_TYPEVER_MASK (DAUGHTER_TYPE_MASK|DAUGHTER_VER_MASK)
39
40 #define MIXART_DAUGHTER_TYPE_NONE 0x00
41 #define MIXART_DAUGHTER_TYPE_COBRANET 0x08
42 #define MIXART_DAUGHTER_TYPE_AES 0x0E
43
44
45
46 #define MIXART_BA0_SIZE (16 * 1024 * 1024)
47 #define MIXART_BA1_SIZE (4 * 1024)
48
49
50
51
52 #define MIXART_PSEUDOREG 0x2000
53
54 #define MIXART_PSEUDOREG_BOARDNUMBER MIXART_PSEUDOREG+0
55
56
57 #define MIXART_PSEUDOREG_PERF_STREAM_LOAD_OFFSET MIXART_PSEUDOREG+0x70
58 #define MIXART_PSEUDOREG_PERF_SYSTEM_LOAD_OFFSET MIXART_PSEUDOREG+0x78
59 #define MIXART_PSEUDOREG_PERF_MAILBX_LOAD_OFFSET MIXART_PSEUDOREG+0x7C
60 #define MIXART_PSEUDOREG_PERF_INTERR_LOAD_OFFSET MIXART_PSEUDOREG+0x74
61
62
63 #define MIXART_PSEUDOREG_MXLX_BASE_ADDR_OFFSET MIXART_PSEUDOREG+0x9C
64 #define MIXART_PSEUDOREG_MXLX_SIZE_OFFSET MIXART_PSEUDOREG+0xA0
65 #define MIXART_PSEUDOREG_MXLX_STATUS_OFFSET MIXART_PSEUDOREG+0xA4
66
67
68 #define MIXART_PSEUDOREG_ELF_STATUS_OFFSET MIXART_PSEUDOREG+0xB0
69
70
71
72
73
74
75 #define MIXART_PSEUDOREG_DBRD_PRESENCE_OFFSET MIXART_PSEUDOREG+0x990
76
77
78 #define MIXART_PSEUDOREG_DBRD_TYPE_OFFSET MIXART_PSEUDOREG+0x994
79
80
81
82 #define MIXART_PSEUDOREG_DXLX_BASE_ADDR_OFFSET MIXART_PSEUDOREG+0x998
83 #define MIXART_PSEUDOREG_DXLX_SIZE_OFFSET MIXART_PSEUDOREG+0x99C
84 #define MIXART_PSEUDOREG_DXLX_STATUS_OFFSET MIXART_PSEUDOREG+0x9A0
85
86
87 #define MIXART_FLOWTABLE_PTR 0x3000
88
89
90
91
92 #define MSG_INBOUND_POST_HEAD 0x010008
93 #define MSG_INBOUND_POST_TAIL 0x01000C
94
95 #define MSG_OUTBOUND_POST_TAIL 0x01001C
96 #define MSG_OUTBOUND_POST_HEAD 0x010018
97
98 #define MSG_INBOUND_FREE_TAIL 0x010004
99 #define MSG_OUTBOUND_FREE_TAIL 0x010014
100
101 #define MSG_OUTBOUND_FREE_HEAD 0x010010
102 #define MSG_INBOUND_FREE_HEAD 0x010000
103
104
105 #define MSG_BOUND_STACK_SIZE 0x004000
106
107 #define MSG_OUTBOUND_POST_STACK 0x108000
108 #define MSG_INBOUND_POST_STACK 0x104000
109
110 #define MSG_OUTBOUND_FREE_STACK 0x10C000
111 #define MSG_INBOUND_FREE_STACK 0x100000
112
113
114
115 #define MSG_FRAME_OFFSET 0x64
116 #define MSG_FRAME_SIZE 0x6400
117 #define MSG_FRAME_NUMBER 32
118 #define MSG_FROM_AGENT_ITMF_OFFSET (MSG_FRAME_OFFSET + (MSG_FRAME_SIZE * MSG_FRAME_NUMBER))
119 #define MSG_TO_AGENT_ITMF_OFFSET (MSG_FROM_AGENT_ITMF_OFFSET + MSG_FRAME_SIZE)
120 #define MSG_HOST_RSC_PROTECTION (MSG_TO_AGENT_ITMF_OFFSET + MSG_FRAME_SIZE)
121 #define MSG_AGENT_RSC_PROTECTION (MSG_HOST_RSC_PROTECTION + 4)
122
123
124
125
126
127
128
129 #define MIXART_PCI_OMIMR_OFFSET 0x34
130 #define MIXART_PCI_OMISR_OFFSET 0x30
131 #define MIXART_PCI_ODBR_OFFSET 0x60
132
133 #define MIXART_BA1_BRUTAL_RESET_OFFSET 0x68
134
135 #define MIXART_HOST_ALL_INTERRUPT_MASKED 0x02B
136 #define MIXART_ALLOW_OUTBOUND_DOORBELL 0x023
137 #define MIXART_OIDI 0x008
138
139
140 int snd_mixart_setup_firmware(struct mixart_mgr *mgr);
141
142 #endif