Lines Matching refs:felix

26 #include "felix.h"
309 struct felix *felix = ocelot_to_felix(ocelot);
317 if (!felix->info->quirk_no_xtr_irq)
608 struct felix *felix = ocelot_to_felix(ocelot);
617 felix_set_host_flood(ds, mask, !!felix->host_flood_uc_mask,
618 !!felix->host_flood_mc_mask, true);
670 struct felix *felix = ocelot_to_felix(ocelot);
685 old_proto_ops = felix->tag_proto_ops;
701 felix->tag_proto_ops = proto_ops;
702 felix->tag_proto = proto;
717 struct felix *felix = ocelot_to_felix(ocelot);
719 return felix->tag_proto;
726 struct felix *felix = ocelot_to_felix(ocelot);
730 felix->host_flood_uc_mask |= BIT(port);
732 felix->host_flood_uc_mask &= ~BIT(port);
735 felix->host_flood_mc_mask |= BIT(port);
737 felix->host_flood_mc_mask &= ~BIT(port);
739 mask = felix->tag_proto_ops->get_host_fwd_mask(ds);
740 felix_set_host_flood(ds, mask, !!felix->host_flood_uc_mask,
741 !!felix->host_flood_mc_mask, true);
749 struct felix *felix = ocelot_to_felix(ocelot);
751 return felix->tag_proto_ops->change_conduit(ds, port, conduit, extack);
1058 struct felix *felix = ocelot_to_felix(ocelot);
1060 if (felix->info->phylink_mac_config)
1061 felix->info->phylink_mac_config(ocelot, port, mode, state);
1069 struct felix *felix = ocelot_to_felix(ocelot);
1072 if (felix->pcs && felix->pcs[port])
1073 pcs = felix->pcs[port];
1083 struct felix *felix;
1085 felix = ocelot_to_felix(ocelot);
1088 felix->info->quirks);
1099 struct felix *felix = ocelot_to_felix(ocelot);
1103 felix->info->quirks);
1105 if (felix->info->port_sched_speed_set)
1106 felix->info->port_sched_speed_set(ocelot, port, speed);
1239 static int felix_validate_phy_mode(struct felix *felix, int port,
1242 u32 modes = felix->info->port_modes[port];
1249 static int felix_parse_ports_node(struct felix *felix,
1253 struct device *dev = felix->ocelot.dev;
1279 err = felix_validate_phy_mode(felix, port, phy_mode);
1297 static int felix_parse_dt(struct felix *felix, phy_interface_t *port_phy_modes)
1299 struct device *dev = felix->ocelot.dev;
1314 err = felix_parse_ports_node(felix, ports_node, port_phy_modes);
1320 static struct regmap *felix_request_regmap_by_name(struct felix *felix,
1323 struct ocelot *ocelot = &felix->ocelot;
1331 if (!felix->info->resources)
1334 for (i = 0; i < felix->info->num_resources; i++) {
1335 if (strcmp(resource_name, felix->info->resources[i].name))
1338 memcpy(&res, &felix->info->resources[i], sizeof(res));
1339 res.start += felix->switch_base;
1340 res.end += felix->switch_base;
1348 static struct regmap *felix_request_regmap(struct felix *felix,
1351 const char *resource_name = felix->info->resource_names[target];
1359 return felix_request_regmap_by_name(felix, resource_name);
1362 static struct regmap *felix_request_port_regmap(struct felix *felix, int port)
1368 return felix_request_regmap_by_name(felix, resource_name);
1371 static int felix_init_structs(struct felix *felix, int num_phys_ports)
1373 struct ocelot *ocelot = &felix->ocelot;
1384 ocelot->map = felix->info->map;
1385 ocelot->num_mact_rows = felix->info->num_mact_rows;
1386 ocelot->vcap = felix->info->vcap;
1387 ocelot->vcap_pol.base = felix->info->vcap_pol_base;
1388 ocelot->vcap_pol.max = felix->info->vcap_pol_max;
1389 ocelot->vcap_pol.base2 = felix->info->vcap_pol_base2;
1390 ocelot->vcap_pol.max2 = felix->info->vcap_pol_max2;
1391 ocelot->ops = felix->info->ops;
1394 ocelot->devlink = felix->ds->devlink;
1401 err = felix_parse_dt(felix, port_phy_modes);
1408 target = felix_request_regmap(felix, i);
1420 err = ocelot_regfields_init(ocelot, felix->info->regfields);
1440 target = felix_request_port_regmap(felix, port);
1458 if (felix->info->mdio_bus_alloc) {
1459 err = felix->info->mdio_bus_alloc(ocelot);
1549 struct felix *felix = ocelot_to_felix(ocelot);
1553 err = felix_init_structs(felix, ds->num_ports);
1565 err = ocelot_init_timestamp(ocelot, felix->info->ptp_caps);
1576 if (felix->info->configure_serdes)
1577 felix->info->configure_serdes(ocelot, dp->index,
1593 felix_change_tag_protocol(ds, felix->tag_proto);
1610 if (felix->info->mdio_bus_free)
1611 felix->info->mdio_bus_free(ocelot);
1619 struct felix *felix = ocelot_to_felix(ocelot);
1623 if (felix->tag_proto_ops)
1624 felix->tag_proto_ops->teardown(ds);
1634 if (felix->info->mdio_bus_free)
1635 felix->info->mdio_bus_free(ocelot);
1650 struct felix *felix = ocelot_to_felix(ocelot);
1658 using_tag_8021q = felix->tag_proto == DSA_TAG_PROTO_OCELOT_8021Q;
1665 struct felix *felix = ocelot_to_felix(ocelot);
1668 if (felix->tag_proto != DSA_TAG_PROTO_OCELOT_8021Q)
1671 if (!felix->info->quirk_no_xtr_irq)
1808 struct felix *felix = ocelot_to_felix(ocelot);
1816 using_tag_8021q = felix->tag_proto == DSA_TAG_PROTO_OCELOT_8021Q;
1879 struct felix *felix = ocelot_to_felix(ocelot);
1881 if (felix->info->port_setup_tc)
1882 return felix->info->port_setup_tc(ds, port, type, type_data);
2173 struct felix *felix = ocelot_to_felix(ocelot);
2174 struct dsa_switch *ds = felix->ds;