Lines Matching refs:mod

12 	struct rsnd_mod mod;  member
24 #define rsnd_mod_to_ssiu(_mod) container_of((_mod), struct rsnd_ssiu, mod)
49 #define rsnd_ssiu_busif_err_irq_enable(mod) rsnd_ssiu_busif_err_irq_ctrl(mod, 1) argument
50 #define rsnd_ssiu_busif_err_irq_disable(mod) rsnd_ssiu_busif_err_irq_ctrl(mod, 0) argument
51 static void rsnd_ssiu_busif_err_irq_ctrl(struct rsnd_mod *mod, int enable) in rsnd_ssiu_busif_err_irq_ctrl() argument
53 int id = rsnd_mod_id(mod); in rsnd_ssiu_busif_err_irq_ctrl()
77 u32 sys_int_enable = rsnd_mod_read(mod, reg); in rsnd_ssiu_busif_err_irq_ctrl()
83 rsnd_mod_write(mod, reg, sys_int_enable); in rsnd_ssiu_busif_err_irq_ctrl()
87 bool rsnd_ssiu_busif_err_status_clear(struct rsnd_mod *mod) in rsnd_ssiu_busif_err_status_clear() argument
90 int id = rsnd_mod_id(mod); in rsnd_ssiu_busif_err_status_clear()
113 u32 status = rsnd_mod_read(mod, reg); in rsnd_ssiu_busif_err_status_clear()
118 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); in rsnd_ssiu_busif_err_status_clear()
122 rsnd_mod_name(mod), status); in rsnd_ssiu_busif_err_status_clear()
125 rsnd_mod_write(mod, reg, val); in rsnd_ssiu_busif_err_status_clear()
131 static u32 *rsnd_ssiu_get_status(struct rsnd_mod *mod, in rsnd_ssiu_get_status() argument
135 struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod); in rsnd_ssiu_get_status()
136 int busif = rsnd_mod_id_sub(mod); in rsnd_ssiu_get_status()
141 static int rsnd_ssiu_init(struct rsnd_mod *mod, in rsnd_ssiu_init() argument
148 int id = rsnd_mod_id(mod); in rsnd_ssiu_init()
153 rsnd_ssiu_busif_err_status_clear(mod); in rsnd_ssiu_init()
158 rsnd_mod_bset(mod, SSI_MODE0, (1 << id), !use_busif << id); in rsnd_ssiu_init()
166 val1 = rsnd_mod_read(mod, SSI_MODE1); in rsnd_ssiu_init()
167 val2 = rsnd_mod_read(mod, SSI_MODE2); in rsnd_ssiu_init()
206 rsnd_mod_bset(mod, SSI_MODE1, 0x0013001f, val1); in rsnd_ssiu_init()
207 rsnd_mod_bset(mod, SSI_MODE2, 0x00000017, val2); in rsnd_ssiu_init()
215 rsnd_ssiu_busif_err_irq_enable(mod); in rsnd_ssiu_init()
220 static int rsnd_ssiu_quit(struct rsnd_mod *mod, in rsnd_ssiu_quit() argument
225 rsnd_ssiu_busif_err_irq_disable(mod); in rsnd_ssiu_quit()
237 static int rsnd_ssiu_init_gen2(struct rsnd_mod *mod, in rsnd_ssiu_init_gen2() argument
241 struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod); in rsnd_ssiu_init_gen2()
247 ret = rsnd_ssiu_init(mod, io, priv); in rsnd_ssiu_init_gen2()
263 rsnd_mod_write(mod, SSI_MODE, mode); in rsnd_ssiu_init_gen2()
266 int id = rsnd_mod_id(mod); in rsnd_ssiu_init_gen2()
267 int busif = rsnd_mod_id_sub(mod); in rsnd_ssiu_init_gen2()
280 rsnd_mod_write(mod, adinr_reg, in rsnd_ssiu_init_gen2()
281 rsnd_get_adinr_bit(mod, io) | in rsnd_ssiu_init_gen2()
285 rsnd_mod_write(mod, mode_reg, in rsnd_ssiu_init_gen2()
286 rsnd_get_busif_shift(io, mod) | 1); in rsnd_ssiu_init_gen2()
287 rsnd_mod_write(mod, dalign_reg, in rsnd_ssiu_init_gen2()
288 rsnd_get_dalign(mod, io)); in rsnd_ssiu_init_gen2()
319 rsnd_mod_write(mod, HDMI0_SEL, val); in rsnd_ssiu_init_gen2()
321 rsnd_mod_write(mod, HDMI1_SEL, val); in rsnd_ssiu_init_gen2()
327 static int rsnd_ssiu_start_gen2(struct rsnd_mod *mod, in rsnd_ssiu_start_gen2() argument
331 int busif = rsnd_mod_id_sub(mod); in rsnd_ssiu_start_gen2()
336 rsnd_mod_bset(mod, SSI_CTRL, 1 << (busif * 4), 1 << (busif * 4)); in rsnd_ssiu_start_gen2()
339 rsnd_mod_write(mod, SSI_CONTROL, 0x1); in rsnd_ssiu_start_gen2()
344 static int rsnd_ssiu_stop_gen2(struct rsnd_mod *mod, in rsnd_ssiu_stop_gen2() argument
348 struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod); in rsnd_ssiu_stop_gen2()
349 int busif = rsnd_mod_id_sub(mod); in rsnd_ssiu_stop_gen2()
354 rsnd_mod_bset(mod, SSI_CTRL, 1 << (busif * 4), 0); in rsnd_ssiu_stop_gen2()
360 rsnd_mod_write(mod, SSI_CONTROL, 0); in rsnd_ssiu_stop_gen2()
365 static int rsnd_ssiu_id(struct rsnd_mod *mod) in rsnd_ssiu_id() argument
367 struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod); in rsnd_ssiu_id()
373 static int rsnd_ssiu_id_sub(struct rsnd_mod *mod) in rsnd_ssiu_id_sub() argument
375 struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod); in rsnd_ssiu_id_sub()
382 struct rsnd_mod *mod) in rsnd_ssiu_dma_req() argument
384 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); in rsnd_ssiu_dma_req()
402 SSIU_NAME, mod, name); in rsnd_ssiu_dma_req()
408 struct rsnd_mod *mod) in rsnd_ssiu_debug_info() argument
410 rsnd_debugfs_mod_reg_show(m, mod, RSND_GEN2_SSIU, in rsnd_ssiu_debug_info()
411 rsnd_mod_id(mod) * 0x80, 0x80); in rsnd_ssiu_debug_info()
452 struct rsnd_mod *mod = rsnd_mod_get(ssiu); in rsnd_parse_connect_ssiu_compatible() local
455 (rsnd_mod_id(ssi_mod) == rsnd_mod_id(mod)) && in rsnd_parse_connect_ssiu_compatible()
456 (rsnd_mod_id_sub(mod) == 0)) { in rsnd_parse_connect_ssiu_compatible()
457 rsnd_dai_connect(mod, io, mod->type); in rsnd_parse_connect_ssiu_compatible()
479 struct rsnd_mod *mod; in rsnd_parse_connect_ssiu() local
487 mod = rsnd_ssiu_mod_get(priv, i); 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()