spi-fsl-cpm.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Freescale SPI controller driver cpm functions.
  4. *
  5. * Maintainer: Kumar Gala
  6. *
  7. * Copyright (C) 2006 Polycom, Inc.
  8. * Copyright 2010 Freescale Semiconductor, Inc.
  9. *
  10. * CPM SPI and QE buffer descriptors mode support:
  11. * Copyright (c) 2009 MontaVista Software, Inc.
  12. * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
  13. */
  14. #ifndef __SPI_FSL_CPM_H__
  15. #define __SPI_FSL_CPM_H__
  16. #include "spi-fsl-lib.h"
  17. #ifdef CONFIG_FSL_SOC
  18. extern void fsl_spi_cpm_reinit_txrx(struct mpc8xxx_spi *mspi);
  19. extern int fsl_spi_cpm_bufs(struct mpc8xxx_spi *mspi,
  20. struct spi_transfer *t, bool is_dma_mapped);
  21. extern void fsl_spi_cpm_bufs_complete(struct mpc8xxx_spi *mspi);
  22. extern void fsl_spi_cpm_irq(struct mpc8xxx_spi *mspi, u32 events);
  23. extern int fsl_spi_cpm_init(struct mpc8xxx_spi *mspi);
  24. extern void fsl_spi_cpm_free(struct mpc8xxx_spi *mspi);
  25. #else
  26. static inline void fsl_spi_cpm_reinit_txrx(struct mpc8xxx_spi *mspi) { }
  27. static inline int fsl_spi_cpm_bufs(struct mpc8xxx_spi *mspi,
  28. struct spi_transfer *t,
  29. bool is_dma_mapped) { return 0; }
  30. static inline void fsl_spi_cpm_bufs_complete(struct mpc8xxx_spi *mspi) { }
  31. static inline void fsl_spi_cpm_irq(struct mpc8xxx_spi *mspi, u32 events) { }
  32. static inline int fsl_spi_cpm_init(struct mpc8xxx_spi *mspi) { return 0; }
  33. static inline void fsl_spi_cpm_free(struct mpc8xxx_spi *mspi) { }
  34. #endif
  35. #endif /* __SPI_FSL_CPM_H__ */