/linux/drivers/net/ethernet/ti/icssg/ |
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 64 config.rx_flow_id = cpu_to_le32(emac->rx_flow_id_base); /* flow id for host port */ in icssg_config_sr1() 65 config.rx_mgr_flow_id = cpu_to_le32(emac->rx_mgm_flow_id_base); /* for mgm ch */ in icssg_config_sr1() 76 emac->speed = SPEED_1000; in icssg_config_sr1() 77 emac->duplex = DUPLEX_FULL; in icssg_config_sr1() 80 static int emac_send_command_sr1(struct prueth_emac *emac, u32 cmd) in emac_send_command_sr1() argument 83 u32 pkt_len = sizeof(emac->cmd_data); in emac_send_command_sr1() 84 __le32 *data = emac->cmd_data; in emac_send_command_sr1() 91 netdev_dbg(emac->ndev, "Sending cmd %x\n", cmd); in emac_send_command_sr1() 94 mutex_lock(&emac->cmd_lock); in emac_send_command_sr1() [all …]
|
H A D | icssg_prueth.c | 53 static int emac_get_tx_ts(struct prueth_emac *emac, in emac_get_tx_ts() argument 56 struct prueth *prueth = emac->prueth; in emac_get_tx_ts() 57 int slice = prueth_emac_slice(emac); in emac_get_tx_ts() 73 static void tx_ts_work(struct prueth_emac *emac) in tx_ts_work() argument 84 ret = emac_get_tx_ts(emac, &tsr); in tx_ts_work() 89 !emac->tx_ts_skb[tsr.cookie]) { in tx_ts_work() 90 netdev_err(emac->ndev, "Invalid TX TS cookie 0x%x\n", in tx_ts_work() 95 skb = emac->tx_ts_skb[tsr.cookie]; in tx_ts_work() 96 emac->tx_ts_skb[tsr.cookie] = NULL; /* free slot */ in tx_ts_work() 98 netdev_err(emac->ndev, "Driver Bug! got NULL skb\n"); in tx_ts_work() [all …]
|
H A D | icssg_switchdev.c | 22 struct prueth_emac *emac; member 26 static int prueth_switchdev_stp_state_set(struct prueth_emac *emac, in prueth_switchdev_stp_state_set() argument 47 icssg_set_port_state(emac, emac_state); in prueth_switchdev_stp_state_set() 48 netdev_dbg(emac->ndev, "STP state: %u\n", emac_state); in prueth_switchdev_stp_state_set() 53 static int prueth_switchdev_attr_br_flags_set(struct prueth_emac *emac, in prueth_switchdev_attr_br_flags_set() argument 64 netdev_dbg(emac->ndev, "BR_MCAST_FLOOD: %d port %u\n", in prueth_switchdev_attr_br_flags_set() 65 emac_state, emac->port_id); in prueth_switchdev_attr_br_flags_set() 67 icssg_set_port_state(emac, emac_state); in prueth_switchdev_attr_br_flags_set() 85 struct prueth_emac *emac = netdev_priv(ndev); in prueth_switchdev_attr_set() local 88 netdev_dbg(ndev, "attr: id %u port: %u\n", attr->id, emac->port_id); in prueth_switchdev_attr_set() [all …]
|
H A D | icssg_ethtool.c | 14 struct prueth_emac *emac = netdev_priv(ndev); in emac_get_drvinfo() local 15 struct prueth *prueth = emac->prueth; in emac_get_drvinfo() 24 struct prueth_emac *emac = netdev_priv(ndev); in emac_get_msglevel() local 26 return emac->msg_enable; in emac_get_msglevel() 31 struct prueth_emac *emac = netdev_priv(ndev); in emac_set_msglevel() local 33 emac->msg_enable = value; in emac_set_msglevel() 71 struct prueth_emac *emac = netdev_priv(ndev); in emac_get_sset_count() local 74 if (emac->prueth->pa_stats) in emac_get_sset_count() 85 struct prueth_emac *emac = netdev_priv(ndev); in emac_get_strings() local 94 if (emac->prueth->pa_stats) in emac_get_strings() [all …]
|
H A D | icssg_common.c | 44 void prueth_cleanup_rx_chns(struct prueth_emac *emac, in prueth_cleanup_rx_chns() argument 56 void prueth_cleanup_tx_chns(struct prueth_emac *emac) in prueth_cleanup_tx_chns() argument 60 for (i = 0; i < emac->tx_ch_num; i++) { in prueth_cleanup_tx_chns() 61 struct prueth_tx_chn *tx_chn = &emac->tx_chns[i]; in prueth_cleanup_tx_chns() 77 void prueth_ndev_del_tx_napi(struct prueth_emac *emac, int num) in prueth_ndev_del_tx_napi() argument 82 struct prueth_tx_chn *tx_chn = &emac->tx_chns[i]; in prueth_ndev_del_tx_napi() 128 int emac_tx_complete_packets(struct prueth_emac *emac, int chn, in emac_tx_complete_packets() argument 131 struct net_device *ndev = emac->ndev; in emac_tx_complete_packets() 141 tx_chn = &emac->tx_chns[chn]; in emac_tx_complete_packets() 150 if (atomic_dec_and_test(&emac->tdown_cnt)) in emac_tx_complete_packets() [all …]
|
H A D | icssg_config.c | 110 static void icssg_config_mii_init_fw_offload(struct prueth_emac *emac) in icssg_config_mii_init_fw_offload() argument 112 struct prueth *prueth = emac->prueth; in icssg_config_mii_init_fw_offload() 113 int mii = prueth_emac_slice(emac); in icssg_config_mii_init_fw_offload() 128 if (emac->phy_if == PHY_INTERFACE_MODE_MII && mii == ICSS_MII1) in icssg_config_mii_init_fw_offload() 130 else if (emac->phy_if != PHY_INTERFACE_MODE_MII && mii == ICSS_MII0) in icssg_config_mii_init_fw_offload() 137 static void icssg_config_mii_init(struct prueth_emac *emac) in icssg_config_mii_init() argument 139 struct prueth *prueth = emac->prueth; in icssg_config_mii_init() 140 int slice = prueth_emac_slice(emac); in icssg_config_mii_init() 156 if (emac->phy_if == PHY_INTERFACE_MODE_MII && slice == ICSS_MII0) in icssg_config_mii_init() 158 else if (emac->phy_if != PHY_INTERFACE_MODE_MII && slice == ICSS_MII1) in icssg_config_mii_init() [all …]
|
H A D | icssg_stats.c | 20 void emac_update_hardware_stats(struct prueth_emac *emac) in emac_update_hardware_stats() argument 22 struct prueth *prueth = emac->prueth; in emac_update_hardware_stats() 23 int slice = prueth_emac_slice(emac); in emac_update_hardware_stats() 40 emac->stats[i] += val; in emac_update_hardware_stats() 42 emac->stats[i] -= tx_pkt_cnt * 8; in emac_update_hardware_stats() 51 emac->pa_stats[i] += val; in emac_update_hardware_stats() 58 struct prueth_emac *emac = container_of(work, struct prueth_emac, in icssg_stats_work_handler() local 60 emac_update_hardware_stats(emac); in icssg_stats_work_handler() 62 queue_delayed_work(system_long_wq, &emac->stats_work, in icssg_stats_work_handler() 63 msecs_to_jiffies((STATS_TIME_LIMIT_1G_MS * 1000) / emac->speed)); in icssg_stats_work_handler() [all …]
|
H A D | icssg_prueth.h | 95 * In emac mode there are 2 real ports i.e. 2 mac addrs. 117 struct prueth_emac *emac; member 146 /* data for each emac port */ 242 * @emac: private EMAC data structure 279 struct prueth_emac *emac[PRUETH_NUM_MACS]; member 325 static inline int prueth_emac_slice(struct prueth_emac *emac) in prueth_emac_slice() argument 327 switch (emac->port_id) { in prueth_emac_slice() 364 void icssg_config_ipg(struct prueth_emac *emac); 365 int icssg_config(struct prueth *prueth, struct prueth_emac *emac, 367 int icssg_set_port_state(struct prueth_emac *emac, [all …]
|
H A D | icssg_mii_cfg.c | 45 void icssg_update_rgmii_cfg(struct regmap *miig_rt, struct prueth_emac *emac) in icssg_update_rgmii_cfg() argument 48 int slice = prueth_emac_slice(emac); in icssg_update_rgmii_cfg() 53 if (emac->speed == SPEED_1000) in icssg_update_rgmii_cfg() 59 if (emac->speed == SPEED_10 && phy_interface_mode_is_rgmii(emac->phy_if)) in icssg_update_rgmii_cfg() 65 if (emac->duplex == DUPLEX_FULL) in icssg_update_rgmii_cfg()
|
/linux/drivers/net/ethernet/qualcomm/emac/ |
H A D | Makefile | 3 # Makefile for the Qualcomm Technologies, Inc. EMAC Gigabit Ethernet driver 6 obj-$(CONFIG_QCOM_EMAC) += qcom-emac.o 8 qcom-emac-objs := emac.o emac-mac.o emac-phy.o emac-sgmii.o emac-ethtool.o \ 9 emac-sgmii-fsm9900.o emac-sgmii-qdf2432.o \ 10 emac-sgmii-qdf2400.o
|
/linux/Documentation/devicetree/bindings/net/ |
H A D | allwinner,sun8i-a83t-emac.yaml | 4 $id: http://devicetree.org/schemas/net/allwinner,sun8i-a83t-emac.yaml# 7 title: Allwinner A83t EMAC 16 - const: allwinner,sun8i-a83t-emac 17 - const: allwinner,sun8i-h3-emac 19 - const: allwinner,sun8i-v3s-emac 20 - const: allwinner,sun50i-a64-emac 23 - allwinner,sun20i-d1-emac 24 - allwinner,sun50i-h6-emac 26 - const: allwinner,sun50i-a64-emac 49 Phandle to the device containing the EMAC or GMAC clock [all …]
|
H A D | ibm,emac.txt | 1 4xx/Axon EMAC ethernet nodes 3 The EMAC ethernet controller in IBM and AMCC 4xx chips, and also 7 below, the node for the OPB bus on which the EMAC sits must have a 10 i) The EMAC node itself 16 "ibm,emac-CHIP" where CHIP is the host ASIC (440gx, 17 405gp, Axon) and second is either "ibm,emac" or 18 "ibm,emac4". For Axon, thus, we have: "ibm,emac-axon", 20 - interrupts : <interrupt mapping for EMAC IRQ and WOL IRQ> 25 with this EMAC 27 with this EMAC [all …]
|
H A D | davinci_emac.txt | 1 * Texas Instruments Davinci EMAC 7 - compatible: "ti,davinci-dm6467-emac", "ti,am3517-emac" or 8 "ti,dm816-emac" 14 - interrupts: interrupt mapping for the davinci emac interrupts sources: 24 - ti,davinci-no-bd-ram: boolean, does EMAC have BD RAM? 30 eth0: emac@1e20000 { 31 compatible = "ti,davinci-dm6467-emac";
|
H A D | rockchip,emac.yaml | 4 $id: http://devicetree.org/schemas/net/rockchip,emac.yaml# 7 title: Rockchip RK3036/RK3066/RK3188 Ethernet Media Access Controller (EMAC) 15 - rockchip,rk3036-emac 16 - rockchip,rk3066-emac 17 - rockchip,rk3188-emac 42 Phandle to the syscon GRF used to control speed and mode for the EMAC. 69 const: rockchip,rk3036-emac 95 compatible = "rockchip,rk3188-emac";
|
H A D | qcom-emac.txt | 1 Qualcomm Technologies EMAC Gigabit Ethernet Controller 11 - compatible : Should be "qcom,fsm9900-emac". 20 - compatible : Should be "qcom,fsm9900-emac-sgmii" or "qcom,qdf2432-emac-sgmii". 36 compatible = "qcom,fsm9900-emac"; 61 compatible = "qcom,fsm9900-emac-sgmii"; 85 compatible = "qcom,fsm9900-emac"; 107 compatible = "qcom,qdf2432-emac-sgmii";
|
H A D | actions,owl-emac.yaml | 4 $id: http://devicetree.org/schemas/net/actions,owl-emac.yaml# 24 - const: actions,owl-emac 27 - actions,s500-emac 28 - const: actions,owl-emac 77 compatible = "actions,s500-emac", "actions,owl-emac";
|
H A D | allwinner,sun4i-a10-emac.yaml | 4 $id: http://devicetree.org/schemas/net/allwinner,sun4i-a10-emac.yaml# 7 title: Allwinner A10 EMAC Ethernet Controller 18 const: allwinner,sun4i-a10-emac 49 emac: ethernet@1c0b000 { 50 compatible = "allwinner,sun4i-a10-emac";
|
H A D | idt,3243x-emac.yaml | 4 $id: http://devicetree.org/schemas/net/idt,3243x-emac.yaml# 19 const: idt,3243x-emac 26 - const: emac 60 compatible = "idt,3243x-emac"; 65 reg-names = "emac", "dma_rx", "dma_tx";
|
/linux/drivers/net/ethernet/arc/ |
H A D | emac.h | 5 * Registers and bits definitions of ARC EMAC 27 #define TXPL_MASK (1 << 31) /* Force polling of BD by EMAC */ 38 #define OWN_MASK (1 << 31) /* 0-CPU or 1-EMAC owns buffer */ 52 /* ARC EMAC register set combines entries for MAC and MDIO */ 74 #define EMAC_BUFFER_SIZE 1536 /* EMAC buffer size */ 77 * struct arc_emac_bd - EMAC buffer descriptor (BD). 112 * struct arc_emac_priv - Storage of EMAC's private information. 116 * @regs: Base address of EMAC memory-mapped control registers. 126 * @last_rx_bd: Index of the last Rx BD we've got from EMAC. 166 * arc_reg_set - Sets EMAC register with provided value. [all …]
|
H A D | emac_main.c | 5 * Driver for the ARC EMAC 10100 (hardware revision 5) 24 #include "emac.h" 30 * @priv: Pointer to ARC EMAC private data structure. 82 * arc_emac_get_drvinfo - Get EMAC driver information. 107 * arc_emac_tx_clean - clears processed by EMAC Tx BDs. 206 /* Return ownership to EMAC */ in arc_emac_rx() 221 /* Return ownership to EMAC */ in arc_emac_rx() 234 /* Return ownership to EMAC */ in arc_emac_rx() 263 /* Return ownership to EMAC */ in arc_emac_rx() 294 * Under certain conditions EMAC stop reception of incoming packets and [all …]
|
H A D | Kconfig | 3 # ARC EMAC network device configuration 27 tristate "Rockchip EMAC support" 32 Support for Rockchip RK3036/RK3066/RK3188 EMAC ethernet controllers. 34 emac device driver. This driver is used for RK3036/RK3066/RK3188 35 EMAC ethernet controller.
|
/linux/net/ethtool/ |
H A D | stats.c | 528 struct ethtool_eth_mac_stats pmac, emac; in ethtool_aggregate_mac_stats() local 530 memset(&emac, 0xff, sizeof(emac)); in ethtool_aggregate_mac_stats() 532 emac.src = ETHTOOL_MAC_STATS_SRC_EMAC; in ethtool_aggregate_mac_stats() 535 ops->get_eth_mac_stats(dev, &emac); in ethtool_aggregate_mac_stats() 538 ethtool_aggregate_stats(mac_stats, &emac, &pmac, in ethtool_aggregate_mac_stats() 548 struct ethtool_eth_phy_stats pmac, emac; in ethtool_aggregate_phy_stats() local 550 memset(&emac, 0xff, sizeof(emac)); in ethtool_aggregate_phy_stats() 552 emac.src = ETHTOOL_MAC_STATS_SRC_EMAC; in ethtool_aggregate_phy_stats() 555 ops->get_eth_phy_stats(dev, &emac); in ethtool_aggregate_phy_stats() 558 ethtool_aggregate_stats(phy_stats, &emac, &pmac, in ethtool_aggregate_phy_stats() [all …]
|
/linux/drivers/pinctrl/sunxi/ |
H A D | pinctrl-sun5i.c | 24 SUNXI_FUNCTION(0x2, "emac"), /* ERXD3 */ 31 SUNXI_FUNCTION(0x2, "emac"), /* ERXD2 */ 38 SUNXI_FUNCTION(0x2, "emac"), /* ERXD1 */ 45 SUNXI_FUNCTION(0x2, "emac"), /* ERXD0 */ 52 SUNXI_FUNCTION(0x2, "emac"), /* ETXD3 */ 59 SUNXI_FUNCTION(0x2, "emac"), /* ETXD2 */ 66 SUNXI_FUNCTION(0x2, "emac"), /* ETXD1 */ 73 SUNXI_FUNCTION(0x2, "emac"), /* ETXD0 */ 80 SUNXI_FUNCTION(0x2, "emac"), /* ERXCK */ 88 SUNXI_FUNCTION(0x2, "emac"), /* ERXERR */ [all …]
|
H A D | pinctrl-sun50i-h6.c | 17 SUNXI_FUNCTION(0x2, "emac")), /* ERXD1 */ 19 SUNXI_FUNCTION(0x2, "emac")), /* ERXD0 */ 21 SUNXI_FUNCTION(0x2, "emac")), /* ECRS_DV */ 23 SUNXI_FUNCTION(0x2, "emac")), /* ERXERR */ 25 SUNXI_FUNCTION(0x2, "emac")), /* ETXD1 */ 27 SUNXI_FUNCTION(0x2, "emac")), /* ETXD0 */ 29 SUNXI_FUNCTION(0x2, "emac")), /* ETXCK */ 31 SUNXI_FUNCTION(0x2, "emac")), /* ETXEN */ 33 SUNXI_FUNCTION(0x2, "emac")), /* EMDC */ 35 SUNXI_FUNCTION(0x2, "emac")), /* EMDIO */ [all …]
|
/linux/drivers/net/ethernet/broadcom/ |
H A D | b44.h | 45 #define ISTAT_EMAC 0x04000000 /* EMAC Interrupt */ 126 #define B44_RXCONFIG 0x0400UL /* EMAC RX Config */ 136 #define B44_RXMAXLEN 0x0404UL /* EMAC RX Max Packet Length */ 137 #define B44_TXMAXLEN 0x0408UL /* EMAC TX Max Packet Length */ 138 #define B44_MDIO_CTRL 0x0410UL /* EMAC MDIO Control */ 141 #define B44_MDIO_DATA 0x0414UL /* EMAC MDIO Data */ 157 #define B44_EMAC_IMASK 0x0418UL /* EMAC Interrupt Mask */ 158 #define B44_EMAC_ISTAT 0x041CUL /* EMAC Interrupt Status */ 162 #define B44_CAM_DATA_LO 0x0420UL /* EMAC CAM Data Low */ 163 #define B44_CAM_DATA_HI 0x0424UL /* EMAC CAM Data High */ [all …]
|