dwmac ethernet driver(stmmac)

   日期:2020-05-11     浏览:589    评论:0    
核心提示:1. 官方介绍stmmac which is the official driver for Synopsys Ethernet QoS 10/100/1000 and QoSIP in Linux. The cstmmac driver was originally developed by STMicroelectronics, one of SynopsysEthernet IP customers, supporting MAC 10/100/1000. The source c...git

 

1. 官方介绍

stmmac which is the official driver for Synopsys Ethernet QoS 10/100/1000 and QoS

IP  in Linux. The cstmmac driver was originally developed by STMicroelectronics, one of Synopsys

Ethernet IP customers, supporting MAC 10/100/1000. The source code for cstmmac driver can

be found in Linux Kernel under the folder cdrivers/net/ethernet/stmicro/stmmac 

As an open source project, the driver started receiving new features and bug fixes and started

being adopted by other Synopsys Ethernet IP clients. Finally, in 2016 the QoS IP support was

added to the driver.

 

 

The stmmac driver has an architecture that increases hardware/IP abstraction as we go up through the layers.

Starting from the bottom layer, each IP has its isolated ecosystem consisting of a core (MAC

related operations), DMA (DMA related operations), DESCS (descriptor related operations) and

common libs blocks. In the case of MAC 10/100 and MAC 1000, they share the same lib file,

because they have a set of common registers and operations.

 

The stmmac driver supports two types of socket buffers: ring and chain. Each implementation

is done in ring_mode and chain_mode files. For the common MAC Management Counters

(MMC) operations, the driver has the mmc_core file that includes all the necessary operations

for this purpose.

 

The middle layer is the common layer for all the IPs. Based on configuration, this layer will

choose the IP block to use. The main file is stmmac_main where the programmer can find the

typical Ethernet driver functions like *_open(), *_xmit() and other relevant ones.

stmmac_main is the maestro of stmmac , picking each block operations (MDIO, PTP,

Ethtool and IP functions) and putting them in a common operational flow.

 

The upper layer is composed by stmmac_platform and stmmac_pci files. The platform

related file contains a wide set of device tree parsing functions serving as a common device tree

interpreter for all specific-platform drivers (top layer). The PCI related file is an end-use glue

driver, to be used when this type of bus is needed.

 

In the top layer we can find a generic driver and a set of custom platform glue drivers that

implement operations related to a certain SoC. All these drivers typically use Release dwc_enet_qos_software_5.10a

 

stmmac_platform device tree parsing features and then call stmmac_main methods to

follow the normal flow.

In order to add support for Ethernet QoS 5.xx IP Cores a new file was introduced ( dwmac5 )

which implements all the relevant configuration and handling of 5.xx features. For TSN

functions stmmac_tsn was introduced, serving as interface with the TSN subsystem.

 

 

2. driver path

linux-linaro-stable-lsk/drivers/net/ethernet/stmicro/stmmac

 

 

3. dwmac5

kernel4.14只支持dwmac-4.1,kernel 4.17开始支持dwmac-5.10,即eqos5.1,具体如下:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/net/ethernet/stmicro?id=8bf993a5877e8a0a2f6338085f2dee7c23f524a3

 

 

 

 

 

 
打赏
 本文转载自:网络 
所有权利归属于原作者,如文章来源标示错误或侵犯了您的权利请联系微信13520258486
更多>最近资讯中心
更多>最新资讯中心
更多>相关资讯中心
0相关评论

推荐图文
推荐资讯中心
点击排行
最新信息
新手指南
采购商服务
供应商服务
交易安全
关注我们
手机网站:
新浪微博:
微信关注:

13520258486

周一至周五 9:00-18:00
(其他时间联系在线客服)

24小时在线客服