Lines Matching refs:cfg
165 u32 cfg, stat; in au1550_spi_chipsel() local
177 cfg = hw->regs->psc_spicfg; in au1550_spi_chipsel()
179 hw->regs->psc_spicfg = cfg & ~PSC_SPICFG_DE_ENABLE; in au1550_spi_chipsel()
183 cfg |= PSC_SPICFG_BI; in au1550_spi_chipsel()
185 cfg &= ~PSC_SPICFG_BI; in au1550_spi_chipsel()
187 cfg &= ~PSC_SPICFG_CDE; in au1550_spi_chipsel()
189 cfg |= PSC_SPICFG_CDE; in au1550_spi_chipsel()
192 cfg |= PSC_SPICFG_MLF; in au1550_spi_chipsel()
194 cfg &= ~PSC_SPICFG_MLF; in au1550_spi_chipsel()
197 cfg &= ~PSC_SPICFG_DD_DISABLE; in au1550_spi_chipsel()
199 cfg |= PSC_SPICFG_DD_DISABLE; in au1550_spi_chipsel()
200 cfg = PSC_SPICFG_CLR_LEN(cfg); in au1550_spi_chipsel()
201 cfg |= PSC_SPICFG_SET_LEN(spi->bits_per_word); in au1550_spi_chipsel()
203 cfg = PSC_SPICFG_CLR_BAUD(cfg); in au1550_spi_chipsel()
204 cfg &= ~PSC_SPICFG_SET_DIV(3); in au1550_spi_chipsel()
205 cfg |= au1550_spi_baudcfg(hw, spi->max_speed_hz); in au1550_spi_chipsel()
207 hw->regs->psc_spicfg = cfg | PSC_SPICFG_DE_ENABLE; in au1550_spi_chipsel()
225 u32 cfg, stat; in au1550_spi_setupxfer() local
240 cfg = hw->regs->psc_spicfg; in au1550_spi_setupxfer()
242 hw->regs->psc_spicfg = cfg & ~PSC_SPICFG_DE_ENABLE; in au1550_spi_setupxfer()
246 cfg &= ~PSC_SPICFG_DD_DISABLE; in au1550_spi_setupxfer()
248 cfg |= PSC_SPICFG_DD_DISABLE; in au1550_spi_setupxfer()
249 cfg = PSC_SPICFG_CLR_LEN(cfg); in au1550_spi_setupxfer()
250 cfg |= PSC_SPICFG_SET_LEN(bpw); in au1550_spi_setupxfer()
252 cfg = PSC_SPICFG_CLR_BAUD(cfg); in au1550_spi_setupxfer()
253 cfg &= ~PSC_SPICFG_SET_DIV(3); in au1550_spi_setupxfer()
254 cfg |= au1550_spi_baudcfg(hw, hz); in au1550_spi_setupxfer()
256 hw->regs->psc_spicfg = cfg; in au1550_spi_setupxfer()
259 if (cfg & PSC_SPICFG_DE_ENABLE) { in au1550_spi_setupxfer()
675 u32 stat, cfg; in au1550_spi_setup_psc_as_spi() local
695 cfg = hw->usedma ? 0 : PSC_SPICFG_DD_DISABLE; in au1550_spi_setup_psc_as_spi()
696 cfg |= PSC_SPICFG_SET_LEN(8); in au1550_spi_setup_psc_as_spi()
697 cfg |= PSC_SPICFG_RT_FIFO8 | PSC_SPICFG_TT_FIFO8; in au1550_spi_setup_psc_as_spi()
699 cfg |= PSC_SPICFG_SET_BAUD(4) | PSC_SPICFG_SET_DIV(0); in au1550_spi_setup_psc_as_spi()
702 cfg |= PSC_SPICFG_LB; in au1550_spi_setup_psc_as_spi()
705 hw->regs->psc_spicfg = cfg; in au1550_spi_setup_psc_as_spi()