• Home
  • Raw
  • Download

Lines Matching full:felix

25 #include "felix.h"
193 struct felix *felix = ocelot_to_felix(ocelot); in felix_phylink_validate() local
195 if (felix->info->phylink_validate) in felix_phylink_validate()
196 felix->info->phylink_validate(ocelot, port, supported, state); in felix_phylink_validate()
204 struct felix *felix = ocelot_to_felix(ocelot); in felix_phylink_mac_config() local
207 if (felix->pcs[port]) in felix_phylink_mac_config()
208 phylink_set_pcs(dp->pl, &felix->pcs[port]->pcs); in felix_phylink_mac_config()
246 struct felix *felix = ocelot_to_felix(ocelot); in felix_phylink_mac_link_up() local
313 if (felix->info->port_sched_speed_set) in felix_phylink_mac_link_up()
314 felix->info->port_sched_speed_set(ocelot, port, speed); in felix_phylink_mac_link_up()
368 static int felix_parse_ports_node(struct felix *felix, in felix_parse_ports_node() argument
372 struct ocelot *ocelot = &felix->ocelot; in felix_parse_ports_node()
373 struct device *dev = felix->ocelot.dev; in felix_parse_ports_node()
399 err = felix->info->prevalidate_phy_mode(ocelot, port, phy_mode); in felix_parse_ports_node()
413 static int felix_parse_dt(struct felix *felix, phy_interface_t *port_phy_modes) in felix_parse_dt() argument
415 struct device *dev = felix->ocelot.dev; in felix_parse_dt()
428 err = felix_parse_ports_node(felix, ports_node, port_phy_modes); in felix_parse_dt()
434 static int felix_init_structs(struct felix *felix, int num_phys_ports) in felix_init_structs() argument
436 struct ocelot *ocelot = &felix->ocelot; in felix_init_structs()
447 ocelot->map = felix->info->map; in felix_init_structs()
448 ocelot->stats_layout = felix->info->stats_layout; in felix_init_structs()
449 ocelot->num_stats = felix->info->num_stats; in felix_init_structs()
450 ocelot->shared_queue_sz = felix->info->shared_queue_sz; in felix_init_structs()
451 ocelot->num_mact_rows = felix->info->num_mact_rows; in felix_init_structs()
452 ocelot->vcap = felix->info->vcap; in felix_init_structs()
453 ocelot->ops = felix->info->ops; in felix_init_structs()
462 err = felix_parse_dt(felix, port_phy_modes); in felix_init_structs()
471 if (!felix->info->target_io_res[i].name) in felix_init_structs()
474 memcpy(&res, &felix->info->target_io_res[i], sizeof(res)); in felix_init_structs()
476 res.start += felix->switch_base; in felix_init_structs()
477 res.end += felix->switch_base; in felix_init_structs()
490 err = ocelot_regfields_init(ocelot, felix->info->regfields); in felix_init_structs()
512 memcpy(&res, &felix->info->port_io_res[port], sizeof(res)); in felix_init_structs()
514 res.start += felix->switch_base; in felix_init_structs()
515 res.end += felix->switch_base; in felix_init_structs()
541 felix->info->xmit_template_populate(ocelot, port); in felix_init_structs()
546 if (felix->info->mdio_bus_alloc) { in felix_init_structs()
547 err = felix->info->mdio_bus_alloc(ocelot); in felix_init_structs()
585 struct felix *felix = ocelot_to_felix(ocelot); in felix_setup() local
588 err = felix_init_structs(felix, ds->num_ports); in felix_setup()
597 err = ocelot_init_timestamp(ocelot, felix->info->ptp_caps); in felix_setup()
635 struct felix *felix = ocelot_to_felix(ocelot); in felix_teardown() local
648 if (felix->info->mdio_bus_free) in felix_teardown()
649 felix->info->mdio_bus_free(ocelot); in felix_teardown()
775 struct felix *felix = ocelot_to_felix(ocelot); in felix_port_setup_tc() local
777 if (felix->info->port_setup_tc) in felix_port_setup_tc()
778 return felix->info->port_setup_tc(ds, port, type, type_data); in felix_port_setup_tc()
827 struct felix *felix = ocelot_to_felix(ocelot); in felix_port_to_netdev() local
828 struct dsa_switch *ds = felix->ds; in felix_port_to_netdev()