Lines Matching refs:lslave
63 struct lpc32xx_spi_slave *lslave; in spi_setup_slave() local
82 lslave = spi_alloc_slave(struct lpc32xx_spi_slave, bus, cs); in spi_setup_slave()
83 if (!lslave) { in spi_setup_slave()
88 lslave->regs = (struct ssp_regs *)SSP0_BASE; in spi_setup_slave()
95 writel(0x7, &lslave->regs->cr0); /* 8-bit chunks, SPI, 1 clk/bit */ in spi_setup_slave()
96 writel(26, &lslave->regs->cpsr); /* SSP clock = HCLK/26 = 500kbps */ in spi_setup_slave()
97 writel(0, &lslave->regs->imsc); /* do not raise any interrupts */ in spi_setup_slave()
98 writel(0, &lslave->regs->icr); /* clear any pending interrupt */ in spi_setup_slave()
99 writel(0, &lslave->regs->dmacr); /* do not do DMAs */ in spi_setup_slave()
100 writel(SSP_CR1_SSP_ENABLE, &lslave->regs->cr1); /* enable SSP0 */ in spi_setup_slave()
101 return &lslave->slave; in spi_setup_slave()
106 struct lpc32xx_spi_slave *lslave = to_lpc32xx_spi_slave(slave); in spi_free_slave() local
108 debug("(lpc32xx) spi_free_slave: 0x%08x\n", (u32)lslave); in spi_free_slave()
109 free(lslave); in spi_free_slave()
121 struct lpc32xx_spi_slave *lslave = to_lpc32xx_spi_slave(slave); in spi_xfer() local
129 int status = readl(&lslave->regs->sr); in spi_xfer()
131 writel(((u8 *)dout)[idx_out++], &lslave->regs->data); in spi_xfer()
133 ((u8 *)din)[idx_in++] = readl(&lslave->regs->data); in spi_xfer()