Lines Matching refs:qdata

168 	struct spi_qmspi_data *qdata = dev->data;  in qmspi_encoded_fdiv()  local
174 return (qdata->base_freq_hz / freq_hz); in qmspi_encoded_fdiv()
186 static int qmspi_set_frequency(struct spi_qmspi_data *qdata, struct qmspi_regs *regs, in qmspi_set_frequency() argument
192 if (qdata->base_freq_hz) { in qmspi_set_frequency()
193 clk = qdata->base_freq_hz; in qmspi_set_frequency()
210 qdata->spi_freq_hz = clk / fdiv; in qmspi_set_frequency()
254 static void qmspi_set_signalling_mode(struct spi_qmspi_data *qdata, in qmspi_set_signalling_mode() argument
261 if (qdata->spi_freq_hz >= MHZ(48)) { in qmspi_set_signalling_mode()
349 struct spi_qmspi_data *qdata = dev->data; in qmspi_configure() local
358 if (spi_context_configured(&qdata->ctx, config)) { in qmspi_configure()
362 qmspi_set_frequency(qdata, regs, config->frequency); in qmspi_configure()
376 qdata->np = npins_from_spi_config(config); in qmspi_configure()
379 qdata->np = 1u; in qmspi_configure()
392 qmspi_set_signalling_mode(qdata, regs, smode); in qmspi_configure()
417 qdata->ctx.config = config; in qmspi_configure()
445 struct spi_qmspi_data *qdata = dev->data; in qmspi_xfr_cm_init() local
454 regs->CTRL = encode_npins(qdata->np); in qmspi_xfr_cm_init()
456 qdata->qstatus = 0; in qmspi_xfr_cm_init()
459 if (qdata->np != 1) { in qmspi_xfr_cm_init()
535 struct spi_qmspi_data *qdata = dev->data; in q_ldma_cfg() local
536 struct spi_context *ctx = &qdata->ctx; in q_ldma_cfg()
565 qdata->qunits = qunits; in q_ldma_cfg()
566 qdata->qxfru = qxfru; in q_ldma_cfg()
567 qdata->xfrlen = xfrlen; in q_ldma_cfg()
617 struct spi_qmspi_data *qdata = dev->data; in qmspi_xfr_sync() local
618 struct spi_context *ctx = &qdata->ctx; in qmspi_xfr_sync()
639 qdata->qstatus = temp; in qmspi_xfr_sync()
640 qdata->bufcnt_status = regs->BCNT_STS; in qmspi_xfr_sync()
641 qdata->rx_ldma_ctrl0 = regs->LDRX[0].CTRL; in qmspi_xfr_sync()
642 qdata->tx_ldma_ctrl0 = regs->LDTX[0].CTRL; in qmspi_xfr_sync()
646 qdata->qstatus = regs->STS; in qmspi_xfr_sync()
647 while (!(qdata->qstatus & MCHP_QMSPI_STS_DONE)) { in qmspi_xfr_sync()
653 qdata->qstatus = regs->STS; in qmspi_xfr_sync()
678 struct spi_qmspi_data *qdata = dev->data; in qmspi_xfr_start_async() local
687 qdata->xfr_len = q_ldma_cfg(dev); in qmspi_xfr_start_async()
688 if (!qdata->xfr_len) { in qmspi_xfr_start_async()
706 struct spi_qmspi_data *qdata = dev->data; in qmspi_xfr_async() local
709 qdata->qstatus = 0; in qmspi_xfr_async()
710 qdata->xfr_len = 0; in qmspi_xfr_async()
727 struct spi_qmspi_data *qdata = dev->data; in qmspi_transceive() local
728 struct spi_context *ctx = &qdata->ctx; in qmspi_transceive()
739 spi_context_lock(&qdata->ctx, asynchronous, cb, user_data, config); in qmspi_transceive()
752 qdata->cb = cb; in qmspi_transceive()
753 qdata->userdata = user_data; in qmspi_transceive()
928 struct spi_qmspi_data *qdata = dev->data; in qmspi_xec_init() local
933 qdata->base_freq_hz = 0u; in qmspi_xec_init()
934 qdata->qstatus = 0; in qmspi_xec_init()
935 qdata->np = cfg->width; in qmspi_xec_init()
937 qdata->xfr_len = 0; in qmspi_xec_init()
951 ret = clock_control_get_rate(cfg->clk_dev, clkss, &qdata->base_freq_hz); in qmspi_xec_init()
984 spi_context_unlock_unconditionally(&qdata->ctx); in qmspi_xec_init()