/Linux-v6.1/drivers/net/ethernet/microchip/lan966x/ |
D | lan966x_vlan.c | 10 static int lan966x_vlan_get_status(struct lan966x *lan966x) in lan966x_vlan_get_status() argument 12 return lan_rd(lan966x, ANA_VLANACCESS); in lan966x_vlan_get_status() 15 static int lan966x_vlan_wait_for_completion(struct lan966x *lan966x) in lan966x_vlan_wait_for_completion() argument 20 lan966x, val, in lan966x_vlan_wait_for_completion() 26 static void lan966x_vlan_set_mask(struct lan966x *lan966x, u16 vid) in lan966x_vlan_set_mask() argument 28 u16 mask = lan966x->vlan_mask[vid]; in lan966x_vlan_set_mask() 38 lan966x, ANA_VLANTIDX); in lan966x_vlan_set_mask() 43 lan966x, ANA_VLAN_PORT_MASK); in lan966x_vlan_set_mask() 48 lan966x, ANA_VLANACCESS); in lan966x_vlan_set_mask() 50 if (lan966x_vlan_wait_for_completion(lan966x)) in lan966x_vlan_set_mask() [all …]
|
D | lan966x_ethtool.c | 293 static void lan966x_stats_update(struct lan966x *lan966x) in lan966x_stats_update() argument 297 mutex_lock(&lan966x->stats_lock); in lan966x_stats_update() 299 for (i = 0; i < lan966x->num_phys_ports; i++) { in lan966x_stats_update() 300 uint idx = i * lan966x->num_stats; in lan966x_stats_update() 303 lan966x, SYS_STAT_CFG); in lan966x_stats_update() 305 for (j = 0; j < lan966x->num_stats; j++) { in lan966x_stats_update() 306 u32 offset = lan966x->stats_layout[j].offset; in lan966x_stats_update() 308 lan966x_add_cnt(&lan966x->stats[idx++], in lan966x_stats_update() 309 lan_rd(lan966x, SYS_CNT(offset))); in lan966x_stats_update() 313 mutex_unlock(&lan966x->stats_lock); in lan966x_stats_update() [all …]
|
D | lan966x_main.c | 65 struct lan966x *lan966x) in lan966x_create_targets() argument 98 lan966x->regs[iomap->id] = begin[iomap->range] + iomap->offset; in lan966x_create_targets() 107 struct lan966x *lan966x = port->lan966x; in lan966x_port_unique_address() local 110 for (p = 0; p < lan966x->num_phys_ports; ++p) { in lan966x_port_unique_address() 111 port = lan966x->ports[p]; in lan966x_port_unique_address() 125 struct lan966x *lan966x = port->lan966x; in lan966x_port_set_mac_address() local 133 ret = lan966x_mac_cpu_learn(lan966x, addr->sa_data, HOST_PVID); in lan966x_port_set_mac_address() 144 ret = lan966x_mac_cpu_forget(lan966x, dev->dev_addr, HOST_PVID); in lan966x_port_set_mac_address() 169 struct lan966x *lan966x = port->lan966x; in lan966x_port_open() local 181 lan966x, ANA_PORT_CFG(port->chip_port)); in lan966x_port_open() [all …]
|
D | lan966x_fdma.c | 5 static int lan966x_fdma_channel_active(struct lan966x *lan966x) in lan966x_fdma_channel_active() argument 7 return lan_rd(lan966x, FDMA_CH_ACTIVE); in lan966x_fdma_channel_active() 13 struct lan966x *lan966x = rx->lan966x; in lan966x_fdma_rx_alloc_page() local 21 dma_addr = dma_map_page(lan966x->dev, page, 0, in lan966x_fdma_rx_alloc_page() 24 if (unlikely(dma_mapping_error(lan966x->dev, dma_addr))) in lan966x_fdma_rx_alloc_page() 38 struct lan966x *lan966x = rx->lan966x; in lan966x_fdma_rx_free_pages() local 48 dma_unmap_single(lan966x->dev, in lan966x_fdma_rx_free_pages() 78 struct lan966x *lan966x = rx->lan966x; in lan966x_fdma_rx_alloc() local 89 rx->dcbs = dma_alloc_coherent(lan966x->dev, size, &rx->dma, GFP_KERNEL); in lan966x_fdma_rx_alloc() 121 struct lan966x *lan966x = rx->lan966x; in lan966x_fdma_rx_free() local [all …]
|
D | lan966x_mac.c | 35 static int lan966x_mac_get_status(struct lan966x *lan966x) in lan966x_mac_get_status() argument 37 return lan_rd(lan966x, ANA_MACACCESS); in lan966x_mac_get_status() 40 static int lan966x_mac_wait_for_completion(struct lan966x *lan966x) in lan966x_mac_wait_for_completion() argument 45 lan966x, val, in lan966x_mac_wait_for_completion() 52 static void lan966x_mac_select(struct lan966x *lan966x, in lan966x_mac_select() argument 69 lan_wr(macl, lan966x, ANA_MACLDATA); in lan966x_mac_select() 70 lan_wr(mach, lan966x, ANA_MACHDATA); in lan966x_mac_select() 73 static int __lan966x_mac_learn_locked(struct lan966x *lan966x, int pgid, in __lan966x_mac_learn_locked() argument 79 lockdep_assert_held(&lan966x->mac_lock); in __lan966x_mac_learn_locked() 81 lan966x_mac_select(lan966x, mac, vid); in __lan966x_mac_learn_locked() [all …]
|
D | lan966x_fdb.c | 12 struct lan966x *lan966x; member 24 lan966x_fdb_find_entry(struct lan966x *lan966x, in lan966x_fdb_find_entry() argument 29 list_for_each_entry(fdb_entry, &lan966x->fdb_entries, list) { in lan966x_fdb_find_entry() 38 static void lan966x_fdb_add_entry(struct lan966x *lan966x, in lan966x_fdb_add_entry() argument 43 fdb_entry = lan966x_fdb_find_entry(lan966x, fdb_info); in lan966x_fdb_add_entry() 56 list_add_tail(&fdb_entry->list, &lan966x->fdb_entries); in lan966x_fdb_add_entry() 59 static bool lan966x_fdb_del_entry(struct lan966x *lan966x, in lan966x_fdb_del_entry() argument 64 list_for_each_entry_safe(fdb_entry, tmp, &lan966x->fdb_entries, in lan966x_fdb_del_entry() 81 void lan966x_fdb_write_entries(struct lan966x *lan966x, u16 vid) in lan966x_fdb_write_entries() argument 85 list_for_each_entry(fdb_entry, &lan966x->fdb_entries, list) { in lan966x_fdb_write_entries() [all …]
|
D | lan966x_mdb.c | 23 void lan966x_mdb_init(struct lan966x *lan966x) in lan966x_mdb_init() argument 25 INIT_LIST_HEAD(&lan966x->mdb_entries); in lan966x_mdb_init() 26 INIT_LIST_HEAD(&lan966x->pgid_entries); in lan966x_mdb_init() 29 static void lan966x_mdb_purge_mdb_entries(struct lan966x *lan966x) in lan966x_mdb_purge_mdb_entries() argument 33 list_for_each_entry_safe(mdb_entry, tmp, &lan966x->mdb_entries, list) { in lan966x_mdb_purge_mdb_entries() 39 static void lan966x_mdb_purge_pgid_entries(struct lan966x *lan966x) in lan966x_mdb_purge_pgid_entries() argument 43 list_for_each_entry_safe(pgid_entry, tmp, &lan966x->pgid_entries, list) { in lan966x_mdb_purge_pgid_entries() 49 void lan966x_mdb_deinit(struct lan966x *lan966x) in lan966x_mdb_deinit() argument 51 lan966x_mdb_purge_mdb_entries(lan966x); in lan966x_mdb_deinit() 52 lan966x_mdb_purge_pgid_entries(lan966x); in lan966x_mdb_deinit() [all …]
|
D | lan966x_ptp.c | 40 struct lan966x *lan966x = port->lan966x; in lan966x_ptp_hwtstamp_set() local 48 if (lan966x->bridge_mask & BIT(port->chip_port)) in lan966x_ptp_hwtstamp_set() 92 mutex_lock(&lan966x->ptp_lock); in lan966x_ptp_hwtstamp_set() 93 phc = &lan966x->phc[LAN966X_PHC_PORT]; in lan966x_ptp_hwtstamp_set() 95 mutex_unlock(&lan966x->ptp_lock); in lan966x_ptp_hwtstamp_set() 102 struct lan966x *lan966x = port->lan966x; in lan966x_ptp_hwtstamp_get() local 105 phc = &lan966x->phc[LAN966X_PHC_PORT]; in lan966x_ptp_hwtstamp_get() 160 struct lan966x *lan966x = port->lan966x; in lan966x_ptp_txtstamp_request() local 172 spin_lock_irqsave(&lan966x->ptp_ts_id_lock, flags); in lan966x_ptp_txtstamp_request() 173 if (lan966x->ptp_skbs == LAN966X_MAX_PTP_ID) { in lan966x_ptp_txtstamp_request() [all …]
|
D | lan966x_main.h | 123 struct lan966x *lan966x; member 165 struct lan966x *lan966x; member 192 struct lan966x *lan966x; member 206 struct lan966x { struct 297 struct lan966x *lan966x; member 336 bool lan966x_hw_offload(struct lan966x *lan966x, u32 port, struct sk_buff *skb); 343 int lan966x_stats_init(struct lan966x *lan966x); 353 int lan966x_mac_ip_learn(struct lan966x *lan966x, 358 int lan966x_mac_learn(struct lan966x *lan966x, int port, 362 int lan966x_mac_forget(struct lan966x *lan966x, [all …]
|
D | lan966x_lag.c | 7 static void lan966x_lag_set_aggr_pgids(struct lan966x *lan966x) in lan966x_lag_set_aggr_pgids() argument 9 u32 visited = GENMASK(lan966x->num_phys_ports - 1, 0); in lan966x_lag_set_aggr_pgids() 13 for (p = 0; p < lan966x->num_phys_ports; ++p) in lan966x_lag_set_aggr_pgids() 15 lan966x, ANA_PGID(p)); in lan966x_lag_set_aggr_pgids() 19 lan966x, ANA_PGID(p)); in lan966x_lag_set_aggr_pgids() 29 for (p = 0; p < lan966x->num_phys_ports; ++p) { in lan966x_lag_set_aggr_pgids() 30 struct lan966x_port *port = lan966x->ports[p]; in lan966x_lag_set_aggr_pgids() 39 for (lag = 0; lag < lan966x->num_phys_ports; ++lag) { in lan966x_lag_set_aggr_pgids() 40 struct net_device *bond = lan966x->ports[lag]->bond; in lan966x_lag_set_aggr_pgids() 48 bond_mask = lan966x_lag_get_mask(lan966x, bond); in lan966x_lag_set_aggr_pgids() [all …]
|
D | lan966x_port.c | 27 struct lan966x *lan966x = port->lan966x; in lan966x_port_link_down() local 35 lan966x, AFI_PORT_CFG(port->chip_port)); in lan966x_port_link_down() 39 val = lan_rd(lan966x, AFI_PORT_FRM_OUT(port->chip_port)); in lan966x_port_link_down() 56 lan966x, DEV_CLOCK_CFG(port->chip_port)); in lan966x_port_link_down() 61 lan966x, DEV_MAC_ENA_CFG(port->chip_port)); in lan966x_port_link_down() 66 lan966x, QSYS_SW_PORT_MODE(port->chip_port)); in lan966x_port_link_down() 71 lan966x, QSYS_PORT_MODE(port->chip_port)); in lan966x_port_link_down() 76 lan966x, SYS_PAUSE_CFG(port->chip_port)); in lan966x_port_link_down() 81 lan966x, QSYS_SW_PORT_MODE(port->chip_port)); in lan966x_port_link_down() 89 lan966x, SYS_FRONT_PORT_MODE(port->chip_port)); in lan966x_port_link_down() [all …]
|
D | lan966x_taprio.c | 48 struct lan966x *lan966x = port->lan966x; in lan966x_taprio_list_state_get() local 51 val = lan_rd(lan966x, QSYS_TAS_LST); in lan966x_taprio_list_state_get() 58 struct lan966x *lan966x = port->lan966x; in lan966x_taprio_list_index_state_get() local 62 lan966x, QSYS_TAS_CFG_CTRL); in lan966x_taprio_list_index_state_get() 70 struct lan966x *lan966x = port->lan966x; in lan966x_taprio_list_state_set() local 74 lan966x, QSYS_TAS_LST); in lan966x_taprio_list_state_set() 80 struct lan966x *lan966x = port->lan966x; in lan966x_taprio_list_shutdown() local 141 lan966x, QSYS_TAS_GS_CTRL); in lan966x_taprio_list_shutdown() 144 lan966x, QSYS_TAS_GATE_STATE); in lan966x_taprio_list_shutdown() 271 struct lan966x *lan966x = port->lan966x; in lan966x_taprio_gcl_free_get() local [all …]
|
D | lan966x_switchdev.c | 13 struct lan966x *lan966x = port->lan966x; in lan966x_port_set_mcast_ip_flood() local 16 flood_mask_ip = lan_rd(lan966x, ANA_PGID(pgid_ip)); in lan966x_port_set_mcast_ip_flood() 25 flood_mask = lan_rd(lan966x, ANA_PGID(PGID_MC)); in lan966x_port_set_mcast_ip_flood() 38 lan966x, ANA_PGID(pgid_ip)); in lan966x_port_set_mcast_ip_flood() 44 u32 val = lan_rd(port->lan966x, ANA_PGID(PGID_MC)); in lan966x_port_set_mcast_flood() 54 port->lan966x, ANA_PGID(PGID_MC)); in lan966x_port_set_mcast_flood() 65 u32 val = lan_rd(port->lan966x, ANA_PGID(PGID_UC)); in lan966x_port_set_ucast_flood() 75 port->lan966x, ANA_PGID(PGID_UC)); in lan966x_port_set_ucast_flood() 81 u32 val = lan_rd(port->lan966x, ANA_PGID(PGID_BC)); in lan966x_port_set_bcast_flood() 91 port->lan966x, ANA_PGID(PGID_BC)); in lan966x_port_set_bcast_flood() [all …]
|
D | lan966x_mirror.c | 11 struct lan966x *lan966x = port->lan966x; in lan966x_mirror_port_add() local 22 if (lan966x->mirror_mask[ingress] & BIT(port->chip_port)) { in lan966x_mirror_port_add() 28 if (lan966x->mirror_monitor && in lan966x_mirror_port_add() 29 lan966x->mirror_monitor != monitor_port) { in lan966x_mirror_port_add() 41 lan966x->mirror_mask[ingress] |= BIT(port->chip_port); in lan966x_mirror_port_add() 43 lan966x->mirror_monitor = monitor_port; in lan966x_mirror_port_add() 44 lan_wr(BIT(monitor_port->chip_port), lan966x, ANA_MIRRORPORTS); in lan966x_mirror_port_add() 49 lan966x, ANA_PORT_CFG(port->chip_port)); in lan966x_mirror_port_add() 51 lan_wr(lan966x->mirror_mask[0], lan966x, in lan966x_mirror_port_add() 55 lan966x->mirror_count++; in lan966x_mirror_port_add() [all …]
|
D | lan966x_police.c | 22 struct lan966x *lan966x = port->lan966x; in lan966x_police_add() local 40 lan966x, ANA_POL_MODE(pol_idx)); in lan966x_police_add() 43 lan966x, ANA_POL_PIR_STATE(pol_idx)); in lan966x_police_add() 47 lan966x, ANA_POL_PIR_CFG(pol_idx)); in lan966x_police_add() 55 struct lan966x *lan966x = port->lan966x; in lan966x_police_del() local 62 lan966x, ANA_POL_MODE(pol_idx)); in lan966x_police_del() 65 lan966x, ANA_POL_PIR_STATE(pol_idx)); in lan966x_police_del() 69 lan966x, ANA_POL_PIR_CFG(pol_idx)); in lan966x_police_del() 142 struct lan966x *lan966x = port->lan966x; in lan966x_police_port_add() local 169 lan966x, ANA_POL_CFG(port->chip_port)); in lan966x_police_port_add() [all …]
|
D | lan966x_cbs.c | 8 struct lan966x *lan966x = port->lan966x; in lan966x_cbs_add() local 42 lan966x, QSYS_SE_CFG(se_idx)); in lan966x_cbs_add() 46 lan966x, QSYS_CIR_CFG(se_idx)); in lan966x_cbs_add() 54 struct lan966x *lan966x = port->lan966x; in lan966x_cbs_del() local 63 lan966x, QSYS_SE_CFG(se_idx)); in lan966x_cbs_del() 67 lan966x, QSYS_CIR_CFG(se_idx)); in lan966x_cbs_del()
|
D | lan966x_tbf.c | 8 struct lan966x *lan966x = port->lan966x; in lan966x_tbf_add() local 46 lan966x, QSYS_SE_CFG(se_idx)); in lan966x_tbf_add() 50 lan966x, QSYS_CIR_CFG(se_idx)); in lan966x_tbf_add() 58 struct lan966x *lan966x = port->lan966x; in lan966x_tbf_del() local 78 lan966x, QSYS_SE_CFG(se_idx)); in lan966x_tbf_del() 82 lan966x, QSYS_CIR_CFG(se_idx)); in lan966x_tbf_del()
|
D | lan966x_ets.c | 22 struct lan966x *lan966x = port->lan966x; in lan966x_ets_add() local 65 lan966x, QSYS_SE_DWRR_CFG(se_idx, 7 - i)); in lan966x_ets_add() 72 lan966x, QSYS_SE_CFG(se_idx)); in lan966x_ets_add() 80 struct lan966x *lan966x = port->lan966x; in lan966x_ets_del() local 87 lan_wr(0, lan966x, QSYS_SE_DWRR_CFG(se_idx, i)); in lan966x_ets_del() 93 lan966x, QSYS_SE_CFG(se_idx)); in lan966x_ets_del()
|
D | lan966x_phylink.c | 74 struct lan966x *lan966x = port->lan966x; in lan966x_phylink_mac_link_down() local 83 lan966x, DEV_CLOCK_CFG(port->chip_port)); in lan966x_phylink_mac_link_down()
|
D | Makefile | 6 obj-$(CONFIG_LAN966X_SWITCH) += lan966x-switch.o 8 lan966x-switch-objs := lan966x_main.o lan966x_phylink.o lan966x_port.o \
|
/Linux-v6.1/arch/arm/boot/dts/ |
D | lan966x.dtsi | 3 * lan966x.dtsi - Device Tree Include file for Microchip LAN966 family SoC 16 #include <dt-bindings/clock/microchip,lan966x.h> 64 compatible = "microchip,lan966x-gck"; 99 compatible = "microchip,lan966x-switch"; 468 compatible = "microchip,lan966x-cpu-syscon", "syscon"; 503 compatible = "microchip,lan966x-switch-reset"; 511 compatible = "microchip,lan966x-pinctrl"; 525 compatible = "microchip,lan966x-miim"; 534 compatible = "microchip,lan966x-miim"; 592 compatible = "microchip,lan966x-serdes";
|
D | lan966x-pcb8290.dts | 3 * lan966x-pcb8290.dts - Device Tree file for LAN966X-PCB8290 board 10 #include "lan966x.dtsi" 11 #include "dt-bindings/phy/phy-lan966x-serdes.h"
|
D | lan966x-pcb8291.dts | 6 #include "lan966x.dtsi" 7 #include "dt-bindings/phy/phy-lan966x-serdes.h"
|
D | lan966x-kontron-kswitch-d10-mmt.dtsi | 7 #include "lan966x.dtsi" 8 #include "dt-bindings/phy/phy-lan966x-serdes.h"
|
/Linux-v6.1/drivers/net/ethernet/microchip/ |
D | Makefile | 12 obj-$(CONFIG_LAN966X_SWITCH) += lan966x/
|