Lines Matching refs:config

176 			struct ux500_msp_config *config)  in configure_protocol()  argument
182 data_size = config->data_size; in configure_protocol()
183 msp->def_elem_len = config->def_elem_len; in configure_protocol()
184 if (config->default_protdesc == 1) { in configure_protocol()
185 if (config->protocol >= MSP_INVALID_PROTOCOL) { in configure_protocol()
191 (struct msp_protdesc *)&prot_descs[config->protocol]; in configure_protocol()
193 protdesc = (struct msp_protdesc *)&config->protdesc; in configure_protocol()
203 if (config->direction & MSP_DIR_TX) in configure_protocol()
205 if (config->direction & MSP_DIR_RX) in configure_protocol()
219 static int setup_bitclk(struct ux500_msp *msp, struct ux500_msp_config *config) in setup_bitclk() argument
231 if (config->default_protdesc) in setup_bitclk()
233 (struct msp_protdesc *)&prot_descs[config->protocol]; in setup_bitclk()
235 protdesc = (struct msp_protdesc *)&config->protdesc; in setup_bitclk()
237 switch (config->protocol) { in setup_bitclk()
241 sck_div = config->f_inputclk / (config->frame_freq * in setup_bitclk()
247 sck_div = config->f_inputclk / (config->frame_freq * in setup_bitclk()
254 config->protocol); in setup_bitclk()
263 msp->f_bitclk = (config->f_inputclk)/(sck_div + 1); in setup_bitclk()
275 struct ux500_msp_config *config) in configure_multichannel() argument
281 if (config->default_protdesc == 1) { in configure_multichannel()
282 if (config->protocol >= MSP_INVALID_PROTOCOL) { in configure_multichannel()
285 __func__, config->protocol); in configure_multichannel()
289 &prot_descs[config->protocol]; in configure_multichannel()
291 protdesc = (struct msp_protdesc *)&config->protdesc; in configure_multichannel()
294 mcfg = &config->multichannel_config; in configure_multichannel()
353 static int enable_msp(struct ux500_msp *msp, struct ux500_msp_config *config) in enable_msp() argument
359 configure_protocol(msp, config); in enable_msp()
360 setup_bitclk(msp, config); in enable_msp()
361 if (config->multichannel_configured == 1) { in enable_msp()
362 status = configure_multichannel(msp, config); in enable_msp()
370 if ((config->direction & MSP_DIR_RX) && in enable_msp()
376 if ((config->direction == MSP_DIR_TX) && in enable_msp()
384 if (config->direction & MSP_DIR_RX) in enable_msp()
386 if (config->direction & MSP_DIR_TX) in enable_msp()
390 writel(config->iodelay, msp->registers + MSP_IODLY); in enable_msp()
435 struct ux500_msp_config *config) in ux500_msp_i2s_open() argument
448 tx_sel = (config->direction & MSP_DIR_TX) > 0; in ux500_msp_i2s_open()
449 rx_sel = (config->direction & MSP_DIR_RX) > 0; in ux500_msp_i2s_open()
475 new_reg = (config->tx_clk_sel | config->rx_clk_sel | in ux500_msp_i2s_open()
476 config->rx_fsync_pol | config->tx_fsync_pol | in ux500_msp_i2s_open()
477 config->rx_fsync_sel | config->tx_fsync_sel | in ux500_msp_i2s_open()
478 config->rx_fifo_config | config->tx_fifo_config | in ux500_msp_i2s_open()
479 config->srg_clk_sel | config->loopback_enable | in ux500_msp_i2s_open()
480 config->tx_data_enable); in ux500_msp_i2s_open()
487 res = enable_msp(msp, config); in ux500_msp_i2s_open()
493 if (config->loopback_enable & 0x80) in ux500_msp_i2s_open()