blob: 160f999708b691b9e9ff4ad03787c8486f4a9374 [file] [log] [blame]
Thomas Gleixner2874c5f2019-05-27 08:55:01 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Andreas Larssone8beacb2013-02-15 16:52:21 +01002/*
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>
Andreas Larssone8beacb2013-02-15 16:52:21 +010013 */
14
15#ifndef __SPI_FSL_CPM_H__
16#define __SPI_FSL_CPM_H__
17
18#include "spi-fsl-lib.h"
19
20#ifdef CONFIG_FSL_SOC
21extern void fsl_spi_cpm_reinit_txrx(struct mpc8xxx_spi *mspi);
22extern int fsl_spi_cpm_bufs(struct mpc8xxx_spi *mspi,
23 struct spi_transfer *t, bool is_dma_mapped);
24extern void fsl_spi_cpm_bufs_complete(struct mpc8xxx_spi *mspi);
25extern void fsl_spi_cpm_irq(struct mpc8xxx_spi *mspi, u32 events);
26extern int fsl_spi_cpm_init(struct mpc8xxx_spi *mspi);
27extern void fsl_spi_cpm_free(struct mpc8xxx_spi *mspi);
28#else
29static inline void fsl_spi_cpm_reinit_txrx(struct mpc8xxx_spi *mspi) { }
30static inline int fsl_spi_cpm_bufs(struct mpc8xxx_spi *mspi,
31 struct spi_transfer *t,
32 bool is_dma_mapped) { return 0; }
33static inline void fsl_spi_cpm_bufs_complete(struct mpc8xxx_spi *mspi) { }
34static inline void fsl_spi_cpm_irq(struct mpc8xxx_spi *mspi, u32 events) { }
35static inline int fsl_spi_cpm_init(struct mpc8xxx_spi *mspi) { return 0; }
36static inline void fsl_spi_cpm_free(struct mpc8xxx_spi *mspi) { }
37#endif
38
39#endif /* __SPI_FSL_CPM_H__ */