unsigned int vec_cnt)
{
struct ifpga_hw *hw = binfo->hw;
- struct feature *feature = NULL;
+ struct ifpga_feature *feature = NULL;
struct feature_irq_ctx *ctx = NULL;
int port_id, ret = 0;
unsigned int i;
fid = fid?fid:feature_id(start);
size = size?size:feature_size(start);
- feature = opae_malloc(sizeof(struct feature));
+ feature = opae_malloc(sizeof(struct ifpga_feature));
if (!feature)
return -ENOMEM;
struct opae_accelerator *acc;
struct ifpga_port_hw *port;
struct ifpga_fme_hw *fme;
- struct feature *feature;
+ struct ifpga_feature *feature;
if (!binfo->fiu)
return 0;
{
struct ifpga_fme_hw *fme = &hw->fme;
struct ifpga_port_hw *port;
- struct feature *feature;
+ struct ifpga_feature *feature;
int i;
dev_info(hw, "found fme_device, is in PF: %s\n",
static void feature_uinit(struct ifpga_feature_list *list)
{
- struct feature *feature;
+ struct ifpga_feature *feature;
TAILQ_FOREACH(feature, list, next) {
if (feature->state != IFPGA_FEATURE_ATTACHED)
static int feature_init(struct feature_driver *drv,
struct ifpga_feature_list *list)
{
- struct feature *feature;
+ struct ifpga_feature *feature;
int ret;
while (drv->ops) {
struct feature_driver {
u64 id;
const char *name;
- struct feature_ops *ops;
+ struct ifpga_feature_ops *ops;
};
/**
#define ifpga_for_each_port_feature(port, feature) \
TAILQ_FOREACH(feature, &port->feature_list, next)
-static inline struct feature *
+static inline struct ifpga_feature *
get_fme_feature_by_id(struct ifpga_fme_hw *fme, u64 id)
{
- struct feature *feature;
+ struct ifpga_feature *feature;
ifpga_for_each_fme_feature(fme, feature) {
if (feature->id == id)
return NULL;
}
-static inline struct feature *
+static inline struct ifpga_feature *
get_port_feature_by_id(struct ifpga_port_hw *port, u64 id)
{
- struct feature *feature;
+ struct ifpga_feature *feature;
ifpga_for_each_port_feature(port, feature) {
if (feature->id == id)
return NULL;
}
-static inline struct feature *
+static inline struct ifpga_feature *
get_feature_by_id(struct ifpga_feature_list *list, u64 id)
{
- struct feature *feature;
+ struct ifpga_feature *feature;
TAILQ_FOREACH(feature, list, next)
if (feature->id == id)
static inline void *
get_fme_feature_ioaddr_by_index(struct ifpga_fme_hw *fme, int index)
{
- struct feature *feature = get_feature_by_id(&fme->feature_list, index);
+ struct ifpga_feature *feature =
+ get_feature_by_id(&fme->feature_list, index);
return feature ? feature->addr : NULL;
}
static inline void *
get_port_feature_ioaddr_by_index(struct ifpga_port_hw *port, int index)
{
- struct feature *feature = get_feature_by_id(&port->feature_list, index);
+ struct ifpga_feature *feature =
+ get_feature_by_id(&port->feature_list, index);
return feature ? feature->addr : NULL;
}
void port_err_mask(struct ifpga_port_hw *port, bool mask);
int port_err_clear(struct ifpga_port_hw *port, u64 err);
-extern struct feature_ops fme_hdr_ops;
-extern struct feature_ops fme_thermal_mgmt_ops;
-extern struct feature_ops fme_power_mgmt_ops;
-extern struct feature_ops fme_global_err_ops;
-extern struct feature_ops fme_pr_mgmt_ops;
-extern struct feature_ops fme_global_iperf_ops;
-extern struct feature_ops fme_global_dperf_ops;
-extern struct feature_ops fme_hssi_eth_ops;
-extern struct feature_ops fme_emif_ops;
-extern struct feature_ops fme_spi_master_ops;
-extern struct feature_ops fme_i2c_master_ops;
-extern struct feature_ops fme_eth_group_ops;
-extern struct feature_ops fme_nios_spi_master_ops;
+extern struct ifpga_feature_ops fme_hdr_ops;
+extern struct ifpga_feature_ops fme_thermal_mgmt_ops;
+extern struct ifpga_feature_ops fme_power_mgmt_ops;
+extern struct ifpga_feature_ops fme_global_err_ops;
+extern struct ifpga_feature_ops fme_pr_mgmt_ops;
+extern struct ifpga_feature_ops fme_global_iperf_ops;
+extern struct ifpga_feature_ops fme_global_dperf_ops;
+extern struct ifpga_feature_ops fme_hssi_eth_ops;
+extern struct ifpga_feature_ops fme_emif_ops;
+extern struct ifpga_feature_ops fme_spi_master_ops;
+extern struct ifpga_feature_ops fme_i2c_master_ops;
+extern struct ifpga_feature_ops fme_eth_group_ops;
+extern struct ifpga_feature_ops fme_nios_spi_master_ops;
int port_get_prop(struct ifpga_port_hw *port, struct feature_prop *prop);
int port_set_prop(struct ifpga_port_hw *port, struct feature_prop *prop);
const char *get_fme_feature_name(unsigned int id);
const char *get_port_feature_name(unsigned int id);
-extern struct feature_ops ifpga_rawdev_port_hdr_ops;
-extern struct feature_ops ifpga_rawdev_port_error_ops;
-extern struct feature_ops ifpga_rawdev_port_stp_ops;
-extern struct feature_ops ifpga_rawdev_port_uint_ops;
-extern struct feature_ops ifpga_rawdev_port_afu_ops;
+extern struct ifpga_feature_ops ifpga_rawdev_port_hdr_ops;
+extern struct ifpga_feature_ops ifpga_rawdev_port_error_ops;
+extern struct ifpga_feature_ops ifpga_rawdev_port_stp_ops;
+extern struct ifpga_feature_ops ifpga_rawdev_port_uint_ops;
+extern struct ifpga_feature_ops ifpga_rawdev_port_afu_ops;
/* help functions for feature ops */
-int fpga_msix_set_block(struct feature *feature, unsigned int start,
+int fpga_msix_set_block(struct ifpga_feature *feature, unsigned int start,
unsigned int count, s32 *fds);
/* FME network function ops*/
int fme_get_prop(struct ifpga_fme_hw *fme, struct feature_prop *prop)
{
- struct feature *feature;
+ struct ifpga_feature *feature;
if (!fme)
return -ENOENT;
int fme_set_prop(struct ifpga_fme_hw *fme, struct feature_prop *prop)
{
- struct feature *feature;
+ struct ifpga_feature *feature;
if (!fme)
return -ENOENT;
int fme_set_irq(struct ifpga_fme_hw *fme, u32 feature_id, void *irq_set)
{
- struct feature *feature;
+ struct ifpga_feature *feature;
if (!fme)
return -ENOENT;
}
/* fme private feature head */
-static int fme_hdr_init(struct feature *feature)
+static int fme_hdr_init(struct ifpga_feature *feature)
{
struct feature_fme_header *fme_hdr;
return 0;
}
-static void fme_hdr_uinit(struct feature *feature)
+static void fme_hdr_uinit(struct ifpga_feature *feature)
{
UNUSED(feature);
}
static int
-fme_hdr_get_prop(struct feature *feature, struct feature_prop *prop)
+fme_hdr_get_prop(struct ifpga_feature *feature, struct feature_prop *prop)
{
struct ifpga_fme_hw *fme = feature->parent;
return -ENOENT;
}
-struct feature_ops fme_hdr_ops = {
+struct ifpga_feature_ops fme_hdr_ops = {
.init = fme_hdr_init,
.uinit = fme_hdr_uinit,
.get_prop = fme_hdr_get_prop,
#define FME_THERMAL_CAP_NO_TMP_THRESHOLD 0x1
-static int fme_thermal_mgmt_init(struct feature *feature)
+static int fme_thermal_mgmt_init(struct ifpga_feature *feature)
{
struct feature_fme_thermal *fme_thermal;
struct feature_fme_tmp_threshold_cap thermal_cap;
return 0;
}
-static void fme_thermal_mgmt_uinit(struct feature *feature)
+static void fme_thermal_mgmt_uinit(struct ifpga_feature *feature)
{
UNUSED(feature);
}
static int
-fme_thermal_set_prop(struct feature *feature, struct feature_prop *prop)
+fme_thermal_set_prop(struct ifpga_feature *feature, struct feature_prop *prop)
{
struct ifpga_fme_hw *fme = feature->parent;
}
static int
-fme_thermal_get_prop(struct feature *feature, struct feature_prop *prop)
+fme_thermal_get_prop(struct ifpga_feature *feature, struct feature_prop *prop)
{
struct ifpga_fme_hw *fme = feature->parent;
return -ENOENT;
}
-struct feature_ops fme_thermal_mgmt_ops = {
+struct ifpga_feature_ops fme_thermal_mgmt_ops = {
.init = fme_thermal_mgmt_init,
.uinit = fme_thermal_mgmt_uinit,
.get_prop = fme_thermal_get_prop,
return 0;
}
-static int fme_power_mgmt_init(struct feature *feature)
+static int fme_power_mgmt_init(struct ifpga_feature *feature)
{
UNUSED(feature);
return 0;
}
-static void fme_power_mgmt_uinit(struct feature *feature)
+static void fme_power_mgmt_uinit(struct ifpga_feature *feature)
{
UNUSED(feature);
dev_info(NULL, "FME power mgmt UInit.\n");
}
-static int fme_power_mgmt_get_prop(struct feature *feature,
+static int fme_power_mgmt_get_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
struct ifpga_fme_hw *fme = feature->parent;
return -ENOENT;
}
-static int fme_power_mgmt_set_prop(struct feature *feature,
+static int fme_power_mgmt_set_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
struct ifpga_fme_hw *fme = feature->parent;
return -ENOENT;
}
-struct feature_ops fme_power_mgmt_ops = {
+struct ifpga_feature_ops fme_power_mgmt_ops = {
.init = fme_power_mgmt_init,
.uinit = fme_power_mgmt_uinit,
.get_prop = fme_power_mgmt_get_prop,
.set_prop = fme_power_mgmt_set_prop,
};
-static int fme_hssi_eth_init(struct feature *feature)
+static int fme_hssi_eth_init(struct ifpga_feature *feature)
{
UNUSED(feature);
return 0;
}
-static void fme_hssi_eth_uinit(struct feature *feature)
+static void fme_hssi_eth_uinit(struct ifpga_feature *feature)
{
UNUSED(feature);
}
-struct feature_ops fme_hssi_eth_ops = {
+struct ifpga_feature_ops fme_hssi_eth_ops = {
.init = fme_hssi_eth_init,
.uinit = fme_hssi_eth_uinit,
};
-static int fme_emif_init(struct feature *feature)
+static int fme_emif_init(struct ifpga_feature *feature)
{
UNUSED(feature);
return 0;
}
-static void fme_emif_uinit(struct feature *feature)
+static void fme_emif_uinit(struct ifpga_feature *feature)
{
UNUSED(feature);
}
-struct feature_ops fme_emif_ops = {
+struct ifpga_feature_ops fme_emif_ops = {
.init = fme_emif_init,
.uinit = fme_emif_uinit,
};
return 0;
}
-static int fme_spi_init(struct feature *feature)
+static int fme_spi_init(struct ifpga_feature *feature)
{
struct ifpga_fme_hw *fme = (struct ifpga_fme_hw *)feature->parent;
struct altera_spi_device *spi_master;
return ret;
}
-static void fme_spi_uinit(struct feature *feature)
+static void fme_spi_uinit(struct ifpga_feature *feature)
{
struct ifpga_fme_hw *fme = (struct ifpga_fme_hw *)feature->parent;
intel_max10_device_remove(fme->max10_dev);
}
-struct feature_ops fme_spi_master_ops = {
+struct ifpga_feature_ops fme_spi_master_ops = {
.init = fme_spi_init,
.uinit = fme_spi_uinit,
};
return 0;
}
-static int fme_nios_spi_init(struct feature *feature)
+static int fme_nios_spi_init(struct ifpga_feature *feature)
{
struct ifpga_fme_hw *fme = (struct ifpga_fme_hw *)feature->parent;
struct altera_spi_device *spi_master;
return -ENODEV;
}
-static void fme_nios_spi_uinit(struct feature *feature)
+static void fme_nios_spi_uinit(struct ifpga_feature *feature)
{
struct ifpga_fme_hw *fme = (struct ifpga_fme_hw *)feature->parent;
intel_max10_device_remove(fme->max10_dev);
}
-struct feature_ops fme_nios_spi_master_ops = {
+struct ifpga_feature_ops fme_nios_spi_master_ops = {
.init = fme_nios_spi_init,
.uinit = fme_nios_spi_uinit,
};
return 0;
}
-static int fme_i2c_init(struct feature *feature)
+static int fme_i2c_init(struct ifpga_feature *feature)
{
struct feature_fme_i2c *i2c;
struct ifpga_fme_hw *fme = (struct ifpga_fme_hw *)feature->parent;
return 0;
}
-static void fme_i2c_uninit(struct feature *feature)
+static void fme_i2c_uninit(struct ifpga_feature *feature)
{
struct ifpga_fme_hw *fme = (struct ifpga_fme_hw *)feature->parent;
altera_i2c_remove(fme->i2c_master);
}
-struct feature_ops fme_i2c_master_ops = {
+struct ifpga_feature_ops fme_i2c_master_ops = {
.init = fme_i2c_init,
.uinit = fme_i2c_uninit,
};
-static int fme_eth_group_init(struct feature *feature)
+static int fme_eth_group_init(struct ifpga_feature *feature)
{
struct ifpga_fme_hw *fme = (struct ifpga_fme_hw *)feature->parent;
struct eth_group_device *dev;
return 0;
}
-static void fme_eth_group_uinit(struct feature *feature)
+static void fme_eth_group_uinit(struct ifpga_feature *feature)
{
UNUSED(feature);
}
-struct feature_ops fme_eth_group_ops = {
+struct ifpga_feature_ops fme_eth_group_ops = {
.init = fme_eth_group_init,
.uinit = fme_eth_group_uinit,
};
#define PERF_MAX_PORT_NUM 1
-static int fme_global_dperf_init(struct feature *feature)
+static int fme_global_dperf_init(struct ifpga_feature *feature)
{
UNUSED(feature);
return 0;
}
-static void fme_global_dperf_uinit(struct feature *feature)
+static void fme_global_dperf_uinit(struct ifpga_feature *feature)
{
UNUSED(feature);
dev_info(NULL, "FME global_dperf UInit.\n");
}
-static int fme_dperf_fab_get_prop(struct feature *feature,
+static int fme_dperf_fab_get_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
struct ifpga_fme_hw *fme = feature->parent;
return -ENOENT;
}
-static int fme_dperf_root_get_prop(struct feature *feature,
+static int fme_dperf_root_get_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
struct ifpga_fme_hw *fme = feature->parent;
return -ENOENT;
}
-static int fme_global_dperf_get_prop(struct feature *feature,
+static int fme_global_dperf_get_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
u8 top = GET_FIELD(PROP_TOP, prop->prop_id);
return -ENOENT;
}
-static int fme_dperf_fab_set_prop(struct feature *feature,
+static int fme_dperf_fab_set_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
struct ifpga_fme_hw *fme = feature->parent;
return -ENOENT;
}
-static int fme_global_dperf_set_prop(struct feature *feature,
+static int fme_global_dperf_set_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
u8 top = GET_FIELD(PROP_TOP, prop->prop_id);
return -ENOENT;
}
-struct feature_ops fme_global_dperf_ops = {
+struct ifpga_feature_ops fme_global_dperf_ops = {
.init = fme_global_dperf_init,
.uinit = fme_global_dperf_uinit,
.get_prop = fme_global_dperf_get_prop,
writeq(0UL, &fme_err->ras_catfat_mask);
}
-static int fme_global_error_init(struct feature *feature)
+static int fme_global_error_init(struct ifpga_feature *feature)
{
struct ifpga_fme_hw *fme = feature->parent;
return 0;
}
-static void fme_global_error_uinit(struct feature *feature)
+static void fme_global_error_uinit(struct ifpga_feature *feature)
{
UNUSED(feature);
}
-static int fme_err_fme_err_get_prop(struct feature *feature,
+static int fme_err_fme_err_get_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
struct ifpga_fme_hw *fme = feature->parent;
return -ENOENT;
}
-static int fme_err_root_get_prop(struct feature *feature,
+static int fme_err_root_get_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
struct ifpga_fme_hw *fme = feature->parent;
return -ENOENT;
}
-static int fme_global_error_get_prop(struct feature *feature,
+static int fme_global_error_get_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
u8 top = GET_FIELD(PROP_TOP, prop->prop_id);
return -ENOENT;
}
-static int fme_err_fme_err_set_prop(struct feature *feature,
+static int fme_err_fme_err_set_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
struct ifpga_fme_hw *fme = feature->parent;
return -ENOENT;
}
-static int fme_err_root_set_prop(struct feature *feature,
+static int fme_err_root_set_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
struct ifpga_fme_hw *fme = feature->parent;
return -ENOENT;
}
-static int fme_global_error_set_prop(struct feature *feature,
+static int fme_global_error_set_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
u8 top = GET_FIELD(PROP_TOP, prop->prop_id);
return -ENOENT;
}
-struct feature_ops fme_global_err_ops = {
+struct ifpga_feature_ops fme_global_err_ops = {
.init = fme_global_error_init,
.uinit = fme_global_error_uinit,
.get_prop = fme_global_error_get_prop,
#define PERF_MAX_PORT_NUM 1
#define FME_IPERF_CAP_IOMMU 0x1
-static int fme_global_iperf_init(struct feature *feature)
+static int fme_global_iperf_init(struct ifpga_feature *feature)
{
struct ifpga_fme_hw *fme;
struct feature_fme_header *fme_hdr;
return 0;
}
-static void fme_global_iperf_uinit(struct feature *feature)
+static void fme_global_iperf_uinit(struct ifpga_feature *feature)
{
UNUSED(feature);
dev_info(NULL, "FME global_iperf UInit.\n");
}
-static int fme_iperf_root_get_prop(struct feature *feature,
+static int fme_iperf_root_get_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
struct ifpga_fme_hw *fme = feature->parent;
return -ENOENT;
}
-static int fme_iperf_cache_get_prop(struct feature *feature,
+static int fme_iperf_cache_get_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
struct ifpga_fme_hw *fme = feature->parent;
return -ENOENT;
}
-static int fme_iperf_vtd_root_get_prop(struct feature *feature,
+static int fme_iperf_vtd_root_get_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
struct ifpga_fme_hw *fme = feature->parent;
return -ENOENT;
}
-static int fme_iperf_vtd_sub_get_prop(struct feature *feature,
+static int fme_iperf_vtd_sub_get_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
struct ifpga_fme_hw *fme = feature->parent;
return -ENOENT;
}
-static int fme_iperf_vtd_get_prop(struct feature *feature,
+static int fme_iperf_vtd_get_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
u8 sub = GET_FIELD(PROP_SUB, prop->prop_id);
return fme_iperf_vtd_sub_get_prop(feature, prop);
}
-static int fme_iperf_fab_get_prop(struct feature *feature,
+static int fme_iperf_fab_get_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
struct ifpga_fme_hw *fme = feature->parent;
return -ENOENT;
}
-static int fme_global_iperf_get_prop(struct feature *feature,
+static int fme_global_iperf_get_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
u8 top = GET_FIELD(PROP_TOP, prop->prop_id);
return -ENOENT;
}
-static int fme_iperf_cache_set_prop(struct feature *feature,
+static int fme_iperf_cache_set_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
struct ifpga_fme_hw *fme = feature->parent;
return -ENOENT;
}
-static int fme_iperf_vtd_set_prop(struct feature *feature,
+static int fme_iperf_vtd_set_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
struct ifpga_fme_hw *fme = feature->parent;
return -ENOENT;
}
-static int fme_iperf_fab_set_prop(struct feature *feature,
+static int fme_iperf_fab_set_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
struct ifpga_fme_hw *fme = feature->parent;
return -ENOENT;
}
-static int fme_global_iperf_set_prop(struct feature *feature,
+static int fme_global_iperf_set_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
u8 top = GET_FIELD(PROP_TOP, prop->prop_id);
return -ENOENT;
}
-struct feature_ops fme_global_iperf_ops = {
+struct ifpga_feature_ops fme_global_iperf_ops = {
.init = fme_global_iperf_init,
.uinit = fme_global_iperf_uinit,
.get_prop = fme_global_iperf_get_prop,
return fme_pr(hw, port_id, buf, size, status);
}
-static int fme_pr_mgmt_init(struct feature *feature)
+static int fme_pr_mgmt_init(struct ifpga_feature *feature)
{
struct feature_fme_pr *fme_pr;
struct feature_header fme_pr_header;
return 0;
}
-static void fme_pr_mgmt_uinit(struct feature *feature)
+static void fme_pr_mgmt_uinit(struct ifpga_feature *feature)
{
UNUSED(feature);
dev_info(NULL, "FME PR MGMT UInit.\n");
}
-struct feature_ops fme_pr_mgmt_ops = {
+struct ifpga_feature_ops fme_pr_mgmt_ops = {
.init = fme_pr_mgmt_init,
.uinit = fme_pr_mgmt_uinit,
};
#include "opae_eth_group.h"
/** List of private feateues */
-TAILQ_HEAD(ifpga_feature_list, feature);
+TAILQ_HEAD(ifpga_feature_list, ifpga_feature);
enum ifpga_feature_state {
IFPGA_FEATURE_UNUSED = 0,
int idx;
};
-struct feature {
- TAILQ_ENTRY(feature)next;
+struct ifpga_feature {
+ TAILQ_ENTRY(ifpga_feature)next;
enum ifpga_feature_state state;
enum feature_type type;
const char *name;
void *parent; /* to parent hw data structure */
- struct feature_ops *ops;/* callback to this private feature */
+ struct ifpga_feature_ops *ops;/* callback to this private feature */
unsigned int vec_start;
unsigned int vec_cnt;
};
-struct feature_ops {
- int (*init)(struct feature *feature);
- void (*uinit)(struct feature *feature);
- int (*get_prop)(struct feature *feature, struct feature_prop *prop);
- int (*set_prop)(struct feature *feature, struct feature_prop *prop);
- int (*set_irq)(struct feature *feature, void *irq_set);
+struct ifpga_feature_ops {
+ int (*init)(struct ifpga_feature *feature);
+ void (*uinit)(struct ifpga_feature *feature);
+ int (*get_prop)(struct ifpga_feature *feature,
+ struct feature_prop *prop);
+ int (*set_prop)(struct ifpga_feature *feature,
+ struct feature_prop *prop);
+ int (*set_irq)(struct ifpga_feature *feature, void *irq_set);
};
enum ifpga_fme_state {
int port_get_prop(struct ifpga_port_hw *port, struct feature_prop *prop)
{
- struct feature *feature;
+ struct ifpga_feature *feature;
if (!port)
return -ENOENT;
int port_set_prop(struct ifpga_port_hw *port, struct feature_prop *prop)
{
- struct feature *feature;
+ struct ifpga_feature *feature;
if (!port)
return -ENOENT;
int port_set_irq(struct ifpga_port_hw *port, u32 feature_id, void *irq_set)
{
- struct feature *feature;
+ struct ifpga_feature *feature;
if (!port)
return -ENOENT;
return 0;
}
-static int port_hdr_init(struct feature *feature)
+static int port_hdr_init(struct ifpga_feature *feature)
{
struct ifpga_port_hw *port = feature->parent;
return 0;
}
-static void port_hdr_uinit(struct feature *feature)
+static void port_hdr_uinit(struct ifpga_feature *feature)
{
UNUSED(feature);
dev_info(NULL, "port hdr uinit.\n");
}
-static int port_hdr_get_prop(struct feature *feature, struct feature_prop *prop)
+static int port_hdr_get_prop(struct ifpga_feature *feature,
+ struct feature_prop *prop)
{
struct ifpga_port_hw *port = feature->parent;
return -ENOENT;
}
-static int port_hdr_set_prop(struct feature *feature, struct feature_prop *prop)
+static int port_hdr_set_prop(struct ifpga_feature *feature,
+ struct feature_prop *prop)
{
struct ifpga_port_hw *port = feature->parent;
return -ENOENT;
}
-struct feature_ops ifpga_rawdev_port_hdr_ops = {
+struct ifpga_feature_ops ifpga_rawdev_port_hdr_ops = {
.init = port_hdr_init,
.uinit = port_hdr_uinit,
.get_prop = port_hdr_get_prop,
.set_prop = port_hdr_set_prop,
};
-static int port_stp_init(struct feature *feature)
+static int port_stp_init(struct ifpga_feature *feature)
{
struct ifpga_port_hw *port = feature->parent;
return 0;
}
-static void port_stp_uinit(struct feature *feature)
+static void port_stp_uinit(struct ifpga_feature *feature)
{
UNUSED(feature);
dev_info(NULL, "port stp uinit.\n");
}
-struct feature_ops ifpga_rawdev_port_stp_ops = {
+struct ifpga_feature_ops ifpga_rawdev_port_stp_ops = {
.init = port_stp_init,
.uinit = port_stp_uinit,
};
-static int port_uint_init(struct feature *feature)
+static int port_uint_init(struct ifpga_feature *feature)
{
struct ifpga_port_hw *port = feature->parent;
return 0;
}
-static void port_uint_uinit(struct feature *feature)
+static void port_uint_uinit(struct ifpga_feature *feature)
{
UNUSED(feature);
dev_info(NULL, "PORT UINT UInit.\n");
}
-struct feature_ops ifpga_rawdev_port_uint_ops = {
+struct ifpga_feature_ops ifpga_rawdev_port_uint_ops = {
.init = port_uint_init,
.uinit = port_uint_uinit,
};
-static int port_afu_init(struct feature *feature)
+static int port_afu_init(struct ifpga_feature *feature)
{
UNUSED(feature);
return 0;
}
-static void port_afu_uinit(struct feature *feature)
+static void port_afu_uinit(struct ifpga_feature *feature)
{
UNUSED(feature);
dev_info(NULL, "PORT AFU UInit.\n");
}
-struct feature_ops ifpga_rawdev_port_afu_ops = {
+struct ifpga_feature_ops ifpga_rawdev_port_afu_ops = {
.init = port_afu_init,
.uinit = port_afu_uinit,
};
return ret;
}
-static int port_error_init(struct feature *feature)
+static int port_error_init(struct ifpga_feature *feature)
{
struct ifpga_port_hw *port = feature->parent;
return 0;
}
-static void port_error_uinit(struct feature *feature)
+static void port_error_uinit(struct ifpga_feature *feature)
{
UNUSED(feature);
}
-static int port_error_get_prop(struct feature *feature,
+static int port_error_get_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
struct ifpga_port_hw *port = feature->parent;
return -ENOENT;
}
-static int port_error_set_prop(struct feature *feature,
+static int port_error_set_prop(struct ifpga_feature *feature,
struct feature_prop *prop)
{
struct ifpga_port_hw *port = feature->parent;
return -ENOENT;
}
-struct feature_ops ifpga_rawdev_port_error_ops = {
+struct ifpga_feature_ops ifpga_rawdev_port_error_ops = {
.init = port_error_init,
.uinit = port_error_uinit,
.get_prop = port_error_get_prop,