blob: 29d8990e3f0f779ea2bafdef2dcbbce91f23a6da [file] [log] [blame]
Kuninori Morimoto07539c12013-07-21 21:36:35 -07001/*
2 * Renesas R-Car SCU support
3 *
4 * Copyright (C) 2013 Renesas Solutions Corp.
5 * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#include "rsnd.h"
12
13struct rsnd_scu {
14 struct rsnd_scu_platform_info *info; /* rcar_snd.h */
15 struct rsnd_mod mod;
Kuninori Morimotoef749402013-12-19 19:28:51 -080016 struct clk *clk;
Kuninori Morimoto07539c12013-07-21 21:36:35 -070017};
18
Kuninori Morimotoef749402013-12-19 19:28:51 -080019#define RSND_SCU_NAME_SIZE 16
Kuninori Morimoto374a52812013-07-28 18:59:12 -070020
21/*
22 * ADINR
23 */
24#define OTBL_24 (0 << 16)
25#define OTBL_22 (2 << 16)
26#define OTBL_20 (4 << 16)
27#define OTBL_18 (6 << 16)
28#define OTBL_16 (8 << 16)
29
Kuninori Morimoto39cf3c42014-01-23 18:40:47 -080030#define rsnd_scu_mode_flags(p) ((p)->info->flags)
31#define rsnd_scu_convert_rate(p) ((p)->info->convert_rate)
32#define rsnd_mod_to_scu(_mod) \
33 container_of((_mod), struct rsnd_scu, mod)
Kuninori Morimoto96c7c0d2014-01-23 18:40:54 -080034#define rsnd_scu_hpbif_is_enable(scu) \
35 (rsnd_scu_mode_flags(scu) & RSND_SCU_USE_HPBIF)
Kuninori Morimoto39cf3c42014-01-23 18:40:47 -080036
37#define for_each_rsnd_scu(pos, priv, i) \
38 for ((i) = 0; \
39 ((i) < rsnd_scu_nr(priv)) && \
40 ((pos) = (struct rsnd_scu *)(priv)->scu + i); \
41 i++)
42
43
Kuninori Morimotoef749402013-12-19 19:28:51 -080044/*
45 * image of SRC (Sampling Rate Converter)
46 *
47 * 96kHz <-> +-----+ 48kHz +-----+ 48kHz +-------+
48 * 48kHz <-> | SRC | <------> | SSI | <-----> | codec |
49 * 44.1kHz <-> +-----+ +-----+ +-------+
50 * ...
51 *
52 */
Kuninori Morimoto374a52812013-07-28 18:59:12 -070053
Kuninori Morimoto41c62212014-01-23 18:39:56 -080054/*
Kuninori Morimotoc926b742014-01-23 18:40:41 -080055 * scu.c is caring...
56 *
57 * Gen1
58 *
59 * [mem] -> [SRU] -> [SSI]
60 * |--------|
61 *
62 * Gen2
63 *
64 * [mem] -> [SCU] -> [SSIU] -> [SSI]
65 * |-----------------|
66 */
67
68/*
Kuninori Morimoto41c62212014-01-23 18:39:56 -080069 * How to use SRC bypass mode for debugging
70 *
71 * SRC has bypass mode, and it is useful for debugging.
72 * In Gen2 case,
73 * SRCm_MODE controls whether SRC is used or not
74 * SSI_MODE0 controls whether SSIU which receives SRC data
75 * is used or not.
76 * Both SRCm_MODE/SSI_MODE0 settings are needed if you use SRC,
77 * but SRC bypass mode needs SSI_MODE0 only.
78 *
79 * This driver request
80 * struct rsnd_scu_platform_info {
81 * u32 flags;
82 * u32 convert_rate;
83 * }
84 *
85 * rsnd_scu_hpbif_is_enable() will be true
86 * if flags had RSND_SCU_USE_HPBIF,
87 * and it controls whether SSIU is used or not.
88 *
89 * rsnd_scu_convert_rate() indicates
90 * above convert_rate, and it controls
91 * whether SRC is used or not.
92 *
93 * ex) doesn't use SRC
94 * struct rsnd_scu_platform_info info = {
95 * .flags = 0,
96 * .convert_rate = 0,
97 * };
98 *
99 * ex) uses SRC
100 * struct rsnd_scu_platform_info info = {
101 * .flags = RSND_SCU_USE_HPBIF,
102 * .convert_rate = 48000,
103 * };
104 *
105 * ex) uses SRC bypass mode
106 * struct rsnd_scu_platform_info info = {
107 * .flags = RSND_SCU_USE_HPBIF,
108 * .convert_rate = 0,
109 * };
110 *
111 */
112
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800113/*
114 * Gen1/Gen2 common functions
115 */
Kuninori Morimoto7b5ce972014-01-23 18:39:32 -0800116static int rsnd_scu_ssi_mode_init(struct rsnd_mod *mod,
117 struct rsnd_dai *rdai,
118 struct rsnd_dai_stream *io)
119{
120 struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
Kuninori Morimoto96c7c0d2014-01-23 18:40:54 -0800121 struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
Kuninori Morimoto7b5ce972014-01-23 18:39:32 -0800122 int id = rsnd_mod_id(mod);
123
124 /*
125 * SSI_MODE0
126 */
127 rsnd_mod_bset(mod, SSI_MODE0, (1 << id),
Kuninori Morimoto96c7c0d2014-01-23 18:40:54 -0800128 rsnd_scu_hpbif_is_enable(scu) ? 0 : (1 << id));
Kuninori Morimoto7b5ce972014-01-23 18:39:32 -0800129
130 /*
131 * SSI_MODE1
132 */
133 if (rsnd_ssi_is_pin_sharing(rsnd_ssi_mod_get(priv, id))) {
134 int shift = -1;
135 switch (id) {
136 case 1:
137 shift = 0;
138 break;
139 case 2:
140 shift = 2;
141 break;
142 case 4:
143 shift = 16;
144 break;
145 }
146
147 if (shift >= 0)
148 rsnd_mod_bset(mod, SSI_MODE1,
149 0x3 << shift,
150 rsnd_dai_is_clk_master(rdai) ?
151 0x2 << shift : 0x1 << shift);
152 }
153
154 return 0;
155}
156
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800157unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv,
158 struct rsnd_mod *ssi_mod,
159 struct snd_pcm_runtime *runtime)
160{
161 struct rsnd_scu *scu;
162 unsigned int rate;
163
164 /* this function is assuming SSI id = SCU id here */
165 scu = rsnd_mod_to_scu(rsnd_scu_mod_get(priv, rsnd_mod_id(ssi_mod)));
166
167 /*
168 * return convert rate if SRC is used,
169 * otherwise, return runtime->rate as usual
170 */
171 rate = rsnd_scu_convert_rate(scu);
172 if (!rate)
173 rate = runtime->rate;
174
175 return rate;
176}
177
178static int rsnd_scu_set_convert_rate(struct rsnd_mod *mod,
179 struct rsnd_dai *rdai,
180 struct rsnd_dai_stream *io)
181{
182 struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
183 struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
184 u32 convert_rate = rsnd_scu_convert_rate(scu);
185 u32 adinr = runtime->channels;
186 u32 fsrate = 0;
187
188 if (convert_rate)
189 fsrate = 0x0400000 / convert_rate * runtime->rate;
190
191 /* set/clear soft reset */
192 rsnd_mod_write(mod, SRC_SWRSR, 0);
193 rsnd_mod_write(mod, SRC_SWRSR, 1);
194
195 /*
196 * Initialize the operation of the SRC internal circuits
197 * see rsnd_scu_start()
198 */
199 rsnd_mod_write(mod, SRC_SRCIR, 1);
200
201 /* Set channel number and output bit length */
202 switch (runtime->sample_bits) {
203 case 16:
204 adinr |= OTBL_16;
205 break;
206 case 32:
207 adinr |= OTBL_24;
208 break;
209 default:
210 return -EIO;
211 }
212 rsnd_mod_write(mod, SRC_ADINR, adinr);
213
214 /* Enable the initial value of IFS */
215 if (fsrate) {
216 rsnd_mod_write(mod, SRC_IFSCR, 1);
217
218 /* Set initial value of IFS */
219 rsnd_mod_write(mod, SRC_IFSVR, fsrate);
220 }
221
222 /* use DMA transfer */
223 rsnd_mod_write(mod, SRC_BUSIF_MODE, 1);
224
225 return 0;
226}
227
228static int rsnd_scu_init(struct rsnd_mod *mod,
229 struct rsnd_dai *rdai,
230 struct rsnd_dai_stream *io)
231{
232 struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
233 int ret;
234
235 clk_enable(scu->clk);
236
237 ret = rsnd_scu_ssi_mode_init(mod, rdai, io);
238 if (ret < 0)
239 return ret;
240
241 return 0;
242}
243
244static int rsnd_scu_quit(struct rsnd_mod *mod,
245 struct rsnd_dai *rdai,
246 struct rsnd_dai_stream *io)
247{
248 struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
249
250 clk_disable(scu->clk);
251
252 return 0;
253}
254
255static int rsnd_scu_start(struct rsnd_mod *mod,
256 struct rsnd_dai *rdai,
257 struct rsnd_dai_stream *io)
258{
259 struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
260
261 /*
262 * Cancel the initialization and operate the SRC function
263 * see rsnd_scu_set_convert_rate()
264 */
265 rsnd_mod_write(mod, SRC_SRCIR, 0);
266
267 if (rsnd_scu_convert_rate(scu))
268 rsnd_mod_write(mod, SRC_ROUTE_MODE0, 1);
269
270 return 0;
271}
272
273
274static int rsnd_scu_stop(struct rsnd_mod *mod,
275 struct rsnd_dai *rdai,
276 struct rsnd_dai_stream *io)
277{
278 struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
279
280 if (rsnd_scu_convert_rate(scu))
281 rsnd_mod_write(mod, SRC_ROUTE_MODE0, 0);
282
283 return 0;
284}
285
286static struct rsnd_mod_ops rsnd_scu_non_ops = {
287 .name = "scu (non)",
288};
289
290/*
291 * Gen1 functions
292 */
293static int rsnd_src_set_route_gen1(struct rsnd_mod *mod,
294 struct rsnd_dai *rdai,
295 struct rsnd_dai_stream *io)
Kuninori Morimoto374a52812013-07-28 18:59:12 -0700296{
297 struct scu_route_config {
298 u32 mask;
299 int shift;
300 } routes[] = {
301 { 0xF, 0, }, /* 0 */
302 { 0xF, 4, }, /* 1 */
303 { 0xF, 8, }, /* 2 */
304 { 0x7, 12, }, /* 3 */
305 { 0x7, 16, }, /* 4 */
306 { 0x7, 20, }, /* 5 */
307 { 0x7, 24, }, /* 6 */
308 { 0x3, 28, }, /* 7 */
309 { 0x3, 30, }, /* 8 */
310 };
Kuninori Morimoto374a52812013-07-28 18:59:12 -0700311 u32 mask;
312 u32 val;
Kuninori Morimoto374a52812013-07-28 18:59:12 -0700313 int id;
314
Kuninori Morimoto374a52812013-07-28 18:59:12 -0700315 id = rsnd_mod_id(mod);
Dan Carpenterb5f3d7a2013-11-08 12:46:10 +0300316 if (id < 0 || id >= ARRAY_SIZE(routes))
Kuninori Morimoto374a52812013-07-28 18:59:12 -0700317 return -EIO;
318
319 /*
320 * SRC_ROUTE_SELECT
321 */
322 val = rsnd_dai_is_play(rdai, io) ? 0x1 : 0x2;
323 val = val << routes[id].shift;
324 mask = routes[id].mask << routes[id].shift;
325
326 rsnd_mod_bset(mod, SRC_ROUTE_SEL, mask, val);
327
Kuninori Morimoto28dc4b62014-01-23 18:41:10 -0800328 return 0;
329}
330
331static int rsnd_scu_set_convert_timing_gen1(struct rsnd_mod *mod,
332 struct rsnd_dai *rdai,
333 struct rsnd_dai_stream *io)
334{
335 struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
336 struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
337 struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
338 u32 convert_rate = rsnd_scu_convert_rate(scu);
339 u32 mask;
340 u32 val;
341 int shift;
342 int id = rsnd_mod_id(mod);
343 int ret;
344
Kuninori Morimoto374a52812013-07-28 18:59:12 -0700345 /*
346 * SRC_TIMING_SELECT
347 */
348 shift = (id % 4) * 8;
349 mask = 0x1F << shift;
Kuninori Morimotoef749402013-12-19 19:28:51 -0800350
351 /*
352 * ADG is used as source clock if SRC was used,
353 * then, SSI WS is used as destination clock.
354 * SSI WS is used as source clock if SRC is not used
355 * (when playback, source/destination become reverse when capture)
356 */
Kuninori Morimoto28dc4b62014-01-23 18:41:10 -0800357 ret = 0;
358 if (convert_rate) {
359 /* use ADG */
Kuninori Morimotoef749402013-12-19 19:28:51 -0800360 val = 0;
Kuninori Morimoto28dc4b62014-01-23 18:41:10 -0800361 ret = rsnd_adg_set_convert_clk_gen1(priv, mod,
362 runtime->rate,
363 convert_rate);
364 } else if (8 == id) {
365 /* use SSI WS, but SRU8 is special */
Kuninori Morimoto374a52812013-07-28 18:59:12 -0700366 val = id << shift;
Kuninori Morimoto28dc4b62014-01-23 18:41:10 -0800367 } else {
368 /* use SSI WS */
Kuninori Morimoto374a52812013-07-28 18:59:12 -0700369 val = (id + 1) << shift;
Kuninori Morimoto28dc4b62014-01-23 18:41:10 -0800370 }
371
372 if (ret < 0)
373 return ret;
Kuninori Morimoto374a52812013-07-28 18:59:12 -0700374
375 switch (id / 4) {
376 case 0:
377 rsnd_mod_bset(mod, SRC_TMG_SEL0, mask, val);
378 break;
379 case 1:
380 rsnd_mod_bset(mod, SRC_TMG_SEL1, mask, val);
381 break;
382 case 2:
383 rsnd_mod_bset(mod, SRC_TMG_SEL2, mask, val);
384 break;
385 }
386
387 return 0;
388}
389
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800390static int rsnd_scu_set_convert_rate_gen1(struct rsnd_mod *mod,
391 struct rsnd_dai *rdai,
392 struct rsnd_dai_stream *io)
Kuninori Morimoto374a52812013-07-28 18:59:12 -0700393{
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800394 int ret;
Kuninori Morimoto374a52812013-07-28 18:59:12 -0700395
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800396 ret = rsnd_scu_set_convert_rate(mod, rdai, io);
397 if (ret < 0)
398 return ret;
Kuninori Morimoto374a52812013-07-28 18:59:12 -0700399
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800400 /* Select SRC mode (fixed value) */
401 rsnd_mod_write(mod, SRC_SRCCR, 0x00010110);
Kuninori Morimotoef749402013-12-19 19:28:51 -0800402
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800403 /* Set the restriction value of the FS ratio (98%) */
404 rsnd_mod_write(mod, SRC_MNFSR,
405 rsnd_mod_read(mod, SRC_IFSVR) / 100 * 98);
Kuninori Morimoto374a52812013-07-28 18:59:12 -0700406
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800407 /* no SRC_BFSSR settings, since SRC_SRCCR::BUFMD is 0 */
Kuninori Morimotoef749402013-12-19 19:28:51 -0800408
Kuninori Morimoto374a52812013-07-28 18:59:12 -0700409 return 0;
410}
411
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800412static int rsnd_scu_init_gen1(struct rsnd_mod *mod,
413 struct rsnd_dai *rdai,
414 struct rsnd_dai_stream *io)
Kuninori Morimoto07539c12013-07-21 21:36:35 -0700415{
Kuninori Morimoto374a52812013-07-28 18:59:12 -0700416 int ret;
Kuninori Morimoto07539c12013-07-21 21:36:35 -0700417
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800418 ret = rsnd_scu_init(mod, rdai, io);
Kuninori Morimoto7b5ce972014-01-23 18:39:32 -0800419 if (ret < 0)
420 return ret;
421
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800422 ret = rsnd_src_set_route_gen1(mod, rdai, io);
Kuninori Morimoto374a52812013-07-28 18:59:12 -0700423 if (ret < 0)
424 return ret;
425
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800426 ret = rsnd_scu_set_convert_rate_gen1(mod, rdai, io);
Kuninori Morimoto374a52812013-07-28 18:59:12 -0700427 if (ret < 0)
428 return ret;
429
Kuninori Morimoto28dc4b62014-01-23 18:41:10 -0800430 ret = rsnd_scu_set_convert_timing_gen1(mod, rdai, io);
431 if (ret < 0)
432 return ret;
433
Kuninori Morimotoa204d902014-01-23 18:38:33 -0800434 return 0;
435}
436
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800437static int rsnd_scu_start_gen1(struct rsnd_mod *mod,
438 struct rsnd_dai *rdai,
439 struct rsnd_dai_stream *io)
Kuninori Morimotoa204d902014-01-23 18:38:33 -0800440{
Kuninori Morimotoe7ce74e2014-01-23 18:38:50 -0800441 int id = rsnd_mod_id(mod);
Kuninori Morimotoa204d902014-01-23 18:38:33 -0800442
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800443 rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), (1 << id));
Kuninori Morimotoe7ce74e2014-01-23 18:38:50 -0800444
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800445 return rsnd_scu_start(mod, rdai, io);
Kuninori Morimotoa204d902014-01-23 18:38:33 -0800446}
447
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800448static int rsnd_scu_stop_gen1(struct rsnd_mod *mod,
449 struct rsnd_dai *rdai,
450 struct rsnd_dai_stream *io)
Kuninori Morimotoef749402013-12-19 19:28:51 -0800451{
Kuninori Morimotoe7ce74e2014-01-23 18:38:50 -0800452 int id = rsnd_mod_id(mod);
Kuninori Morimotoef749402013-12-19 19:28:51 -0800453
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800454 rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), 0);
Kuninori Morimotoe7ce74e2014-01-23 18:38:50 -0800455
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800456 return rsnd_scu_stop(mod, rdai, io);
Kuninori Morimotoef749402013-12-19 19:28:51 -0800457}
458
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800459static struct rsnd_mod_ops rsnd_scu_gen1_ops = {
460 .name = "sru (gen1)",
461 .init = rsnd_scu_init_gen1,
Kuninori Morimotoa204d902014-01-23 18:38:33 -0800462 .quit = rsnd_scu_quit,
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800463 .start = rsnd_scu_start_gen1,
464 .stop = rsnd_scu_stop_gen1,
Kuninori Morimoto07539c12013-07-21 21:36:35 -0700465};
466
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800467static struct rsnd_mod_ops rsnd_scu_non_gen1_ops = {
468 .name = "non-sru (gen1)",
Kuninori Morimoto7b5ce972014-01-23 18:39:32 -0800469 .init = rsnd_scu_ssi_mode_init,
Kuninori Morimoto013f38f2014-01-23 18:38:26 -0800470};
471
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800472/*
473 * Gen2 functions
474 */
475static int rsnd_scu_start_non_gen2(struct rsnd_mod *mod,
476 struct rsnd_dai *rdai,
477 struct rsnd_dai_stream *io)
478{
479 /* enable PIO interrupt */
480 rsnd_mod_write(mod, INT_ENABLE, 0x0f000000);
481
482 return 0;
483}
484
485static struct rsnd_mod_ops rsnd_scu_non_gen2_ops = {
486 .name = "non-scu (gen2)",
487 .init = rsnd_scu_ssi_mode_init,
488 .start = rsnd_scu_start_non_gen2,
489};
490
Kuninori Morimoto07539c12013-07-21 21:36:35 -0700491struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id)
492{
Takashi Iwai8b147192013-11-05 18:40:05 +0100493 if (WARN_ON(id < 0 || id >= rsnd_scu_nr(priv)))
494 id = 0;
Kuninori Morimoto07539c12013-07-21 21:36:35 -0700495
496 return &((struct rsnd_scu *)(priv->scu) + id)->mod;
497}
498
499int rsnd_scu_probe(struct platform_device *pdev,
500 struct rcar_snd_info *info,
501 struct rsnd_priv *priv)
502{
503 struct device *dev = rsnd_priv_to_dev(priv);
504 struct rsnd_scu *scu;
Kuninori Morimoto013f38f2014-01-23 18:38:26 -0800505 struct rsnd_mod_ops *ops;
Kuninori Morimotoef749402013-12-19 19:28:51 -0800506 struct clk *clk;
507 char name[RSND_SCU_NAME_SIZE];
Kuninori Morimoto07539c12013-07-21 21:36:35 -0700508 int i, nr;
509
510 /*
511 * init SCU
512 */
513 nr = info->scu_info_nr;
514 scu = devm_kzalloc(dev, sizeof(*scu) * nr, GFP_KERNEL);
515 if (!scu) {
516 dev_err(dev, "SCU allocate failed\n");
517 return -ENOMEM;
518 }
519
520 priv->scu_nr = nr;
521 priv->scu = scu;
522
523 for_each_rsnd_scu(scu, priv, i) {
Kuninori Morimotoef749402013-12-19 19:28:51 -0800524 snprintf(name, RSND_SCU_NAME_SIZE, "scu.%d", i);
525
526 clk = devm_clk_get(dev, name);
527 if (IS_ERR(clk))
528 return PTR_ERR(clk);
529
Kuninori Morimoto07539c12013-07-21 21:36:35 -0700530 scu->info = &info->scu_info[i];
Kuninori Morimotoef749402013-12-19 19:28:51 -0800531 scu->clk = clk;
Kuninori Morimoto07539c12013-07-21 21:36:35 -0700532
Kuninori Morimoto013f38f2014-01-23 18:38:26 -0800533 ops = &rsnd_scu_non_ops;
Kuninori Morimoto1b7b08ef2014-01-23 18:41:36 -0800534 if (rsnd_scu_hpbif_is_enable(scu)) {
535 if (rsnd_is_gen1(priv))
536 ops = &rsnd_scu_gen1_ops;
537 } else {
538 if (rsnd_is_gen1(priv))
539 ops = &rsnd_scu_non_gen1_ops;
540 if (rsnd_is_gen2(priv))
541 ops = &rsnd_scu_non_gen2_ops;
542 }
Kuninori Morimoto013f38f2014-01-23 18:38:26 -0800543
544 rsnd_mod_init(priv, &scu->mod, ops, i);
545
Kuninori Morimoto374a52812013-07-28 18:59:12 -0700546 dev_dbg(dev, "SCU%d probed\n", i);
547 }
Kuninori Morimoto07539c12013-07-21 21:36:35 -0700548 dev_dbg(dev, "scu probed\n");
549
550 return 0;
551}
552
553void rsnd_scu_remove(struct platform_device *pdev,
554 struct rsnd_priv *priv)
555{
556}