日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

dwmac ethernet driver(stmmac)

發(fā)布時間:2023/12/15 编程问答 41 豆豆
生活随笔 收集整理的這篇文章主要介紹了 dwmac ethernet driver(stmmac) 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

?

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

?

?

?

?

?

總結

以上是生活随笔為你收集整理的dwmac ethernet driver(stmmac)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內容還不錯,歡迎將生活随笔推薦給好友。