linux/drivers/spi/spi-uniphier.c

// SPDX-License-Identifier: GPL-2.0
// spi-uniphier.c - Socionext UniPhier SPI controller driver
// Copyright 2012      Panasonic Corporation
// Copyright 2016-2018 Socionext Inc.

#include <linux/kernel.h>
#include <linux/bitfield.h>
#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/dmaengine.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/spi/spi.h>

#include <asm/unaligned.h>

#define SSI_TIMEOUT_MS
#define SSI_POLL_TIMEOUT_US
#define SSI_MAX_CLK_DIVIDER
#define SSI_MIN_CLK_DIVIDER

struct uniphier_spi_priv {};

#define SSI_CTL
#define SSI_CTL_EN

#define SSI_CKS
#define SSI_CKS_CKRAT_MASK
#define SSI_CKS_CKPHS
#define SSI_CKS_CKINIT
#define SSI_CKS_CKDLY

#define SSI_TXWDS
#define SSI_TXWDS_WDLEN_MASK
#define SSI_TXWDS_TDTF_MASK
#define SSI_TXWDS_DTLEN_MASK

#define SSI_RXWDS
#define SSI_RXWDS_DTLEN_MASK

#define SSI_FPS
#define SSI_FPS_FSPOL
#define SSI_FPS_FSTRT

#define SSI_SR
#define SSI_SR_BUSY
#define SSI_SR_RNE

#define SSI_IE
#define SSI_IE_TCIE
#define SSI_IE_RCIE
#define SSI_IE_TXRE
#define SSI_IE_RXRE
#define SSI_IE_RORIE
#define SSI_IE_ALL_MASK

#define SSI_IS
#define SSI_IS_RXRS
#define SSI_IS_RCID
#define SSI_IS_RORID

#define SSI_IC
#define SSI_IC_TCIC
#define SSI_IC_RCIC
#define SSI_IC_RORIC

#define SSI_FC
#define SSI_FC_TXFFL
#define SSI_FC_TXFTH_MASK
#define SSI_FC_RXFFL
#define SSI_FC_RXFTH_MASK

#define SSI_TXDR
#define SSI_RXDR

#define SSI_FIFO_DEPTH
#define SSI_FIFO_BURST_NUM

#define SSI_DMA_RX_BUSY
#define SSI_DMA_TX_BUSY

static inline unsigned int bytes_per_word(unsigned int bits)
{}

static inline void uniphier_spi_irq_enable(struct uniphier_spi_priv *priv,
					   u32 mask)
{}

static inline void uniphier_spi_irq_disable(struct uniphier_spi_priv *priv,
					    u32 mask)
{}

static void uniphier_spi_set_mode(struct spi_device *spi)
{}

static void uniphier_spi_set_transfer_size(struct spi_device *spi, int size)
{}

static void uniphier_spi_set_baudrate(struct spi_device *spi,
				      unsigned int speed)
{}

static void uniphier_spi_setup_transfer(struct spi_device *spi,
				       struct spi_transfer *t)
{}

static void uniphier_spi_send(struct uniphier_spi_priv *priv)
{}

static void uniphier_spi_recv(struct uniphier_spi_priv *priv)
{}

static void uniphier_spi_set_fifo_threshold(struct uniphier_spi_priv *priv,
					    unsigned int threshold)
{}

static void uniphier_spi_fill_tx_fifo(struct uniphier_spi_priv *priv)
{}

static void uniphier_spi_set_cs(struct spi_device *spi, bool enable)
{}

static bool uniphier_spi_can_dma(struct spi_controller *host,
				 struct spi_device *spi,
				 struct spi_transfer *t)
{}

static void uniphier_spi_dma_rxcb(void *data)
{}

static void uniphier_spi_dma_txcb(void *data)
{}

static int uniphier_spi_transfer_one_dma(struct spi_controller *host,
					 struct spi_device *spi,
					 struct spi_transfer *t)
{}

static int uniphier_spi_transfer_one_irq(struct spi_controller *host,
					 struct spi_device *spi,
					 struct spi_transfer *t)
{}

static int uniphier_spi_transfer_one_poll(struct spi_controller *host,
					  struct spi_device *spi,
					  struct spi_transfer *t)
{}

static int uniphier_spi_transfer_one(struct spi_controller *host,
				     struct spi_device *spi,
				     struct spi_transfer *t)
{}

static int uniphier_spi_prepare_transfer_hardware(struct spi_controller *host)
{}

static int uniphier_spi_unprepare_transfer_hardware(struct spi_controller *host)
{}

static void uniphier_spi_handle_err(struct spi_controller *host,
				    struct spi_message *msg)
{}

static irqreturn_t uniphier_spi_handler(int irq, void *dev_id)
{}

static int uniphier_spi_probe(struct platform_device *pdev)
{}

static void uniphier_spi_remove(struct platform_device *pdev)
{}

static const struct of_device_id uniphier_spi_match[] =;
MODULE_DEVICE_TABLE(of, uniphier_spi_match);

static struct platform_driver uniphier_spi_driver =;
module_platform_driver();

MODULE_AUTHOR();
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();