0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef __SPI_FSL_CPM_H__
0016 #define __SPI_FSL_CPM_H__
0017
0018 #include "spi-fsl-lib.h"
0019
0020 #ifdef CONFIG_FSL_SOC
0021 extern void fsl_spi_cpm_reinit_txrx(struct mpc8xxx_spi *mspi);
0022 extern int fsl_spi_cpm_bufs(struct mpc8xxx_spi *mspi,
0023 struct spi_transfer *t, bool is_dma_mapped);
0024 extern void fsl_spi_cpm_bufs_complete(struct mpc8xxx_spi *mspi);
0025 extern void fsl_spi_cpm_irq(struct mpc8xxx_spi *mspi, u32 events);
0026 extern int fsl_spi_cpm_init(struct mpc8xxx_spi *mspi);
0027 extern void fsl_spi_cpm_free(struct mpc8xxx_spi *mspi);
0028 #else
0029 static inline void fsl_spi_cpm_reinit_txrx(struct mpc8xxx_spi *mspi) { }
0030 static inline int fsl_spi_cpm_bufs(struct mpc8xxx_spi *mspi,
0031 struct spi_transfer *t,
0032 bool is_dma_mapped) { return 0; }
0033 static inline void fsl_spi_cpm_bufs_complete(struct mpc8xxx_spi *mspi) { }
0034 static inline void fsl_spi_cpm_irq(struct mpc8xxx_spi *mspi, u32 events) { }
0035 static inline int fsl_spi_cpm_init(struct mpc8xxx_spi *mspi) { return 0; }
0036 static inline void fsl_spi_cpm_free(struct mpc8xxx_spi *mspi) { }
0037 #endif
0038
0039 #endif