Lines Matching +full:64 +full:m

35 #define MCCR0(m)	((m)->base0 + 0x00)  argument
36 #define MCDR0(m) ((m)->base0 + 0x08) argument
37 #define MCDR1(m) ((m)->base0 + 0x0c) argument
38 #define MCDR2(m) ((m)->base0 + 0x10) argument
39 #define MCSR(m) ((m)->base0 + 0x18) argument
40 #define MCCR1(m) ((m)->base1 + 0x00) argument
47 struct mcp_sa11x0 *m = priv(mcp); in mcp_sa11x0_set_telecom_divisor() local
51 m->mccr0 &= ~0x00007f00; in mcp_sa11x0_set_telecom_divisor()
52 m->mccr0 |= divisor << 8; in mcp_sa11x0_set_telecom_divisor()
53 writel_relaxed(m->mccr0, MCCR0(m)); in mcp_sa11x0_set_telecom_divisor()
59 struct mcp_sa11x0 *m = priv(mcp); in mcp_sa11x0_set_audio_divisor() local
63 m->mccr0 &= ~0x0000007f; in mcp_sa11x0_set_audio_divisor()
64 m->mccr0 |= divisor; in mcp_sa11x0_set_audio_divisor()
65 writel_relaxed(m->mccr0, MCCR0(m)); in mcp_sa11x0_set_audio_divisor()
70 * times (each frame is 64 clocks). We wait a maximum of 6 subframes.
77 struct mcp_sa11x0 *m = priv(mcp); in mcp_sa11x0_write() local
81 writel_relaxed(reg << 17 | MCDR2_Wr | (val & 0xffff), MCDR2(m)); in mcp_sa11x0_write()
85 if (readl_relaxed(MCSR(m)) & MCSR_CWC) { in mcp_sa11x0_write()
97 * times (each frame is 64 clocks). We wait a maximum of 6 subframes.
104 struct mcp_sa11x0 *m = priv(mcp); in mcp_sa11x0_read() local
108 writel_relaxed(reg << 17 | MCDR2_Rd, MCDR2(m)); in mcp_sa11x0_read()
112 if (readl_relaxed(MCSR(m)) & MCSR_CRC) { in mcp_sa11x0_read()
113 ret = readl_relaxed(MCDR2(m)) & 0xffff; in mcp_sa11x0_read()
126 struct mcp_sa11x0 *m = priv(mcp); in mcp_sa11x0_enable() local
128 writel(-1, MCSR(m)); in mcp_sa11x0_enable()
129 m->mccr0 |= MCCR0_MCE; in mcp_sa11x0_enable()
130 writel_relaxed(m->mccr0, MCCR0(m)); in mcp_sa11x0_enable()
135 struct mcp_sa11x0 *m = priv(mcp); in mcp_sa11x0_disable() local
137 m->mccr0 &= ~MCCR0_MCE; in mcp_sa11x0_disable()
138 writel_relaxed(m->mccr0, MCCR0(m)); in mcp_sa11x0_disable()
157 struct mcp_sa11x0 *m; in mcp_sa11x0_probe() local
191 m = priv(mcp); in mcp_sa11x0_probe()
192 m->mccr0 = data->mccr0 | 0x7f7f; in mcp_sa11x0_probe()
193 m->mccr1 = data->mccr1; in mcp_sa11x0_probe()
195 m->base0 = ioremap(mem0->start, resource_size(mem0)); in mcp_sa11x0_probe()
196 m->base1 = ioremap(mem1->start, resource_size(mem1)); in mcp_sa11x0_probe()
197 if (!m->base0 || !m->base1) { in mcp_sa11x0_probe()
208 writel_relaxed(-1, MCSR(m)); in mcp_sa11x0_probe()
209 writel_relaxed(m->mccr1, MCCR1(m)); in mcp_sa11x0_probe()
210 writel_relaxed(m->mccr0, MCCR0(m)); in mcp_sa11x0_probe()
214 * rate. This is the period for 3 64-bit frames. Always in mcp_sa11x0_probe()
217 mcp->rw_timeout = DIV_ROUND_UP(64 * 3 * 1000000, mcp->sclk_rate); in mcp_sa11x0_probe()
224 iounmap(m->base1); in mcp_sa11x0_probe()
225 iounmap(m->base0); in mcp_sa11x0_probe()
238 struct mcp_sa11x0 *m = priv(mcp); in mcp_sa11x0_remove() local
241 if (m->mccr0 & MCCR0_MCE) in mcp_sa11x0_remove()
249 iounmap(m->base1); in mcp_sa11x0_remove()
250 iounmap(m->base0); in mcp_sa11x0_remove()
258 struct mcp_sa11x0 *m = priv(dev_get_drvdata(dev)); in mcp_sa11x0_suspend() local
260 if (m->mccr0 & MCCR0_MCE) in mcp_sa11x0_suspend()
263 writel(m->mccr0 & ~MCCR0_MCE, MCCR0(m)); in mcp_sa11x0_suspend()
270 struct mcp_sa11x0 *m = priv(dev_get_drvdata(dev)); in mcp_sa11x0_resume() local
272 writel_relaxed(m->mccr1, MCCR1(m)); in mcp_sa11x0_resume()
273 writel_relaxed(m->mccr0, MCCR0(m)); in mcp_sa11x0_resume()