Lines Matching +full:ssiu +full:-
1 // SPDX-License-Identifier: GPL-2.0
3 // Renesas R-Car SSIU support
9 #define SSIU_NAME "ssiu"
13 u32 busif_status[8]; /* for BUSIF0 - BUSIF7 */
23 #define rsnd_ssiu_nr(priv) ((priv)->ssiu_nr)
28 ((pos) = ((struct rsnd_ssiu *)(priv)->ssiu + i)); \
33 * 0 BUSIF0-3 BUSIF0-7
34 * 1 BUSIF0-3 BUSIF0-7
35 * 2 BUSIF0-3 BUSIF0-7
36 * 3 BUSIF0 BUSIF0-7
37 * 4 BUSIF0 BUSIF0-7
42 * 9 BUSIF0-3 BUSIF0-7
135 struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod); in rsnd_ssiu_get_status() local
138 return &ssiu->busif_status[busif]; in rsnd_ssiu_get_status()
241 struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod); in rsnd_ssiu_init_gen2() local
251 ssiu->usrcnt++; in rsnd_ssiu_init_gen2()
348 struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod); in rsnd_ssiu_stop_gen2() local
356 if (--ssiu->usrcnt) in rsnd_ssiu_stop_gen2()
367 struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod); in rsnd_ssiu_id() local
370 return ssiu->id; in rsnd_ssiu_id()
375 struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod); in rsnd_ssiu_id_sub() local
378 return ssiu->id_sub; in rsnd_ssiu_id_sub()
389 * It should use "rcar_sound,ssiu" on DT. in rsnd_ssiu_dma_req()
392 * If it has "rcar_sound.ssiu", it will be used. in rsnd_ssiu_dma_req()
434 return rsnd_mod_get((struct rsnd_ssiu *)(priv->ssiu) + id); in rsnd_ssiu_mod_get()
441 struct rsnd_ssiu *ssiu; in rsnd_parse_connect_ssiu_compatible() local
451 for_each_rsnd_ssiu(ssiu, priv, i) { in rsnd_parse_connect_ssiu_compatible()
452 struct rsnd_mod *mod = rsnd_mod_get(ssiu); in rsnd_parse_connect_ssiu_compatible()
457 rsnd_dai_connect(mod, io, mod->type); in rsnd_parse_connect_ssiu_compatible()
470 struct rsnd_dai_stream *io_p = &rdai->playback; in rsnd_parse_connect_ssiu()
471 struct rsnd_dai_stream *io_c = &rdai->capture; in rsnd_parse_connect_ssiu()
473 /* use rcar_sound,ssiu if exist */ in rsnd_parse_connect_ssiu()
490 rsnd_dai_connect(mod, io_p, mod->type); in rsnd_parse_connect_ssiu()
492 rsnd_dai_connect(mod, io_c, mod->type); in rsnd_parse_connect_ssiu()
510 struct rsnd_ssiu *ssiu; in rsnd_ssiu_probe() local
517 * if it has "rcar_sound,ssiu", use it. in rsnd_ssiu_probe()
526 nr = priv->ssi_nr; in rsnd_ssiu_probe()
529 return -EINVAL; in rsnd_ssiu_probe()
531 ssiu = devm_kcalloc(dev, nr, sizeof(*ssiu), GFP_KERNEL); in rsnd_ssiu_probe()
532 if (!ssiu) in rsnd_ssiu_probe()
533 return -ENOMEM; in rsnd_ssiu_probe()
535 priv->ssiu = ssiu; in rsnd_ssiu_probe()
536 priv->ssiu_nr = nr; in rsnd_ssiu_probe()
547 ops->id = rsnd_ssiu_id; in rsnd_ssiu_probe()
548 ops->id_sub = rsnd_ssiu_id_sub; in rsnd_ssiu_probe()
557 dev_err(dev, "unknown SSIU\n"); in rsnd_ssiu_probe()
558 return -ENODEV; in rsnd_ssiu_probe()
562 for_each_rsnd_ssiu(ssiu, priv, i) { in rsnd_ssiu_probe()
576 ssiu->id = j; in rsnd_ssiu_probe()
577 ssiu->id_sub = i - list[ssiu->id]; in rsnd_ssiu_probe()
580 ssiu->id = i; in rsnd_ssiu_probe()
583 ret = rsnd_mod_init(priv, rsnd_mod_get(ssiu), in rsnd_ssiu_probe()
594 struct rsnd_ssiu *ssiu; in rsnd_ssiu_remove() local
597 for_each_rsnd_ssiu(ssiu, priv, i) { in rsnd_ssiu_remove()
598 rsnd_mod_quit(rsnd_mod_get(ssiu)); in rsnd_ssiu_remove()