Lines Matching refs:ssp_regs
92 struct mxs_ssp_regs *ssp_regs = mxs_slave->regs; in spi_claim_bus() local
95 mxs_reset_block(&ssp_regs->hw_ssp_ctrl0_reg); in spi_claim_bus()
99 &ssp_regs->hw_ssp_ctrl0); in spi_claim_bus()
104 writel(reg, &ssp_regs->hw_ssp_ctrl1); in spi_claim_bus()
106 writel(0, &ssp_regs->hw_ssp_cmd0); in spi_claim_bus()
117 static void mxs_spi_start_xfer(struct mxs_ssp_regs *ssp_regs) in mxs_spi_start_xfer() argument
119 writel(SSP_CTRL0_LOCK_CS, &ssp_regs->hw_ssp_ctrl0_set); in mxs_spi_start_xfer()
120 writel(SSP_CTRL0_IGNORE_CRC, &ssp_regs->hw_ssp_ctrl0_clr); in mxs_spi_start_xfer()
123 static void mxs_spi_end_xfer(struct mxs_ssp_regs *ssp_regs) in mxs_spi_end_xfer() argument
125 writel(SSP_CTRL0_LOCK_CS, &ssp_regs->hw_ssp_ctrl0_clr); in mxs_spi_end_xfer()
126 writel(SSP_CTRL0_IGNORE_CRC, &ssp_regs->hw_ssp_ctrl0_set); in mxs_spi_end_xfer()
132 struct mxs_ssp_regs *ssp_regs = slave->regs; in mxs_spi_xfer_pio() local
135 mxs_spi_start_xfer(ssp_regs); in mxs_spi_xfer_pio()
140 writel(SSP_CTRL0_XFER_COUNT_MASK, &ssp_regs->hw_ssp_ctrl0_clr); in mxs_spi_xfer_pio()
141 writel(1, &ssp_regs->hw_ssp_ctrl0_set); in mxs_spi_xfer_pio()
143 writel(1, &ssp_regs->hw_ssp_xfer_size); in mxs_spi_xfer_pio()
147 mxs_spi_end_xfer(ssp_regs); in mxs_spi_xfer_pio()
150 writel(SSP_CTRL0_READ, &ssp_regs->hw_ssp_ctrl0_clr); in mxs_spi_xfer_pio()
152 writel(SSP_CTRL0_READ, &ssp_regs->hw_ssp_ctrl0_set); in mxs_spi_xfer_pio()
154 writel(SSP_CTRL0_RUN, &ssp_regs->hw_ssp_ctrl0_set); in mxs_spi_xfer_pio()
156 if (mxs_wait_mask_set(&ssp_regs->hw_ssp_ctrl0_reg, in mxs_spi_xfer_pio()
163 writel(*data++, &ssp_regs->hw_ssp_data); in mxs_spi_xfer_pio()
165 writel(SSP_CTRL0_DATA_XFER, &ssp_regs->hw_ssp_ctrl0_set); in mxs_spi_xfer_pio()
168 if (mxs_wait_mask_clr(&ssp_regs->hw_ssp_status_reg, in mxs_spi_xfer_pio()
174 *data = readl(&ssp_regs->hw_ssp_data); in mxs_spi_xfer_pio()
178 if (mxs_wait_mask_clr(&ssp_regs->hw_ssp_ctrl0_reg, in mxs_spi_xfer_pio()
193 struct mxs_ssp_regs *ssp_regs = slave->regs; in mxs_spi_xfer_dma() local
212 ctrl0 = readl(&ssp_regs->hw_ssp_ctrl0); in mxs_spi_xfer_dma()
313 struct mxs_ssp_regs *ssp_regs = mxs_slave->regs; in spi_xfer() local
356 writel(SSP_CTRL1_DMA_ENABLE, &ssp_regs->hw_ssp_ctrl1_clr); in spi_xfer()
359 writel(SSP_CTRL1_DMA_ENABLE, &ssp_regs->hw_ssp_ctrl1_set); in spi_xfer()