1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
3 * Copyright (c) 2011, 2012, Qualcomm Atheros Communications Inc.
4 * Copyright (c) 2014, I2SE GmbH
7 /* Qualcomm Atheros SPI register definition.
9 * This module is designed to define the Qualcomm Atheros SPI register
16 #include <linux/netdevice.h>
17 #include <linux/sched.h>
18 #include <linux/skbuff.h>
19 #include <linux/spi/spi.h>
20 #include <linux/types.h>
22 #include "qca_7k_common.h"
24 #define QCASPI_DRV_VERSION "0.2.7-i"
25 #define QCASPI_DRV_NAME "qcaspi"
27 #define QCASPI_GOOD_SIGNATURE 0xAA55
29 #define QCASPI_TX_RING_MAX_LEN 10
30 #define QCASPI_TX_RING_MIN_LEN 2
31 #define QCASPI_RX_MAX_FRAMES 4
33 /* sync related constants */
34 #define QCASPI_SYNC_UNKNOWN 0
35 #define QCASPI_SYNC_RESET 1
36 #define QCASPI_SYNC_READY 2
38 #define QCASPI_RESET_TIMEOUT 10
41 #define QCASPI_EVENT_UPDATE 0
42 #define QCASPI_EVENT_CPUON 1
45 struct sk_buff *skb[QCASPI_TX_RING_MAX_LEN];
64 u64 write_verify_failed;
70 struct net_device *net_dev;
71 struct spi_device *spi_dev;
72 struct task_struct *spi_thread;
75 struct qcaspi_stats stats;
81 struct qcafrm_handle frm_handle;
82 struct sk_buff *rx_skb;
84 unsigned int intr_req;
85 unsigned int intr_svc;
88 #ifdef CONFIG_DEBUG_FS
89 struct dentry *device_root;
92 /* user configurable options */
98 #endif /* _QCA_SPI_H */