linux/drivers/net/ethernet/qualcomm/qca_spi.c

// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
/*
 *   Copyright (c) 2011, 2012, Qualcomm Atheros Communications Inc.
 *   Copyright (c) 2014, I2SE GmbH
 */

/*   This module implements the Qualcomm Atheros SPI protocol for
 *   kernel-based SPI device; it is essentially an Ethernet-to-SPI
 *   serial converter;
 */

#include <linux/errno.h>
#include <linux/etherdevice.h>
#include <linux/if_arp.h>
#include <linux/if_ether.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/jiffies.h>
#include <linux/kernel.h>
#include <linux/kthread.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/netdevice.h>
#include <linux/of.h>
#include <linux/of_net.h>
#include <linux/sched.h>
#include <linux/skbuff.h>
#include <linux/spi/spi.h>
#include <linux/types.h>

#include "qca_7k.h"
#include "qca_7k_common.h"
#include "qca_debug.h"
#include "qca_spi.h"

#define MAX_DMA_BURST_LEN

#define SPI_INTR

/*   Modules parameters     */
#define QCASPI_CLK_SPEED_MIN
#define QCASPI_CLK_SPEED_MAX
#define QCASPI_CLK_SPEED
static int qcaspi_clkspeed;
module_param(qcaspi_clkspeed, int, 0);
MODULE_PARM_DESC();

#define QCASPI_BURST_LEN_MIN
#define QCASPI_BURST_LEN_MAX
static int qcaspi_burst_len =;
module_param(qcaspi_burst_len, int, 0);
MODULE_PARM_DESC();

#define QCASPI_PLUGGABLE_MIN
#define QCASPI_PLUGGABLE_MAX
static int qcaspi_pluggable =;
module_param(qcaspi_pluggable, int, 0);
MODULE_PARM_DESC();

#define QCASPI_WRITE_VERIFY_MIN
#define QCASPI_WRITE_VERIFY_MAX
static int wr_verify =;
module_param(wr_verify, int, 0);
MODULE_PARM_DESC();

#define QCASPI_TX_TIMEOUT
#define QCASPI_QCA7K_REBOOT_TIME_MS

static void
start_spi_intr_handling(struct qcaspi *qca, u16 *intr_cause)
{}

static void
end_spi_intr_handling(struct qcaspi *qca, u16 intr_cause)
{}

static u32
qcaspi_write_burst(struct qcaspi *qca, u8 *src, u32 len)
{}

static u32
qcaspi_write_legacy(struct qcaspi *qca, u8 *src, u32 len)
{}

static u32
qcaspi_read_burst(struct qcaspi *qca, u8 *dst, u32 len)
{}

static u32
qcaspi_read_legacy(struct qcaspi *qca, u8 *dst, u32 len)
{}

static int
qcaspi_tx_cmd(struct qcaspi *qca, u16 cmd)
{}

static int
qcaspi_tx_frame(struct qcaspi *qca, struct sk_buff *skb)
{}

static int
qcaspi_transmit(struct qcaspi *qca)
{}

static int
qcaspi_receive(struct qcaspi *qca)
{}

/*   Check that tx ring stores only so much bytes
 *   that fit into the internal QCA buffer.
 */

static int
qcaspi_tx_ring_has_space(struct tx_ring *txr)
{}

/*   Flush the tx ring. This function is only safe to
 *   call from the qcaspi_spi_thread.
 */

static void
qcaspi_flush_tx_ring(struct qcaspi *qca)
{}

static void
qcaspi_qca7k_sync(struct qcaspi *qca, int event)
{}

static int
qcaspi_spi_thread(void *data)
{}

static irqreturn_t
qcaspi_intr_handler(int irq, void *data)
{}

static int
qcaspi_netdev_open(struct net_device *dev)
{}

static int
qcaspi_netdev_close(struct net_device *dev)
{}

static netdev_tx_t
qcaspi_netdev_xmit(struct sk_buff *skb, struct net_device *dev)
{}

static void
qcaspi_netdev_tx_timeout(struct net_device *dev, unsigned int txqueue)
{}

static int
qcaspi_netdev_init(struct net_device *dev)
{}

static void
qcaspi_netdev_uninit(struct net_device *dev)
{}

static const struct net_device_ops qcaspi_netdev_ops =;

static void
qcaspi_netdev_setup(struct net_device *dev)
{}

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

static int
qca_spi_probe(struct spi_device *spi)
{}

static void
qca_spi_remove(struct spi_device *spi)
{}

static const struct spi_device_id qca_spi_id[] =;
MODULE_DEVICE_TABLE(spi, qca_spi_id);

static struct spi_driver qca_spi_driver =;
module_spi_driver();

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