Lines Matching refs:dws
87 int (*dma_init)(struct dw_spi *dws);
88 void (*dma_exit)(struct dw_spi *dws);
89 int (*dma_transfer)(struct dw_spi *dws, int cs_change);
139 irqreturn_t (*transfer_handler)(struct dw_spi *dws);
162 static inline u32 dw_readl(struct dw_spi *dws, u32 offset) in dw_readl() argument
164 return __raw_readl(dws->regs + offset); in dw_readl()
167 static inline void dw_writel(struct dw_spi *dws, u32 offset, u32 val) in dw_writel() argument
169 __raw_writel(val, dws->regs + offset); in dw_writel()
172 static inline u16 dw_readw(struct dw_spi *dws, u32 offset) in dw_readw() argument
174 return __raw_readw(dws->regs + offset); in dw_readw()
177 static inline void dw_writew(struct dw_spi *dws, u32 offset, u16 val) in dw_writew() argument
179 __raw_writew(val, dws->regs + offset); in dw_writew()
182 static inline void spi_enable_chip(struct dw_spi *dws, int enable) in spi_enable_chip() argument
184 dw_writel(dws, DW_SPI_SSIENR, (enable ? 1 : 0)); in spi_enable_chip()
187 static inline void spi_set_clk(struct dw_spi *dws, u16 div) in spi_set_clk() argument
189 dw_writel(dws, DW_SPI_BAUDR, div); in spi_set_clk()
192 static inline void spi_chip_sel(struct dw_spi *dws, u16 cs) in spi_chip_sel() argument
194 if (cs > dws->num_cs) in spi_chip_sel()
197 if (dws->cs_control) in spi_chip_sel()
198 dws->cs_control(1); in spi_chip_sel()
200 dw_writel(dws, DW_SPI_SER, 1 << cs); in spi_chip_sel()
204 static inline void spi_mask_intr(struct dw_spi *dws, u32 mask) in spi_mask_intr() argument
208 new_mask = dw_readl(dws, DW_SPI_IMR) & ~mask; in spi_mask_intr()
209 dw_writel(dws, DW_SPI_IMR, new_mask); in spi_mask_intr()
213 static inline void spi_umask_intr(struct dw_spi *dws, u32 mask) in spi_umask_intr() argument
217 new_mask = dw_readl(dws, DW_SPI_IMR) | mask; in spi_umask_intr()
218 dw_writel(dws, DW_SPI_IMR, new_mask); in spi_umask_intr()
234 extern int dw_spi_add_host(struct dw_spi *dws);
235 extern void dw_spi_remove_host(struct dw_spi *dws);
236 extern int dw_spi_suspend_host(struct dw_spi *dws);
237 extern int dw_spi_resume_host(struct dw_spi *dws);
238 extern void dw_spi_xfer_done(struct dw_spi *dws);
241 extern int dw_spi_mid_init(struct dw_spi *dws); /* Intel MID platforms */