Lines Matching refs:ctrl_reg
152 u32 ctrl_reg = CDNS_SPI_CR_DEFAULT; in cdns_spi_init_hw() local
155 ctrl_reg |= CDNS_SPI_CR_PERI_SEL; in cdns_spi_init_hw()
165 cdns_spi_write(xspi, CDNS_SPI_CR, ctrl_reg); in cdns_spi_init_hw()
177 u32 ctrl_reg; in cdns_spi_chipselect() local
179 ctrl_reg = cdns_spi_read(xspi, CDNS_SPI_CR); in cdns_spi_chipselect()
183 ctrl_reg |= CDNS_SPI_CR_SSCTRL; in cdns_spi_chipselect()
186 ctrl_reg &= ~CDNS_SPI_CR_SSCTRL; in cdns_spi_chipselect()
188 ctrl_reg |= ((~(CDNS_SPI_SS0 << spi->chip_select)) << in cdns_spi_chipselect()
192 ctrl_reg |= (spi->chip_select << CDNS_SPI_SS_SHIFT) & in cdns_spi_chipselect()
196 cdns_spi_write(xspi, CDNS_SPI_CR, ctrl_reg); in cdns_spi_chipselect()
208 u32 ctrl_reg, new_ctrl_reg; in cdns_spi_config_clock_mode() local
211 ctrl_reg = new_ctrl_reg; in cdns_spi_config_clock_mode()
220 if (new_ctrl_reg != ctrl_reg) { in cdns_spi_config_clock_mode()
251 u32 ctrl_reg, baud_rate_val; in cdns_spi_config_clock_freq() local
256 ctrl_reg = cdns_spi_read(xspi, CDNS_SPI_CR); in cdns_spi_config_clock_freq()
266 ctrl_reg &= ~CDNS_SPI_CR_BAUD_DIV; in cdns_spi_config_clock_freq()
267 ctrl_reg |= baud_rate_val << CDNS_SPI_BAUD_DIV_SHIFT; in cdns_spi_config_clock_freq()
271 cdns_spi_write(xspi, CDNS_SPI_CR, ctrl_reg); in cdns_spi_config_clock_freq()