Lines Matching refs:mod

12 	struct rsnd_mod mod;  member
24 #define rsnd_mod_to_ssiu(_mod) container_of((_mod), struct rsnd_ssiu, mod)
50 #define rsnd_ssiu_busif_err_irq_enable(mod) rsnd_ssiu_busif_err_irq_ctrl(mod, 1) argument
51 #define rsnd_ssiu_busif_err_irq_disable(mod) rsnd_ssiu_busif_err_irq_ctrl(mod, 0) argument
52 static void rsnd_ssiu_busif_err_irq_ctrl(struct rsnd_mod *mod, int enable) in rsnd_ssiu_busif_err_irq_ctrl() argument
54 int id = rsnd_mod_id(mod); in rsnd_ssiu_busif_err_irq_ctrl()
78 u32 sys_int_enable = rsnd_mod_read(mod, reg); in rsnd_ssiu_busif_err_irq_ctrl()
84 rsnd_mod_write(mod, reg, sys_int_enable); in rsnd_ssiu_busif_err_irq_ctrl()
88 bool rsnd_ssiu_busif_err_status_clear(struct rsnd_mod *mod) in rsnd_ssiu_busif_err_status_clear() argument
91 int id = rsnd_mod_id(mod); in rsnd_ssiu_busif_err_status_clear()
114 u32 status = rsnd_mod_read(mod, reg); in rsnd_ssiu_busif_err_status_clear()
119 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); in rsnd_ssiu_busif_err_status_clear()
123 rsnd_mod_name(mod), status); in rsnd_ssiu_busif_err_status_clear()
126 rsnd_mod_write(mod, reg, val); in rsnd_ssiu_busif_err_status_clear()
132 static u32 *rsnd_ssiu_get_status(struct rsnd_mod *mod, in rsnd_ssiu_get_status() argument
136 struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod); in rsnd_ssiu_get_status()
137 int busif = rsnd_mod_id_sub(mod); in rsnd_ssiu_get_status()
142 static int rsnd_ssiu_init(struct rsnd_mod *mod, in rsnd_ssiu_init() argument
149 int id = rsnd_mod_id(mod); in rsnd_ssiu_init()
154 rsnd_ssiu_busif_err_status_clear(mod); in rsnd_ssiu_init()
163 rsnd_mod_bset(mod, SSI_MODE0, (1 << id), !use_busif << id); in rsnd_ssiu_init()
171 val1 = rsnd_mod_read(mod, SSI_MODE1); in rsnd_ssiu_init()
172 val2 = rsnd_mod_read(mod, SSI_MODE2); in rsnd_ssiu_init()
211 rsnd_mod_bset(mod, SSI_MODE1, 0x0013001f, val1); in rsnd_ssiu_init()
212 rsnd_mod_bset(mod, SSI_MODE2, 0x00000017, val2); in rsnd_ssiu_init()
221 rsnd_ssiu_busif_err_irq_enable(mod); in rsnd_ssiu_init()
226 static int rsnd_ssiu_quit(struct rsnd_mod *mod, in rsnd_ssiu_quit() argument
231 rsnd_ssiu_busif_err_irq_disable(mod); in rsnd_ssiu_quit()
243 static int rsnd_ssiu_init_gen2(struct rsnd_mod *mod, in rsnd_ssiu_init_gen2() argument
247 struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod); in rsnd_ssiu_init_gen2()
253 ret = rsnd_ssiu_init(mod, io, priv); in rsnd_ssiu_init_gen2()
269 rsnd_mod_write(mod, SSI_MODE, mode); in rsnd_ssiu_init_gen2()
272 int id = rsnd_mod_id(mod); in rsnd_ssiu_init_gen2()
273 int busif = rsnd_mod_id_sub(mod); in rsnd_ssiu_init_gen2()
286 rsnd_mod_write(mod, adinr_reg, in rsnd_ssiu_init_gen2()
287 rsnd_get_adinr_bit(mod, io) | in rsnd_ssiu_init_gen2()
291 rsnd_mod_write(mod, mode_reg, in rsnd_ssiu_init_gen2()
292 rsnd_get_busif_shift(io, mod) | 1); in rsnd_ssiu_init_gen2()
293 rsnd_mod_write(mod, dalign_reg, in rsnd_ssiu_init_gen2()
294 rsnd_get_dalign(mod, io)); in rsnd_ssiu_init_gen2()
325 rsnd_mod_write(mod, HDMI0_SEL, val); in rsnd_ssiu_init_gen2()
327 rsnd_mod_write(mod, HDMI1_SEL, val); in rsnd_ssiu_init_gen2()
333 static int rsnd_ssiu_start_gen2(struct rsnd_mod *mod, in rsnd_ssiu_start_gen2() argument
337 int busif = rsnd_mod_id_sub(mod); in rsnd_ssiu_start_gen2()
342 rsnd_mod_bset(mod, SSI_CTRL, 1 << (busif * 4), 1 << (busif * 4)); in rsnd_ssiu_start_gen2()
345 rsnd_mod_write(mod, SSI_CONTROL, 0x1); in rsnd_ssiu_start_gen2()
350 static int rsnd_ssiu_stop_gen2(struct rsnd_mod *mod, in rsnd_ssiu_stop_gen2() argument
354 struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod); in rsnd_ssiu_stop_gen2()
355 int busif = rsnd_mod_id_sub(mod); in rsnd_ssiu_stop_gen2()
360 rsnd_mod_bset(mod, SSI_CTRL, 1 << (busif * 4), 0); in rsnd_ssiu_stop_gen2()
366 rsnd_mod_write(mod, SSI_CONTROL, 0); in rsnd_ssiu_stop_gen2()
371 static int rsnd_ssiu_id(struct rsnd_mod *mod) in rsnd_ssiu_id() argument
373 struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod); in rsnd_ssiu_id()
379 static int rsnd_ssiu_id_sub(struct rsnd_mod *mod) in rsnd_ssiu_id_sub() argument
381 struct rsnd_ssiu *ssiu = rsnd_mod_to_ssiu(mod); in rsnd_ssiu_id_sub()
388 struct rsnd_mod *mod) in rsnd_ssiu_dma_req() argument
390 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); in rsnd_ssiu_dma_req()
408 SSIU_NAME, mod, name); in rsnd_ssiu_dma_req()
414 struct rsnd_mod *mod) in rsnd_ssiu_debug_info() argument
416 rsnd_debugfs_mod_reg_show(m, mod, RSND_GEN2_SSIU, in rsnd_ssiu_debug_info()
417 rsnd_mod_id(mod) * 0x80, 0x80); in rsnd_ssiu_debug_info()
458 struct rsnd_mod *mod = rsnd_mod_get(ssiu); in rsnd_parse_connect_ssiu_compatible() local
461 (rsnd_mod_id(ssi_mod) == rsnd_mod_id(mod)) && in rsnd_parse_connect_ssiu_compatible()
462 (rsnd_mod_id_sub(mod) == 0)) { in rsnd_parse_connect_ssiu_compatible()
463 rsnd_dai_connect(mod, io, mod->type); in rsnd_parse_connect_ssiu_compatible()
485 struct rsnd_mod *mod; in rsnd_parse_connect_ssiu() local
493 mod = rsnd_ssiu_mod_get(priv, i); 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()