Lines Matching defs:config

170 			struct ux500_msp_config *config)
176 data_size = config->data_size;
177 msp->def_elem_len = config->def_elem_len;
178 if (config->default_protdesc == 1) {
179 if (config->protocol >= MSP_INVALID_PROTOCOL) {
185 (struct msp_protdesc *)&prot_descs[config->protocol];
187 protdesc = (struct msp_protdesc *)&config->protdesc;
197 if (config->direction & MSP_DIR_TX)
199 if (config->direction & MSP_DIR_RX)
213 static int setup_bitclk(struct ux500_msp *msp, struct ux500_msp_config *config)
225 if (config->default_protdesc)
227 (struct msp_protdesc *)&prot_descs[config->protocol];
229 protdesc = (struct msp_protdesc *)&config->protdesc;
231 switch (config->protocol) {
235 sck_div = config->f_inputclk / (config->frame_freq *
241 sck_div = config->f_inputclk / (config->frame_freq *
248 config->protocol);
257 msp->f_bitclk = (config->f_inputclk)/(sck_div + 1);
269 struct ux500_msp_config *config)
275 if (config->default_protdesc == 1) {
276 if (config->protocol >= MSP_INVALID_PROTOCOL) {
279 __func__, config->protocol);
283 &prot_descs[config->protocol];
285 protdesc = (struct msp_protdesc *)&config->protdesc;
288 mcfg = &config->multichannel_config;
347 static int enable_msp(struct ux500_msp *msp, struct ux500_msp_config *config)
353 configure_protocol(msp, config);
354 setup_bitclk(msp, config);
355 if (config->multichannel_configured == 1) {
356 status = configure_multichannel(msp, config);
364 if (config->direction & MSP_DIR_RX)
366 if (config->direction & MSP_DIR_TX)
370 writel(config->iodelay, msp->registers + MSP_IODLY);
415 struct ux500_msp_config *config)
428 tx_sel = (config->direction & MSP_DIR_TX) > 0;
429 rx_sel = (config->direction & MSP_DIR_RX) > 0;
449 /* First do the global config register */
455 new_reg = (config->tx_clk_sel | config->rx_clk_sel |
456 config->rx_fsync_pol | config->tx_fsync_pol |
457 config->rx_fsync_sel | config->tx_fsync_sel |
458 config->rx_fifo_config | config->tx_fifo_config |
459 config->srg_clk_sel | config->loopback_enable |
460 config->tx_data_enable);
467 res = enable_msp(msp, config);
473 if (config->loopback_enable & 0x80)