0001
0002
0003
0004
0005 #ifndef __LINUX_SPI_PXA2XX_SPI_H
0006 #define __LINUX_SPI_PXA2XX_SPI_H
0007
0008 #include <linux/types.h>
0009
0010 #include <linux/pxa2xx_ssp.h>
0011
0012 struct dma_chan;
0013
0014
0015
0016
0017
0018 struct pxa2xx_spi_controller {
0019 u16 num_chipselect;
0020 u8 enable_dma;
0021 u8 dma_burst_size;
0022 bool is_slave;
0023
0024
0025 bool (*dma_filter)(struct dma_chan *chan, void *param);
0026 void *tx_param;
0027 void *rx_param;
0028
0029
0030 struct ssp_device ssp;
0031 };
0032
0033
0034
0035
0036
0037
0038
0039 struct pxa2xx_spi_chip {
0040 u8 tx_threshold;
0041 u8 tx_hi_threshold;
0042 u8 rx_threshold;
0043 u8 dma_burst_size;
0044 u32 timeout;
0045 };
0046
0047 #if defined(CONFIG_ARCH_PXA) || defined(CONFIG_ARCH_MMP)
0048
0049 #include <linux/clk.h>
0050
0051 extern void pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_controller *info);
0052
0053 #endif
0054
0055 #endif