linux/drivers/spi/spi-altera-dfl.c

// SPDX-License-Identifier: GPL-2.0
//
// DFL bus driver for Altera SPI Master
//
// Copyright (C) 2020 Intel Corporation, Inc.
//
// Authors:
//   Matthew Gerlach <[email protected]>
//

#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/stddef.h>
#include <linux/errno.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/bitfield.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include <linux/regmap.h>
#include <linux/spi/spi.h>
#include <linux/spi/altera.h>
#include <linux/dfl.h>

#define FME_FEATURE_ID_MAX10_SPI
#define FME_FEATURE_REV_MAX10_SPI_N5010

#define SPI_CORE_PARAMETER
#define SHIFT_MODE
#define SHIFT_MODE_MSB
#define SHIFT_MODE_LSB
#define DATA_WIDTH
#define NUM_CHIPSELECT
#define CLK_POLARITY
#define CLK_PHASE
#define PERIPHERAL_ID
#define SPI_CLK
#define SPI_INDIRECT_ACC_OFST

#define INDIRECT_ADDR
#define INDIRECT_WR
#define INDIRECT_RD
#define INDIRECT_RD_DATA
#define INDIRECT_DATA_MASK
#define INDIRECT_DEBUG
#define INDIRECT_WR_DATA
#define INDIRECT_TIMEOUT

static int indirect_bus_reg_read(void *context, unsigned int reg,
				 unsigned int *val)
{}

static int indirect_bus_reg_write(void *context, unsigned int reg,
				  unsigned int val)
{}

static const struct regmap_config indirect_regbus_cfg =;

static void config_spi_host(void __iomem *base, struct spi_controller *host)
{}

static int dfl_spi_altera_probe(struct dfl_device *dfl_dev)
{}

static const struct dfl_device_id dfl_spi_altera_ids[] =;

static struct dfl_driver dfl_spi_altera_driver =;

module_dfl_driver();

MODULE_DEVICE_TABLE(dfl, dfl_spi_altera_ids);
MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();