linux/drivers/spi/spi-orion.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Marvell Orion SPI controller driver
 *
 * Author: Shadi Ammouri <[email protected]>
 * Copyright (C) 2007-2008 Marvell Ltd.
 */

#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/spi/spi.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/clk.h>
#include <linux/sizes.h>
#include <asm/unaligned.h>

#define DRIVER_NAME

/* Runtime PM autosuspend timeout: PM is fairly light on this driver */
#define SPI_AUTOSUSPEND_TIMEOUT

/* Some SoCs using this driver support up to 8 chip selects.
 * It is up to the implementer to only use the chip selects
 * that are available.
 */
#define ORION_NUM_CHIPSELECTS

#define ORION_SPI_WAIT_RDY_MAX_LOOP

#define ORION_SPI_IF_CTRL_REG
#define ORION_SPI_IF_CONFIG_REG
#define ORION_SPI_IF_RXLSBF
#define ORION_SPI_IF_TXLSBF
#define ORION_SPI_DATA_OUT_REG
#define ORION_SPI_DATA_IN_REG
#define ORION_SPI_INT_CAUSE_REG
#define ORION_SPI_TIMING_PARAMS_REG

/* Register for the "Direct Mode" */
#define SPI_DIRECT_WRITE_CONFIG_REG

#define ORION_SPI_TMISO_SAMPLE_MASK
#define ORION_SPI_TMISO_SAMPLE_1
#define ORION_SPI_TMISO_SAMPLE_2

#define ORION_SPI_MODE_CPOL
#define ORION_SPI_MODE_CPHA
#define ORION_SPI_IF_8_16_BIT_MODE
#define ORION_SPI_CLK_PRESCALE_MASK
#define ARMADA_SPI_CLK_PRESCALE_MASK
#define ORION_SPI_MODE_MASK
#define ORION_SPI_CS_MASK
#define ORION_SPI_CS_SHIFT
#define ORION_SPI_CS(cs)

enum orion_spi_type {};

struct orion_spi_dev {};

struct orion_direct_acc {};

struct orion_child_options {};

struct orion_spi {};

#ifdef CONFIG_PM
static int orion_spi_runtime_suspend(struct device *dev);
static int orion_spi_runtime_resume(struct device *dev);
#endif

static inline void __iomem *spi_reg(struct orion_spi *orion_spi, u32 reg)
{}

static inline void
orion_spi_setbits(struct orion_spi *orion_spi, u32 reg, u32 mask)
{}

static inline void
orion_spi_clrbits(struct orion_spi *orion_spi, u32 reg, u32 mask)
{}

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

static void
orion_spi_mode_set(struct spi_device *spi)
{}

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

/*
 * called only when no transfer is active on the bus
 */
static int
orion_spi_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
{}

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

static inline int orion_spi_wait_till_ready(struct orion_spi *orion_spi)
{}

static inline int
orion_spi_write_read_8bit(struct spi_device *spi,
			  const u8 **tx_buf, u8 **rx_buf)
{}

static inline int
orion_spi_write_read_16bit(struct spi_device *spi,
			   const u16 **tx_buf, u16 **rx_buf)
{}

static unsigned int
orion_spi_write_read(struct spi_device *spi, struct spi_transfer *xfer)
{}

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

static int orion_spi_setup(struct spi_device *spi)
{}

static int orion_spi_reset(struct orion_spi *orion_spi)
{}

static const struct orion_spi_dev orion_spi_dev_data =;

static const struct orion_spi_dev armada_370_spi_dev_data =;

static const struct orion_spi_dev armada_xp_spi_dev_data =;

static const struct orion_spi_dev armada_375_spi_dev_data =;

static const struct orion_spi_dev armada_380_spi_dev_data =;

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

static int orion_spi_probe(struct platform_device *pdev)
{}


static void orion_spi_remove(struct platform_device *pdev)
{}

MODULE_ALIAS();

#ifdef CONFIG_PM
static int orion_spi_runtime_suspend(struct device *dev)
{}

static int orion_spi_runtime_resume(struct device *dev)
{}
#endif

static const struct dev_pm_ops orion_spi_pm_ops =;

static struct platform_driver orion_spi_driver =;

module_platform_driver();

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