#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/wait.h>
#include <linux/mutex.h>
#include <linux/device.h>
#include <linux/cdev.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/moduleparam.h>
#include <linux/interrupt.h>
#include <linux/param.h>
#include <linux/fs.h>
#include <linux/types.h>
#include <linux/uaccess.h>
#include <linux/jiffies.h>
#include <linux/miscdevice.h>
#define DRIVER_NAME …
#define READ_BUF_SIZE …
#define WRITE_BUF_SIZE …
#define XLLF_ISR_OFFSET …
#define XLLF_IER_OFFSET …
#define XLLF_TDFR_OFFSET …
#define XLLF_TDFV_OFFSET …
#define XLLF_TDFD_OFFSET …
#define XLLF_TLR_OFFSET …
#define XLLF_RDFR_OFFSET …
#define XLLF_RDFO_OFFSET …
#define XLLF_RDFD_OFFSET …
#define XLLF_RLR_OFFSET …
#define XLLF_SRR_OFFSET …
#define XLLF_TDR_OFFSET …
#define XLLF_RDR_OFFSET …
#define XLLF_RDFR_RESET_MASK …
#define XLLF_TDFR_RESET_MASK …
#define XLLF_SRR_RESET_MASK …
#define XLLF_INT_RPURE_MASK …
#define XLLF_INT_RPORE_MASK …
#define XLLF_INT_RPUE_MASK …
#define XLLF_INT_TPOE_MASK …
#define XLLF_INT_TC_MASK …
#define XLLF_INT_RC_MASK …
#define XLLF_INT_TSE_MASK …
#define XLLF_INT_TRC_MASK …
#define XLLF_INT_RRC_MASK …
#define XLLF_INT_TFPF_MASK …
#define XLLF_INT_TFPE_MASK …
#define XLLF_INT_RFPF_MASK …
#define XLLF_INT_RFPE_MASK …
#define XLLF_INT_ALL_MASK …
#define XLLF_INT_ERROR_MASK …
#define XLLF_INT_RXERROR_MASK …
#define XLLF_INT_TXERROR_MASK …
static long read_timeout = …;
static long write_timeout = …;
module_param(read_timeout, long, 0444);
MODULE_PARM_DESC(…) …;
module_param(write_timeout, long, 0444);
MODULE_PARM_DESC(…) …;
struct axis_fifo { … };
static ssize_t sysfs_write(struct device *dev, const char *buf,
size_t count, unsigned int addr_offset)
{ … }
static ssize_t sysfs_read(struct device *dev, char *buf,
unsigned int addr_offset)
{ … }
static ssize_t isr_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static ssize_t isr_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RW(isr);
static ssize_t ier_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static ssize_t ier_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RW(ier);
static ssize_t tdfr_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_WO(tdfr);
static ssize_t tdfv_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(tdfv);
static ssize_t tdfd_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_WO(tdfd);
static ssize_t tlr_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_WO(tlr);
static ssize_t rdfr_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_WO(rdfr);
static ssize_t rdfo_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(rdfo);
static ssize_t rdfd_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(rdfd);
static ssize_t rlr_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(rlr);
static ssize_t srr_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_WO(srr);
static ssize_t tdr_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_WO(tdr);
static ssize_t rdr_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(rdr);
static struct attribute *axis_fifo_attrs[] = …;
static const struct attribute_group axis_fifo_attrs_group = …;
static const struct attribute_group *axis_fifo_attrs_groups[] = …;
static void reset_ip_core(struct axis_fifo *fifo)
{ … }
static ssize_t axis_fifo_read(struct file *f, char __user *buf,
size_t len, loff_t *off)
{ … }
static ssize_t axis_fifo_write(struct file *f, const char __user *buf,
size_t len, loff_t *off)
{ … }
static irqreturn_t axis_fifo_irq(int irq, void *dw)
{ … }
static int axis_fifo_open(struct inode *inod, struct file *f)
{ … }
static int axis_fifo_close(struct inode *inod, struct file *f)
{ … }
static const struct file_operations fops = …;
static int get_dts_property(struct axis_fifo *fifo,
char *name, unsigned int *var)
{ … }
static int axis_fifo_parse_dt(struct axis_fifo *fifo)
{ … }
static int axis_fifo_probe(struct platform_device *pdev)
{ … }
static void axis_fifo_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id axis_fifo_of_match[] = …;
MODULE_DEVICE_TABLE(of, axis_fifo_of_match);
static struct platform_driver axis_fifo_driver = …;
static int __init axis_fifo_init(void)
{ … }
module_init(…) …;
static void __exit axis_fifo_exit(void)
{ … }
module_exit(axis_fifo_exit);
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;