Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * Freescale SPI controller driver cpm functions.
0004  *
0005  * Maintainer: Kumar Gala
0006  *
0007  * Copyright (C) 2006 Polycom, Inc.
0008  * Copyright 2010 Freescale Semiconductor, Inc.
0009  *
0010  * CPM SPI and QE buffer descriptors mode support:
0011  * Copyright (c) 2009  MontaVista Software, Inc.
0012  * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
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 /* __SPI_FSL_CPM_H__ */