| /linux/drivers/net/ethernet/ti/icssg/ |
| H A D | icssg_prueth.c | 61 struct prueth *prueth = emac->prueth; in emac_get_tx_ts() local 65 addr = icssg_queue_pop(prueth, slice == 0 ? in emac_get_tx_ts() 70 memcpy_fromio(rsp, prueth->shram.va + addr, sizeof(*rsp)); in emac_get_tx_ts() 72 icssg_queue_push(prueth, slice == 0 ? in emac_get_tx_ts() 107 hi_sw = readl(emac->prueth->shram.va + in tx_ts_work() 148 static int prueth_emac_start(struct prueth *prueth) in prueth_emac_start() argument 151 struct device *dev = prueth->dev; in prueth_emac_start() 154 if (prueth->is_switch_mode) in prueth_emac_start() 155 firmwares = prueth->icssg_switch_firmwares; in prueth_emac_start() 156 else if (prueth->is_hsr_offload_mode && HSR_V1 == prueth->hsr_prp_version) in prueth_emac_start() [all …]
|
| H A D | icssg_prueth_sr1.c | 54 static void icssg_config_sr1(struct prueth *prueth, struct prueth_emac *emac, in icssg_config_sr1() argument 62 config.addr_lo = cpu_to_le32(lower_32_bits(prueth->msmcram.pa)); in icssg_config_sr1() 63 config.addr_hi = cpu_to_le32(upper_32_bits(prueth->msmcram.pa)); in icssg_config_sr1() 73 va = prueth->shram.va + slice * ICSSG_CONFIG_OFFSET_SLICE1; in icssg_config_sr1() 156 struct prueth *prueth = emac->prueth; in icssg_config_set_speed_sr1() local 159 val = icssg_rgmii_get_speed(prueth->miig_rt, slice); in icssg_config_set_speed_sr1() 164 val = icssg_rgmii_get_fullduplex(prueth->miig_rt, slice); in icssg_config_set_speed_sr1() 177 struct prueth *prueth = emac->prueth; in emac_adjust_link_sr1() local 214 icssg_update_rgmii_cfg(prueth->miig_rt, emac); in emac_adjust_link_sr1() 235 struct prueth *prueth = emac->prueth; in emac_phy_connect() local [all …]
|
| H A D | icssg_config.c | 115 struct prueth *prueth = emac->prueth; in icssg_config_mii_init_fw_offload() local 120 mii_rt = prueth->mii_rt; in icssg_config_mii_init_fw_offload() 142 struct prueth *prueth = emac->prueth; in icssg_config_mii_init() local 147 mii_rt = prueth->mii_rt; in icssg_config_mii_init() 168 static void icssg_miig_queues_init(struct prueth *prueth, int slice) in icssg_miig_queues_init() argument 170 struct regmap *miig_rt = prueth->miig_rt; in icssg_miig_queues_init() 171 void __iomem *smem = prueth->shram.va; in icssg_miig_queues_init() 228 struct prueth *prueth = emac->prueth; in icssg_config_ipg() local 252 icssg_mii_update_ipg(prueth->mii_rt, slice, ipg); in icssg_config_ipg() 288 struct prueth *prueth = emac->prueth; in prueth_fw_offload_buffer_setup() local [all …]
|
| H A D | icssg_queues.c | 16 int icssg_queue_pop(struct prueth *prueth, u8 queue) in icssg_queue_pop() argument 23 regmap_read(prueth->miig_rt, ICSSG_QUEUE_CNT_OFFSET + 4 * queue, &cnt); in icssg_queue_pop() 27 regmap_read(prueth->miig_rt, ICSSG_QUEUE_OFFSET + 4 * queue, &val); in icssg_queue_pop() 33 void icssg_queue_push(struct prueth *prueth, int queue, u16 addr) in icssg_queue_push() argument 38 regmap_write(prueth->miig_rt, ICSSG_QUEUE_OFFSET + 4 * queue, addr); in icssg_queue_push() 42 u32 icssg_queue_level(struct prueth *prueth, int queue) in icssg_queue_level() argument 49 regmap_read(prueth->miig_rt, ICSSG_QUEUE_CNT_OFFSET + 4 * queue, ®); in icssg_queue_level()
|
| H A D | icssg_prueth.h | 193 struct prueth *prueth; member 325 struct prueth { struct 429 int icssg_config(struct prueth *prueth, struct prueth_emac *emac, 435 void icssg_init_emac_mode(struct prueth *prueth); 436 void icssg_init_fw_offload_mode(struct prueth *prueth); 439 int icssg_queue_pop(struct prueth *prueth, u8 queue); 440 void icssg_queue_push(struct prueth *prueth, int queue, u16 addr); 441 u32 icssg_queue_level(struct prueth *prueth, int queue); 452 void icssg_set_pvid(struct prueth *prueth, u8 vid, u8 port); 506 void prueth_netdev_exit(struct prueth *prueth, [all …]
|
| H A D | icssg_stats.c | 21 struct prueth *prueth = emac->prueth; in emac_update_hardware_stats() local 28 spin_lock(&prueth->stats_lock); in emac_update_hardware_stats() 39 regmap_read(prueth->miig_rt, in emac_update_hardware_stats() 42 regmap_write(prueth->miig_rt, in emac_update_hardware_stats() 54 if (prueth->pa_stats) { in emac_update_hardware_stats() 58 regmap_read(prueth->pa_stats, reg, &val); in emac_update_hardware_stats() 63 spin_unlock(&prueth->stats_lock); in emac_update_hardware_stats() 86 if (emac->prueth->pa_stats) { in emac_get_stat_by_name()
|
| H A D | icssg_ethtool.c | 15 struct prueth *prueth = emac->prueth; in emac_get_drvinfo() local 17 strscpy(info->driver, dev_driver_string(prueth->dev), in emac_get_drvinfo() 19 strscpy(info->bus_info, dev_name(prueth->dev), sizeof(info->bus_info)); in emac_get_drvinfo() 74 if (emac->prueth->pa_stats) in emac_get_sset_count() 94 if (emac->prueth->pa_stats) in emac_get_strings() 115 if (emac->prueth->pa_stats) in emac_get_ethtool_stats() 248 struct prueth *prueth = emac->prueth; in emac_set_coalesce() local 255 dev_info(prueth->dev, "defaulting to min value of %dus for rx-usecs\n", in emac_set_coalesce() 262 dev_info(prueth->dev, "defaulting to min value of %dus for tx-usecs\n", in emac_set_coalesce() 277 struct prueth *prueth = emac->prueth; in emac_set_per_queue_coalesce() local [all …]
|
| H A D | icssg_switchdev.c | 254 icssg_set_pvid(emac->prueth, vid, emac->port_id); in prueth_switchdev_vlan_add() 278 icssg_set_pvid(emac->prueth, 0, emac->port_id); in prueth_switchdev_vlan_del() 450 int prueth_switchdev_register_notifiers(struct prueth *prueth) in prueth_switchdev_register_notifiers() argument 454 prueth->prueth_switchdev_nb.notifier_call = &prueth_switchdev_event; in prueth_switchdev_register_notifiers() 455 ret = register_switchdev_notifier(&prueth->prueth_switchdev_nb); in prueth_switchdev_register_notifiers() 457 dev_err(prueth->dev, "register switchdev notifier fail ret:%d\n", in prueth_switchdev_register_notifiers() 462 prueth->prueth_switchdev_bl_nb.notifier_call = &prueth_switchdev_blocking_event; in prueth_switchdev_register_notifiers() 463 ret = register_switchdev_blocking_notifier(&prueth->prueth_switchdev_bl_nb); in prueth_switchdev_register_notifiers() 465 dev_err(prueth->dev, "register switchdev blocking notifier ret:%d\n", in prueth_switchdev_register_notifiers() 467 unregister_switchdev_notifier(&prueth->prueth_switchdev_nb); in prueth_switchdev_register_notifiers() [all …]
|
| H A D | icssg_switchdev.h | 9 int prueth_switchdev_register_notifiers(struct prueth *prueth); 10 void prueth_switchdev_unregister_notifiers(struct prueth *prueth);
|
| /linux/drivers/net/ethernet/ti/icssm/ |
| H A D | icssm_prueth.c | 43 static void icssm_prueth_write_reg(struct prueth *prueth, in icssm_prueth_write_reg() argument 47 writel_relaxed(val, prueth->mem[region].va + reg); in icssm_prueth_write_reg() 171 static void icssm_prueth_hostconfig(struct prueth *prueth) in icssm_prueth_hostconfig() argument 173 void __iomem *sram_base = prueth->mem[PRUETH_MEM_SHARED_RAM].va; in icssm_prueth_hostconfig() 208 static void icssm_prueth_mii_init(struct prueth *prueth) in icssm_prueth_mii_init() argument 214 mii_rt = prueth->mii_rt; in icssm_prueth_mii_init() 241 if (!PRUETH_IS_EMAC(prueth)) in icssm_prueth_mii_init() 250 if (PRUETH_IS_EMAC(prueth)) in icssm_prueth_mii_init() 283 static void icssm_prueth_clearmem(struct prueth *prueth, enum prueth_mem region) in icssm_prueth_clearmem() argument 285 memset_io(prueth->mem[region].va, 0, prueth->mem[region].size); in icssm_prueth_clearmem() [all …]
|
| H A D | icssm_switchdev.c | 27 void icssm_prueth_sw_set_stp_state(struct prueth *prueth, in icssm_prueth_sw_set_stp_state() argument 30 struct fdb_tbl *t = prueth->fdb_tbl; in icssm_prueth_sw_set_stp_state() 36 u8 icssm_prueth_sw_get_stp_state(struct prueth *prueth, enum prueth_port port) in icssm_prueth_sw_get_stp_state() argument 38 struct fdb_tbl *t = prueth->fdb_tbl; in icssm_prueth_sw_get_stp_state() 51 struct prueth *prueth = emac->prueth; in icssm_prueth_sw_attr_set() local 56 if (!prueth->fdb_tbl) in icssm_prueth_sw_attr_set() 61 o_state = icssm_prueth_sw_get_stp_state(prueth, emac->port_id); in icssm_prueth_sw_attr_set() 62 icssm_prueth_sw_set_stp_state(prueth, emac->port_id, in icssm_prueth_sw_attr_set() 68 dev_dbg(prueth->dev, "attr set: stp state:%u port:%u\n", in icssm_prueth_sw_attr_set() 102 struct prueth *prueth = emac->prueth; in icssm_sw_event_work() local [all …]
|
| H A D | icssm_prueth_switch.c | 14 #define FDB_IDX_TBL_ENTRY(n) (&prueth->fdb_tbl->index_a->index_tbl_entry[n]) 16 #define FDB_MAC_TBL_ENTRY(n) (&prueth->fdb_tbl->mac_tbl_a->mac_tbl_entry[n]) 202 void icssm_prueth_sw_free_fdb_table(struct prueth *prueth) in icssm_prueth_sw_free_fdb_table() argument 204 if (prueth->emac_configured) in icssm_prueth_sw_free_fdb_table() 207 kfree(prueth->fdb_tbl); in icssm_prueth_sw_free_fdb_table() 208 prueth->fdb_tbl = NULL; in icssm_prueth_sw_free_fdb_table() 211 void icssm_prueth_sw_fdb_tbl_init(struct prueth *prueth) in icssm_prueth_sw_fdb_tbl_init() argument 213 struct fdb_tbl *t = prueth->fdb_tbl; in icssm_prueth_sw_fdb_tbl_init() 217 sram_base = prueth->mem[PRUETH_MEM_SHARED_RAM].va; in icssm_prueth_sw_fdb_tbl_init() 307 icssm_prueth_sw_find_fdb_insert(struct fdb_tbl *fdb, struct prueth *prueth, in icssm_prueth_sw_find_fdb_insert() argument [all …]
|
| H A D | icssm_prueth_switch.h | 14 void icssm_prueth_sw_set_stp_state(struct prueth *prueth, 16 u8 icssm_prueth_sw_get_stp_state(struct prueth *prueth, 21 void icssm_prueth_sw_fdb_tbl_init(struct prueth *prueth); 22 int icssm_prueth_sw_init_fdb_table(struct prueth *prueth); 23 void icssm_prueth_sw_free_fdb_table(struct prueth *prueth); 31 void icssm_prueth_sw_hostconfig(struct prueth *prueth); 33 int icssm_prueth_sw_boot_prus(struct prueth *prueth, struct net_device *ndev);
|
| H A D | icssm_switchdev.h | 10 int icssm_prueth_sw_register_notifiers(struct prueth *prueth); 11 void icssm_prueth_sw_unregister_notifiers(struct prueth *prueth);
|
| H A D | icssm_prueth.h | 205 struct prueth *prueth; member 241 struct prueth { struct 272 void icssm_parse_packet_info(struct prueth *prueth, u32 buffer_descriptor, argument
|
| /linux/drivers/net/ethernet/ti/ |
| H A D | Makefile | 6 obj-$(CONFIG_TI_PRUETH) += icssm-prueth.o 7 icssm-prueth-y := icssm/icssm_prueth.o icssm/icssm_prueth_switch.o icssm/icssm_switchdev.o 37 obj-$(CONFIG_TI_ICSSG_PRUETH) += icssg-prueth.o icssg.o 38 icssg-prueth-y := icssg/icssg_prueth.o icssg/icssg_switchdev.o 40 obj-$(CONFIG_TI_ICSSG_PRUETH_SR1) += icssg-prueth-sr1.o icssg.o 41 icssg-prueth-sr1-y := icssg/icssg_prueth_sr1.o
|
| /linux/arch/arm64/boot/dts/ti/ |
| H A D | k3-am65-iot2050-common-pg1.dtsi | 46 compatible = "ti,am654-sr1-icssg-prueth"; 49 firmware-name = "ti-pruss/am65x-pru0-prueth-fw.elf", 50 "ti-pruss/am65x-rtu0-prueth-fw.elf", 51 "ti-pruss/am65x-pru1-prueth-fw.elf", 52 "ti-pruss/am65x-rtu1-prueth-fw.elf";
|
| H A D | k3-am654-idk.dtso | 25 compatible = "ti,am654-icssg-prueth"; 30 firmware-name = "ti-pruss/am65x-sr2-pru0-prueth-fw.elf", 31 "ti-pruss/am65x-sr2-rtu0-prueth-fw.elf", 32 "ti-pruss/am65x-sr2-txpru0-prueth-fw.elf", 33 "ti-pruss/am65x-sr2-pru1-prueth-fw.elf", 34 "ti-pruss/am65x-sr2-rtu1-prueth-fw.elf", 35 "ti-pruss/am65x-sr2-txpru1-prueth-fw.elf"; 92 compatible = "ti,am654-icssg-prueth"; 97 firmware-name = "ti-pruss/am65x-sr2-pru0-prueth-fw.elf", 98 "ti-pruss/am65x-sr2-rtu0-prueth-fw.elf", [all …]
|
| H A D | k3-am654-icssg2.dtso | 22 compatible = "ti,am654-icssg-prueth"; 28 firmware-name = "ti-pruss/am65x-sr2-pru0-prueth-fw.elf", 29 "ti-pruss/am65x-sr2-rtu0-prueth-fw.elf", 30 "ti-pruss/am65x-sr2-txpru0-prueth-fw.elf", 31 "ti-pruss/am65x-sr2-pru1-prueth-fw.elf", 32 "ti-pruss/am65x-sr2-rtu1-prueth-fw.elf", 33 "ti-pruss/am65x-sr2-txpru1-prueth-fw.elf";
|
| H A D | k3-am642-phyboard-electra-peb-c-010.dtso | 20 compatible = "ti,am642-icssg-prueth"; 38 firmware-name = "ti-pruss/am65x-sr2-pru0-prueth-fw.elf", 39 "ti-pruss/am65x-sr2-rtu0-prueth-fw.elf", 40 "ti-pruss/am65x-sr2-txpru0-prueth-fw.elf", 41 "ti-pruss/am65x-sr2-pru1-prueth-fw.elf", 42 "ti-pruss/am65x-sr2-rtu1-prueth-fw.elf", 43 "ti-pruss/am65x-sr2-txpru1-prueth-fw.elf";
|
| H A D | k3-am642-phyboard-electra-rdk.dts | 62 compatible = "ti,am642-icssg-prueth"; 71 firmware-name = "ti-pruss/am65x-sr2-pru0-prueth-fw.elf", 72 "ti-pruss/am65x-sr2-rtu0-prueth-fw.elf", 73 "ti-pruss/am65x-sr2-txpru0-prueth-fw.elf", 74 "ti-pruss/am65x-sr2-pru1-prueth-fw.elf", 75 "ti-pruss/am65x-sr2-rtu1-prueth-fw.elf", 76 "ti-pruss/am65x-sr2-txpru1-prueth-fw.elf";
|
| H A D | k3-am642-sr-som.dtsi | 29 compatible = "ti,am642-icssg-prueth"; 35 firmware-name = "ti-pruss/am65x-sr2-pru0-prueth-fw.elf", 36 "ti-pruss/am65x-sr2-rtu0-prueth-fw.elf", 37 "ti-pruss/am65x-sr2-txpru0-prueth-fw.elf", 38 "ti-pruss/am65x-sr2-pru1-prueth-fw.elf", 39 "ti-pruss/am65x-sr2-rtu1-prueth-fw.elf", 40 "ti-pruss/am65x-sr2-txpru1-prueth-fw.elf";
|
| H A D | k3-am65-iot2050-common.dtsi | 126 compatible = "ti,am654-icssg-prueth"; 133 firmware-name = "ti-pruss/am65x-sr2-pru0-prueth-fw.elf", 134 "ti-pruss/am65x-sr2-rtu0-prueth-fw.elf", 135 "ti-pruss/am65x-sr2-txpru0-prueth-fw.elf", 136 "ti-pruss/am65x-sr2-pru1-prueth-fw.elf", 137 "ti-pruss/am65x-sr2-rtu1-prueth-fw.elf", 138 "ti-pruss/am65x-sr2-txpru1-prueth-fw.elf";
|
| H A D | k3-am642-evm.dts | 193 compatible = "ti,am642-icssg-prueth"; 198 firmware-name = "ti-pruss/am64x-sr2-pru0-prueth-fw.elf", 199 "ti-pruss/am64x-sr2-rtu0-prueth-fw.elf", 200 "ti-pruss/am64x-sr2-txpru0-prueth-fw.elf", 201 "ti-pruss/am64x-sr2-pru1-prueth-fw.elf", 202 "ti-pruss/am64x-sr2-rtu1-prueth-fw.elf", 203 "ti-pruss/am64x-sr2-txpru1-prueth-fw.elf";
|
| H A D | k3-am642-tqma64xxl-mbax4xxl.dts | 77 compatible = "ti,am642-icssg-prueth"; 97 firmware-name = "ti-pruss/am64x-sr2-pru0-prueth-fw.elf", 98 "ti-pruss/am64x-sr2-rtu0-prueth-fw.elf", 99 "ti-pruss/am64x-sr2-txpru0-prueth-fw.elf", 100 "ti-pruss/am64x-sr2-pru1-prueth-fw.elf", 101 "ti-pruss/am64x-sr2-rtu1-prueth-fw.elf", 102 "ti-pruss/am64x-sr2-txpru1-prueth-fw.elf"; 221 /* phy-mode is fixed up to rgmii-rxid by prueth driver to account for
|