Blame view

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