Lines Matching +full:ssiu +full:- +full:2

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 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
61 case 2: in rsnd_ssiu_busif_err_irq_ctrl()
76 enum rsnd_reg reg = SSI_SYS_INT_ENABLE((i * 2) + offset); in rsnd_ssiu_busif_err_irq_ctrl()
98 case 2: in rsnd_ssiu_busif_err_status_clear()
113 u32 reg = SSI_SYS_STATUS(i * 2) + offset; in rsnd_ssiu_busif_err_status_clear()
136 struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod); in rsnd_ssiu_get_status() local
139 return &ssiu->busif_status[busif]; in rsnd_ssiu_get_status()
200 if (ssis & (1 << 2)) in rsnd_ssiu_init()
201 val1 |= is_clk_master ? 0x2 << 2 : in rsnd_ssiu_init()
202 0x1 << 2; in rsnd_ssiu_init()
247 struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod); in rsnd_ssiu_init_gen2() local
257 ssiu->usrcnt++; in rsnd_ssiu_init_gen2()
354 struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod); in rsnd_ssiu_stop_gen2() local
362 if (--ssiu->usrcnt) in rsnd_ssiu_stop_gen2()
373 struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod); in rsnd_ssiu_id() local
376 return ssiu->id; in rsnd_ssiu_id()
381 struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod); in rsnd_ssiu_id_sub() local
384 return ssiu->id_sub; in rsnd_ssiu_id_sub()
395 * It should use "rcar_sound,ssiu" on DT. in rsnd_ssiu_dma_req()
398 * If it has "rcar_sound.ssiu", it will be used. in rsnd_ssiu_dma_req()
440 return rsnd_mod_get((struct rsnd_ssiu *)(priv->ssiu) + id); in rsnd_ssiu_mod_get()
447 struct rsnd_ssiu *ssiu; in rsnd_parse_connect_ssiu_compatible() local
457 for_each_rsnd_ssiu(ssiu, priv, i) { in rsnd_parse_connect_ssiu_compatible()
458 struct rsnd_mod *mod = rsnd_mod_get(ssiu); in rsnd_parse_connect_ssiu_compatible()
463 rsnd_dai_connect(mod, io, mod->type); in rsnd_parse_connect_ssiu_compatible()
476 struct rsnd_dai_stream *io_p = &rdai->playback; in rsnd_parse_connect_ssiu()
477 struct rsnd_dai_stream *io_c = &rdai->capture; in rsnd_parse_connect_ssiu()
479 /* use rcar_sound,ssiu if exist */ in rsnd_parse_connect_ssiu()
496 rsnd_dai_connect(mod, io_p, mod->type); in rsnd_parse_connect_ssiu()
498 rsnd_dai_connect(mod, io_c, mod->type); in rsnd_parse_connect_ssiu()
516 struct rsnd_ssiu *ssiu; in rsnd_ssiu_probe() local
523 * if it has "rcar_sound,ssiu", use it. in rsnd_ssiu_probe()
532 nr = priv->ssi_nr; in rsnd_ssiu_probe()
535 return -EINVAL; in rsnd_ssiu_probe()
537 ssiu = devm_kcalloc(dev, nr, sizeof(*ssiu), GFP_KERNEL); in rsnd_ssiu_probe()
538 if (!ssiu) in rsnd_ssiu_probe()
539 return -ENOMEM; in rsnd_ssiu_probe()
541 priv->ssiu = ssiu; in rsnd_ssiu_probe()
542 priv->ssiu_nr = nr; in rsnd_ssiu_probe()
553 ops->id = rsnd_ssiu_id; in rsnd_ssiu_probe()
554 ops->id_sub = rsnd_ssiu_id_sub; in rsnd_ssiu_probe()
566 dev_err(dev, "unknown SSIU\n"); in rsnd_ssiu_probe()
567 return -ENODEV; in rsnd_ssiu_probe()
571 for_each_rsnd_ssiu(ssiu, priv, i) { in rsnd_ssiu_probe()
585 ssiu->id = j; in rsnd_ssiu_probe()
586 ssiu->id_sub = i - list[ssiu->id]; in rsnd_ssiu_probe()
589 ssiu->id = i; in rsnd_ssiu_probe()
592 ret = rsnd_mod_init(priv, rsnd_mod_get(ssiu), in rsnd_ssiu_probe()
603 struct rsnd_ssiu *ssiu; in rsnd_ssiu_remove() local
606 for_each_rsnd_ssiu(ssiu, priv, i) { in rsnd_ssiu_remove()
607 rsnd_mod_quit(rsnd_mod_get(ssiu)); in rsnd_ssiu_remove()