OPAE Intel FPGA Linux Device Driver Architecture Guide

ID 683857
Date 10/02/2017
Public
Document Table of Contents

1.1.9.1. FME Platform Device Data Structures


struct feature_ops { 
	int (*init)(struct platform_device *pdev, struct feature *feature); 
	int (*uinit)(struct platform_device *pdev, struct feature *feature); 
	long (*ioctl)(struct platform_device *pdev, struct feature *feature, 
				unsigned int cmd, unsigned long arg); 
	int (*test)(struct platform_device *pdev, struct feature *feature); 
};

struct feature { 
	const char *name; 
	int resource_index; 
	void __iomem *ioaddr; 
	struct feature_ops *ops; 
};

struct feature_platform_data { 
	struct list_head node; 
	struct mutex lock; 
	unsigned long dev_status; 
	struct cdev cdev; 
	struct platform_device *dev; 
	unsigned int disable_count; 
	void *private; 
	int num; 
	int (*config_port)(struct platform_device *, u32, bool); 
	struct platform_device *(*fpga_for_each_port)(struct platform_device *,
				void *, int (*match)(struct platform_device *, void *)); struct feature features[0]; 
};

struct perf_object { 
	int id; 
	const struct attribute_group **attr_groups; 
	struct device *fme_dev; 
	struct list_head node; 
	struct list_head children; 
	struct kobject kobj; 
};

struct fpga_fme { 
	u8 port_id; 
	u64 pr_err; 
	struct device *dev_err; 
	struct perf_object *perf_dev; 
	struct feature_platform_data *pdata; 
};