• Home
  • Raw
  • Download

Lines Matching refs:cdns

198 static inline u32 cdns_readl(struct sdw_cdns *cdns, int offset)  in cdns_readl()  argument
200 return readl(cdns->registers + offset); in cdns_readl()
203 static inline void cdns_writel(struct sdw_cdns *cdns, int offset, u32 value) in cdns_writel() argument
205 writel(value, cdns->registers + offset); in cdns_writel()
208 static inline void cdns_updatel(struct sdw_cdns *cdns, in cdns_updatel() argument
213 tmp = cdns_readl(cdns, offset); in cdns_updatel()
215 cdns_writel(cdns, offset, tmp); in cdns_updatel()
218 static int cdns_set_wait(struct sdw_cdns *cdns, int offset, u32 mask, u32 value) in cdns_set_wait() argument
225 reg_read = readl(cdns->registers + offset); in cdns_set_wait()
236 static int cdns_clear_bit(struct sdw_cdns *cdns, int offset, u32 value) in cdns_clear_bit() argument
238 writel(value, cdns->registers + offset); in cdns_clear_bit()
241 return cdns_set_wait(cdns, offset, value, 0); in cdns_clear_bit()
248 static int cdns_config_update(struct sdw_cdns *cdns) in cdns_config_update() argument
252 if (sdw_cdns_is_clock_stop(cdns)) { in cdns_config_update()
253 dev_err(cdns->dev, "Cannot program MCP_CONFIG_UPDATE in ClockStopMode\n"); in cdns_config_update()
257 ret = cdns_clear_bit(cdns, CDNS_MCP_CONFIG_UPDATE, in cdns_config_update()
260 dev_err(cdns->dev, "Config update timedout\n"); in cdns_config_update()
272 static ssize_t cdns_sprintf(struct sdw_cdns *cdns, in cdns_sprintf() argument
276 "%4x\t%8x\n", reg, cdns_readl(cdns, reg)); in cdns_sprintf()
281 struct sdw_cdns *cdns = s->private; in cdns_reg_show() local
295 ret += cdns_sprintf(cdns, buf, ret, i); in cdns_reg_show()
301 ret += cdns_sprintf(cdns, buf, ret, i); in cdns_reg_show()
305 ret += cdns_sprintf(cdns, buf, ret, CDNS_MCP_SSP_CTRL0); in cdns_reg_show()
306 ret += cdns_sprintf(cdns, buf, ret, CDNS_MCP_SSP_CTRL1); in cdns_reg_show()
307 ret += cdns_sprintf(cdns, buf, ret, CDNS_MCP_CLK_CTRL0); in cdns_reg_show()
308 ret += cdns_sprintf(cdns, buf, ret, CDNS_MCP_CLK_CTRL1); in cdns_reg_show()
313 num_ports = cdns->num_ports; in cdns_reg_show()
320 ret += cdns_sprintf(cdns, buf, ret, j); in cdns_reg_show()
331 ret += cdns_sprintf(cdns, buf, ret, j); in cdns_reg_show()
337 ret += cdns_sprintf(cdns, buf, ret, in cdns_reg_show()
345 ret += cdns_sprintf(cdns, buf, ret, CDNS_PDI_CONFIG(i)); in cdns_reg_show()
356 struct sdw_cdns *cdns = data; in cdns_hw_reset() local
365 ret = sdw_cdns_exit_reset(cdns); in cdns_hw_reset()
367 dev_dbg(cdns->dev, "link hw_reset done: %d\n", ret); in cdns_hw_reset()
376 struct sdw_cdns *cdns = data; in cdns_parity_error_injection() local
383 bus = &cdns->bus; in cdns_parity_error_injection()
391 dev_err_ratelimited(cdns->dev, in cdns_parity_error_injection()
411 cdns_updatel(cdns, CDNS_MCP_CMDCTRL, in cdns_parity_error_injection()
416 cdns_updatel(cdns, CDNS_MCP_CONFIG_UPDATE, in cdns_parity_error_injection()
421 ret = sdw_bread_no_pm_unlocked(&cdns->bus, 0xf, SDW_SCP_DEVID_0); in cdns_parity_error_injection()
422 dev_info(cdns->dev, "parity error injection, read: %d\n", ret); in cdns_parity_error_injection()
425 cdns_updatel(cdns, CDNS_MCP_CMDCTRL, in cdns_parity_error_injection()
430 cdns_updatel(cdns, CDNS_MCP_CONFIG_UPDATE, in cdns_parity_error_injection()
458 void sdw_cdns_debugfs_init(struct sdw_cdns *cdns, struct dentry *root) in sdw_cdns_debugfs_init() argument
460 debugfs_create_file("cdns-registers", 0400, root, cdns, &cdns_reg_fops); in sdw_cdns_debugfs_init()
462 debugfs_create_file("cdns-hw-reset", 0200, root, cdns, in sdw_cdns_debugfs_init()
465 debugfs_create_file("cdns-parity-error-injection", 0200, root, cdns, in sdw_cdns_debugfs_init()
476 cdns_fill_msg_resp(struct sdw_cdns *cdns, in cdns_fill_msg_resp() argument
484 if (!(cdns->response_buf[i] & CDNS_MCP_RESP_ACK)) { in cdns_fill_msg_resp()
486 dev_dbg_ratelimited(cdns->dev, "Msg Ack not received\n"); in cdns_fill_msg_resp()
488 if (cdns->response_buf[i] & CDNS_MCP_RESP_NACK) { in cdns_fill_msg_resp()
490 dev_err_ratelimited(cdns->dev, "Msg NACK received\n"); in cdns_fill_msg_resp()
495 dev_err_ratelimited(cdns->dev, "Msg NACKed for Slave %d\n", msg->dev_num); in cdns_fill_msg_resp()
500 dev_dbg_ratelimited(cdns->dev, "Msg ignored for Slave %d\n", msg->dev_num); in cdns_fill_msg_resp()
506 msg->buf[i + offset] = FIELD_GET(CDNS_MCP_RESP_RDATA, cdns->response_buf[i]); in cdns_fill_msg_resp()
512 _cdns_xfer_msg(struct sdw_cdns *cdns, struct sdw_msg *msg, int cmd, in _cdns_xfer_msg() argument
520 if (cdns->msg_count != count) { in _cdns_xfer_msg()
521 cdns_writel(cdns, CDNS_MCP_FIFOLEVEL, count); in _cdns_xfer_msg()
522 cdns->msg_count = count; in _cdns_xfer_msg()
538 cdns_writel(cdns, base, data); in _cdns_xfer_msg()
546 time = wait_for_completion_timeout(&cdns->tx_complete, in _cdns_xfer_msg()
549 dev_err(cdns->dev, "IO transfer timed out, cmd %d device %d addr %x len %d\n", in _cdns_xfer_msg()
555 return cdns_fill_msg_resp(cdns, msg, count, offset); in _cdns_xfer_msg()
559 cdns_program_scp_addr(struct sdw_cdns *cdns, struct sdw_msg *msg) in cdns_program_scp_addr() argument
567 if (cdns->msg_count != CDNS_SCP_RX_FIFOLEVEL) { in cdns_program_scp_addr()
568 cdns_writel(cdns, CDNS_MCP_FIFOLEVEL, CDNS_SCP_RX_FIFOLEVEL); in cdns_program_scp_addr()
569 cdns->msg_count = CDNS_SCP_RX_FIFOLEVEL; in cdns_program_scp_addr()
583 cdns_writel(cdns, base, data[0]); in cdns_program_scp_addr()
585 cdns_writel(cdns, base, data[1]); in cdns_program_scp_addr()
587 time = wait_for_completion_timeout(&cdns->tx_complete, in cdns_program_scp_addr()
590 dev_err(cdns->dev, "SCP Msg trf timed out\n"); in cdns_program_scp_addr()
597 if (!(cdns->response_buf[i] & CDNS_MCP_RESP_ACK)) { in cdns_program_scp_addr()
599 dev_err(cdns->dev, "Program SCP Ack not received\n"); in cdns_program_scp_addr()
600 if (cdns->response_buf[i] & CDNS_MCP_RESP_NACK) { in cdns_program_scp_addr()
602 dev_err(cdns->dev, "Program SCP NACK received\n"); in cdns_program_scp_addr()
609 dev_err_ratelimited(cdns->dev, in cdns_program_scp_addr()
615 dev_dbg_ratelimited(cdns->dev, in cdns_program_scp_addr()
623 static int cdns_prep_msg(struct sdw_cdns *cdns, struct sdw_msg *msg, int *cmd) in cdns_prep_msg() argument
628 ret = cdns_program_scp_addr(cdns, msg); in cdns_prep_msg()
645 dev_err(cdns->dev, "Invalid msg cmd: %d\n", msg->flags); in cdns_prep_msg()
655 struct sdw_cdns *cdns = bus_to_cdns(bus); in cdns_xfer_msg() local
658 ret = cdns_prep_msg(cdns, msg, &cmd); in cdns_xfer_msg()
663 ret = _cdns_xfer_msg(cdns, msg, cmd, i * CDNS_MCP_CMD_LEN, in cdns_xfer_msg()
672 ret = _cdns_xfer_msg(cdns, msg, cmd, i * CDNS_MCP_CMD_LEN, in cdns_xfer_msg()
684 struct sdw_cdns *cdns = bus_to_cdns(bus); in cdns_xfer_msg_defer() local
691 ret = cdns_prep_msg(cdns, msg, &cmd); in cdns_xfer_msg_defer()
695 cdns->defer = defer; in cdns_xfer_msg_defer()
696 cdns->defer->length = msg->len; in cdns_xfer_msg_defer()
698 return _cdns_xfer_msg(cdns, msg, cmd, 0, msg->len, true); in cdns_xfer_msg_defer()
705 struct sdw_cdns *cdns = bus_to_cdns(bus); in cdns_reset_page_addr() local
712 return cdns_program_scp_addr(cdns, &msg); in cdns_reset_page_addr()
720 static void cdns_read_response(struct sdw_cdns *cdns) in cdns_read_response() argument
725 num_resp = cdns_readl(cdns, CDNS_MCP_FIFOSTAT); in cdns_read_response()
731 cdns->response_buf[i] = cdns_readl(cdns, cmd_base); in cdns_read_response()
736 static int cdns_update_slave_status(struct sdw_cdns *cdns, in cdns_update_slave_status() argument
782 dev_warn_ratelimited(cdns->dev, in cdns_update_slave_status()
787 val = cdns_readl(cdns, CDNS_MCP_SLAVE_STAT); in cdns_update_slave_status()
806 dev_warn_ratelimited(cdns->dev, in cdns_update_slave_status()
814 return sdw_handle_slave_status(&cdns->bus, status); in cdns_update_slave_status()
826 struct sdw_cdns *cdns = dev_id; in sdw_cdns_irq() local
831 if (!cdns->link_up) in sdw_cdns_irq()
834 int_status = cdns_readl(cdns, CDNS_MCP_INTSTAT); in sdw_cdns_irq()
844 cdns_read_response(cdns); in sdw_cdns_irq()
846 if (cdns->defer) { in sdw_cdns_irq()
847 cdns_fill_msg_resp(cdns, cdns->defer->msg, in sdw_cdns_irq()
848 cdns->defer->length, 0); in sdw_cdns_irq()
849 complete(&cdns->defer->complete); in sdw_cdns_irq()
850 cdns->defer = NULL; in sdw_cdns_irq()
852 complete(&cdns->tx_complete); in sdw_cdns_irq()
858 dev_err_ratelimited(cdns->dev, "Parity error\n"); in sdw_cdns_irq()
863 dev_err_ratelimited(cdns->dev, "Bus clash for control word\n"); in sdw_cdns_irq()
871 dev_err_ratelimited(cdns->dev, "Bus clash for data word\n"); in sdw_cdns_irq()
874 if (cdns->bus.params.m_data_mode != SDW_PORT_DATA_MODE_NORMAL && in sdw_cdns_irq()
879 port_intstat = cdns_readl(cdns, CDNS_MCP_PORT_INTSTAT); in sdw_cdns_irq()
880 dev_err_ratelimited(cdns->dev, "DP interrupt: PortIntStat %8x\n", in sdw_cdns_irq()
884 cdns_writel(cdns, CDNS_MCP_PORT_INTSTAT, port_intstat); in sdw_cdns_irq()
889 cdns_updatel(cdns, CDNS_MCP_INTMASK, in sdw_cdns_irq()
901 if (cdns->interrupt_enabled) in sdw_cdns_irq()
902 schedule_work(&cdns->work); in sdw_cdns_irq()
905 cdns_writel(cdns, CDNS_MCP_INTSTAT, int_status); in sdw_cdns_irq()
918 struct sdw_cdns *cdns = in cdns_update_slave_status_work() local
922 dev_dbg_ratelimited(cdns->dev, "Slave status change\n"); in cdns_update_slave_status_work()
924 slave0 = cdns_readl(cdns, CDNS_MCP_SLAVE_INTSTAT0); in cdns_update_slave_status_work()
925 slave1 = cdns_readl(cdns, CDNS_MCP_SLAVE_INTSTAT1); in cdns_update_slave_status_work()
927 cdns_update_slave_status(cdns, slave0, slave1); in cdns_update_slave_status_work()
928 cdns_writel(cdns, CDNS_MCP_SLAVE_INTSTAT0, slave0); in cdns_update_slave_status_work()
929 cdns_writel(cdns, CDNS_MCP_SLAVE_INTSTAT1, slave1); in cdns_update_slave_status_work()
932 cdns_writel(cdns, CDNS_MCP_INTSTAT, CDNS_MCP_INT_SLAVE_MASK); in cdns_update_slave_status_work()
933 cdns_updatel(cdns, CDNS_MCP_INTMASK, in cdns_update_slave_status_work()
946 int sdw_cdns_exit_reset(struct sdw_cdns *cdns) in sdw_cdns_exit_reset() argument
949 cdns_updatel(cdns, CDNS_MCP_CONTROL, in sdw_cdns_exit_reset()
954 cdns_updatel(cdns, CDNS_MCP_CONTROL, in sdw_cdns_exit_reset()
959 cdns_updatel(cdns, CDNS_MCP_CONFIG_UPDATE, in sdw_cdns_exit_reset()
974 static void cdns_enable_slave_interrupts(struct sdw_cdns *cdns, bool state) in cdns_enable_slave_interrupts() argument
978 mask = cdns_readl(cdns, CDNS_MCP_INTMASK); in cdns_enable_slave_interrupts()
984 cdns_writel(cdns, CDNS_MCP_INTMASK, mask); in cdns_enable_slave_interrupts()
992 int sdw_cdns_enable_interrupt(struct sdw_cdns *cdns, bool state) in sdw_cdns_enable_interrupt() argument
1012 if (cdns->bus.params.m_data_mode != SDW_PORT_DATA_MODE_NORMAL) in sdw_cdns_enable_interrupt()
1032 slave_state = cdns_readl(cdns, CDNS_MCP_SLAVE_INTSTAT0); in sdw_cdns_enable_interrupt()
1033 cdns_writel(cdns, CDNS_MCP_SLAVE_INTSTAT0, slave_state); in sdw_cdns_enable_interrupt()
1034 slave_state = cdns_readl(cdns, CDNS_MCP_SLAVE_INTSTAT1); in sdw_cdns_enable_interrupt()
1035 cdns_writel(cdns, CDNS_MCP_SLAVE_INTSTAT1, slave_state); in sdw_cdns_enable_interrupt()
1037 cdns->interrupt_enabled = state; in sdw_cdns_enable_interrupt()
1049 cancel_work_sync(&cdns->work); in sdw_cdns_enable_interrupt()
1051 cdns_writel(cdns, CDNS_MCP_SLAVE_INTMASK0, slave_intmask0); in sdw_cdns_enable_interrupt()
1052 cdns_writel(cdns, CDNS_MCP_SLAVE_INTMASK1, slave_intmask1); in sdw_cdns_enable_interrupt()
1053 cdns_writel(cdns, CDNS_MCP_INTMASK, mask); in sdw_cdns_enable_interrupt()
1059 static int cdns_allocate_pdi(struct sdw_cdns *cdns, in cdns_allocate_pdi() argument
1069 pdi = devm_kcalloc(cdns->dev, num, sizeof(*pdi), GFP_KERNEL); in cdns_allocate_pdi()
1087 int sdw_cdns_pdi_init(struct sdw_cdns *cdns, in sdw_cdns_pdi_init() argument
1094 cdns->pcm.num_bd = config.pcm_bd; in sdw_cdns_pdi_init()
1095 cdns->pcm.num_in = config.pcm_in; in sdw_cdns_pdi_init()
1096 cdns->pcm.num_out = config.pcm_out; in sdw_cdns_pdi_init()
1097 cdns->pdm.num_bd = config.pdm_bd; in sdw_cdns_pdi_init()
1098 cdns->pdm.num_in = config.pdm_in; in sdw_cdns_pdi_init()
1099 cdns->pdm.num_out = config.pdm_out; in sdw_cdns_pdi_init()
1102 stream = &cdns->pcm; in sdw_cdns_pdi_init()
1107 ret = cdns_allocate_pdi(cdns, &stream->bd, in sdw_cdns_pdi_init()
1114 ret = cdns_allocate_pdi(cdns, &stream->in, in sdw_cdns_pdi_init()
1121 ret = cdns_allocate_pdi(cdns, &stream->out, in sdw_cdns_pdi_init()
1128 cdns->num_ports = stream->num_pdi; in sdw_cdns_pdi_init()
1131 stream = &cdns->pdm; in sdw_cdns_pdi_init()
1132 ret = cdns_allocate_pdi(cdns, &stream->bd, in sdw_cdns_pdi_init()
1139 ret = cdns_allocate_pdi(cdns, &stream->in, in sdw_cdns_pdi_init()
1146 ret = cdns_allocate_pdi(cdns, &stream->out, in sdw_cdns_pdi_init()
1154 cdns->num_ports += stream->num_pdi; in sdw_cdns_pdi_init()
1175 static void cdns_init_clock_ctrl(struct sdw_cdns *cdns) in cdns_init_clock_ctrl() argument
1177 struct sdw_bus *bus = &cdns->bus; in cdns_init_clock_ctrl()
1186 cdns_updatel(cdns, CDNS_MCP_CLK_CTRL0, in cdns_init_clock_ctrl()
1188 cdns_updatel(cdns, CDNS_MCP_CLK_CTRL1, in cdns_init_clock_ctrl()
1197 cdns_writel(cdns, CDNS_MCP_FRAME_SHAPE_INIT, val); in cdns_init_clock_ctrl()
1201 cdns_writel(cdns, CDNS_MCP_SSP_CTRL0, ssp_interval); in cdns_init_clock_ctrl()
1202 cdns_writel(cdns, CDNS_MCP_SSP_CTRL1, ssp_interval); in cdns_init_clock_ctrl()
1209 int sdw_cdns_init(struct sdw_cdns *cdns) in sdw_cdns_init() argument
1213 cdns_init_clock_ctrl(cdns); in sdw_cdns_init()
1216 cdns->msg_count = cdns_readl(cdns, CDNS_MCP_FIFOLEVEL); in sdw_cdns_init()
1219 cdns_updatel(cdns, CDNS_MCP_CONTROL, CDNS_MCP_CONTROL_CMD_RST, in sdw_cdns_init()
1223 cdns_updatel(cdns, CDNS_MCP_CONTROL, CDNS_MCP_CONTROL_CMD_ACCEPT, in sdw_cdns_init()
1227 val = cdns_readl(cdns, CDNS_MCP_CONFIG); in sdw_cdns_init()
1242 if (cdns->bus.multi_link) in sdw_cdns_init()
1250 cdns_writel(cdns, CDNS_MCP_CONFIG, val); in sdw_cdns_init()
1260 struct sdw_cdns *cdns = bus_to_cdns(bus); in cdns_bus_conf() local
1265 dev_err(cdns->dev, "NULL curr_dr_freq\n"); in cdns_bus_conf()
1278 cdns_updatel(cdns, mcp_clkctrl_off, CDNS_MCP_CLK_MCLKD_MASK, divider); in cdns_bus_conf()
1287 struct sdw_cdns *cdns = bus_to_cdns(bus); in cdns_port_params() local
1295 dpn_config = cdns_readl(cdns, dpn_config_off); in cdns_port_params()
1301 cdns_writel(cdns, dpn_config_off, dpn_config); in cdns_port_params()
1310 struct sdw_cdns *cdns = bus_to_cdns(bus); in cdns_transport_params() local
1334 dpn_config = cdns_readl(cdns, dpn_config_off); in cdns_transport_params()
1337 cdns_writel(cdns, dpn_config_off, dpn_config); in cdns_transport_params()
1341 cdns_writel(cdns, dpn_offsetctrl_off, dpn_offsetctrl); in cdns_transport_params()
1347 cdns_writel(cdns, dpn_hctrl_off, dpn_hctrl); in cdns_transport_params()
1348 cdns_writel(cdns, dpn_samplectrl_off, (t_params->sample_interval - 1)); in cdns_transport_params()
1356 struct sdw_cdns *cdns = bus_to_cdns(bus); in cdns_port_enable() local
1365 cdns_writel(cdns, dpn_chnen_off, ch_mask); in cdns_port_enable()
1381 bool sdw_cdns_is_clock_stop(struct sdw_cdns *cdns) in sdw_cdns_is_clock_stop() argument
1383 return !!(cdns_readl(cdns, CDNS_MCP_STAT) & CDNS_MCP_STAT_CLK_STOP); in sdw_cdns_is_clock_stop()
1393 int sdw_cdns_clock_stop(struct sdw_cdns *cdns, bool block_wake) in sdw_cdns_clock_stop() argument
1400 if (sdw_cdns_is_clock_stop(cdns)) { in sdw_cdns_clock_stop()
1401 dev_dbg(cdns->dev, "Clock is already stopped\n"); in sdw_cdns_clock_stop()
1410 cdns_enable_slave_interrupts(cdns, false); in sdw_cdns_clock_stop()
1418 cdns_updatel(cdns, CDNS_MCP_CONTROL, in sdw_cdns_clock_stop()
1422 list_for_each_entry(slave, &cdns->bus.slaves, node) { in sdw_cdns_clock_stop()
1437 cdns_updatel(cdns, CDNS_MCP_CONTROL, in sdw_cdns_clock_stop()
1441 cdns_updatel(cdns, CDNS_MCP_CONTROL, in sdw_cdns_clock_stop()
1445 ret = cdns_config_update(cdns); in sdw_cdns_clock_stop()
1447 dev_err(cdns->dev, "%s: config_update failed\n", __func__); in sdw_cdns_clock_stop()
1453 ret = sdw_bus_prep_clk_stop(&cdns->bus); in sdw_cdns_clock_stop()
1455 dev_err(cdns->dev, "prepare clock stop failed %d\n", ret); in sdw_cdns_clock_stop()
1464 ret = sdw_bus_clk_stop(&cdns->bus); in sdw_cdns_clock_stop()
1466 dev_err(cdns->dev, "bus clock stop failed %d", ret); in sdw_cdns_clock_stop()
1470 ret = cdns_set_wait(cdns, CDNS_MCP_STAT, in sdw_cdns_clock_stop()
1474 dev_err(cdns->dev, "Clock stop failed %d\n", ret); in sdw_cdns_clock_stop()
1487 int sdw_cdns_clock_restart(struct sdw_cdns *cdns, bool bus_reset) in sdw_cdns_clock_restart() argument
1492 cdns_enable_slave_interrupts(cdns, true); in sdw_cdns_clock_restart()
1494 ret = cdns_clear_bit(cdns, CDNS_MCP_CONTROL, in sdw_cdns_clock_restart()
1497 dev_err(cdns->dev, "Couldn't exit from clock stop\n"); in sdw_cdns_clock_restart()
1501 ret = cdns_set_wait(cdns, CDNS_MCP_STAT, CDNS_MCP_STAT_CLK_STOP, 0); in sdw_cdns_clock_restart()
1503 dev_err(cdns->dev, "clock stop exit failed %d\n", ret); in sdw_cdns_clock_restart()
1507 cdns_updatel(cdns, CDNS_MCP_CONTROL, in sdw_cdns_clock_restart()
1514 cdns_updatel(cdns, CDNS_MCP_CONTROL, CDNS_MCP_CONTROL_CMD_ACCEPT, 0); in sdw_cdns_clock_restart()
1519 cdns_updatel(cdns, CDNS_MCP_CONFIG, in sdw_cdns_clock_restart()
1523 ret = cdns_config_update(cdns); in sdw_cdns_clock_restart()
1525 dev_err(cdns->dev, "%s: config_update failed\n", __func__); in sdw_cdns_clock_restart()
1529 ret = sdw_bus_exit_clk_stop(&cdns->bus); in sdw_cdns_clock_restart()
1531 dev_err(cdns->dev, "bus failed to exit clock stop %d\n", ret); in sdw_cdns_clock_restart()
1542 int sdw_cdns_probe(struct sdw_cdns *cdns) in sdw_cdns_probe() argument
1544 init_completion(&cdns->tx_complete); in sdw_cdns_probe()
1545 cdns->bus.port_ops = &cdns_port_ops; in sdw_cdns_probe()
1547 INIT_WORK(&cdns->work, cdns_update_slave_status_work); in sdw_cdns_probe()
1555 struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai); in cdns_set_sdw_stream() local
1582 dma->bus = &cdns->bus; in cdns_set_sdw_stream()
1583 dma->link_id = cdns->instance; in cdns_set_sdw_stream()
1617 static struct sdw_cdns_pdi *cdns_find_pdi(struct sdw_cdns *cdns, in cdns_find_pdi() argument
1640 void sdw_cdns_config_stream(struct sdw_cdns *cdns, in sdw_cdns_config_stream() argument
1648 if (cdns->bus.params.m_data_mode != SDW_PORT_DATA_MODE_NORMAL) in sdw_cdns_config_stream()
1652 cdns_updatel(cdns, offset, in sdw_cdns_config_stream()
1659 cdns_writel(cdns, CDNS_PDI_CONFIG(pdi->num), val); in sdw_cdns_config_stream()
1672 struct sdw_cdns_pdi *sdw_cdns_alloc_pdi(struct sdw_cdns *cdns, in sdw_cdns_alloc_pdi() argument
1679 pdi = cdns_find_pdi(cdns, 0, stream->num_in, stream->in, in sdw_cdns_alloc_pdi()
1682 pdi = cdns_find_pdi(cdns, 0, stream->num_out, stream->out, in sdw_cdns_alloc_pdi()
1687 pdi = cdns_find_pdi(cdns, 2, stream->num_bd, stream->bd, in sdw_cdns_alloc_pdi()