#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/uaccess.h>
#include <linux/fpga-dfl.h>
#include "dfl-afu.h"
#define RST_POLL_INVL …
#define RST_POLL_TIMEOUT …
int __afu_port_enable(struct platform_device *pdev)
{ … }
int __afu_port_disable(struct platform_device *pdev)
{ … }
static int __port_reset(struct platform_device *pdev)
{ … }
static int port_reset(struct platform_device *pdev)
{ … }
static int port_get_id(struct platform_device *pdev)
{ … }
static ssize_t
id_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(id);
static ssize_t
ltr_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static ssize_t
ltr_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_RW(ltr);
static ssize_t
ap1_event_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static ssize_t
ap1_event_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_RW(ap1_event);
static ssize_t
ap2_event_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t
ap2_event_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_RW(ap2_event);
static ssize_t
power_state_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(power_state);
static ssize_t
userclk_freqcmd_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_WO(userclk_freqcmd);
static ssize_t
userclk_freqcntrcmd_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_WO(userclk_freqcntrcmd);
static ssize_t
userclk_freqsts_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(userclk_freqsts);
static ssize_t
userclk_freqcntrsts_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(userclk_freqcntrsts);
static struct attribute *port_hdr_attrs[] = …;
static umode_t port_hdr_attrs_visible(struct kobject *kobj,
struct attribute *attr, int n)
{ … }
static const struct attribute_group port_hdr_group = …;
static int port_hdr_init(struct platform_device *pdev,
struct dfl_feature *feature)
{ … }
static long
port_hdr_ioctl(struct platform_device *pdev, struct dfl_feature *feature,
unsigned int cmd, unsigned long arg)
{ … }
static const struct dfl_feature_id port_hdr_id_table[] = …;
static const struct dfl_feature_ops port_hdr_ops = …;
static ssize_t
afu_id_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(afu_id);
static struct attribute *port_afu_attrs[] = …;
static umode_t port_afu_attrs_visible(struct kobject *kobj,
struct attribute *attr, int n)
{ … }
static const struct attribute_group port_afu_group = …;
static int port_afu_init(struct platform_device *pdev,
struct dfl_feature *feature)
{ … }
static const struct dfl_feature_id port_afu_id_table[] = …;
static const struct dfl_feature_ops port_afu_ops = …;
static int port_stp_init(struct platform_device *pdev,
struct dfl_feature *feature)
{ … }
static const struct dfl_feature_id port_stp_id_table[] = …;
static const struct dfl_feature_ops port_stp_ops = …;
static long
port_uint_ioctl(struct platform_device *pdev, struct dfl_feature *feature,
unsigned int cmd, unsigned long arg)
{ … }
static const struct dfl_feature_id port_uint_id_table[] = …;
static const struct dfl_feature_ops port_uint_ops = …;
static struct dfl_feature_driver port_feature_drvs[] = …;
static int afu_open(struct inode *inode, struct file *filp)
{ … }
static int afu_release(struct inode *inode, struct file *filp)
{ … }
static long afu_ioctl_check_extension(struct dfl_feature_platform_data *pdata,
unsigned long arg)
{ … }
static long
afu_ioctl_get_info(struct dfl_feature_platform_data *pdata, void __user *arg)
{ … }
static long afu_ioctl_get_region_info(struct dfl_feature_platform_data *pdata,
void __user *arg)
{ … }
static long
afu_ioctl_dma_map(struct dfl_feature_platform_data *pdata, void __user *arg)
{ … }
static long
afu_ioctl_dma_unmap(struct dfl_feature_platform_data *pdata, void __user *arg)
{ … }
static long afu_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{ … }
static const struct vm_operations_struct afu_vma_ops = …;
static int afu_mmap(struct file *filp, struct vm_area_struct *vma)
{ … }
static const struct file_operations afu_fops = …;
static int afu_dev_init(struct platform_device *pdev)
{ … }
static int afu_dev_destroy(struct platform_device *pdev)
{ … }
static int port_enable_set(struct platform_device *pdev, bool enable)
{ … }
static struct dfl_fpga_port_ops afu_port_ops = …;
static int afu_probe(struct platform_device *pdev)
{ … }
static void afu_remove(struct platform_device *pdev)
{ … }
static const struct attribute_group *afu_dev_groups[] = …;
static struct platform_driver afu_driver = …;
static int __init afu_init(void)
{ … }
static void __exit afu_exit(void)
{ … }
module_init(…) …;
module_exit(afu_exit);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;