Repository navigation
[drivers][ethernet] Add Realtek RTL8125 PCI Ethernet driver #11944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
GuEe-GUI
wants to merge
1
commit into
RT-Thread:master
Choose a base branch
from
GuEe-GUI:rtl8125
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| config RT_ETHERNET_REALTEK | ||
| bool "Realtek RTL8125 Ethernet" | ||
| depends on RT_USING_PCI | ||
| depends on !RT_LWIP_USING_HW_CHECKSUM | ||
| default n | ||
| help | ||
| Enable the RT-Thread native PCI driver for Realtek RTL8125/RTL8162 | ||
| Ethernet controllers. The driver implements one TX/RX queue, interrupt | ||
| driven receive, descriptor-ring DMA, link change reporting, and | ||
| 10/100/1000/2500M auto-negotiation. | ||
| Requires lwIP software checksums; disable the global hardware checksum | ||
| option before enabling this driver. | ||
|
|
||
| config RT_REALTEK_PTP | ||
| bool "PTP supported" | ||
| depends on RT_ETHERNET_REALTEK | ||
| depends on RT_USING_PTP | ||
| default n | ||
| help | ||
| Register the RTL8125 hardware PTP clock with the RT-Thread PTP | ||
| framework. Supported operations include gettime, settime, adjtime, | ||
| adjfreq, and PPS where the selected hardware PTP block supports it. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| from building import * | ||
|
|
||
| group = [] | ||
|
|
||
| if not GetDepend(['RT_ETHERNET_REALTEK']): | ||
| Return('group') | ||
|
|
||
| cwd = GetCurrentDir() | ||
| CPPPATH = [cwd + '/../../include', cwd + '/../'] | ||
|
|
||
| src = ['r8125.c'] | ||
|
|
||
| if GetDepend(['RT_REALTEK_PTP']): | ||
| src += ['r8125_ptp.c'] | ||
|
|
||
| group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH) | ||
|
|
||
| Return('group') |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] 补上 DMA 依赖
这里需要加上
select RT_USING_DMA。目前可以选出RT_ETHERNET_REALTEK=y、RT_USING_DMA=n的配置,但驱动无条件调用rt_dma_alloc_coherent()和rt_dma_free_coherent()。DMA 关闭时,rtdevice.h不包含对应头文件,DMA 源文件也不参与构建,会导致编译或链接失败。RT_USING_PCI本身没有选中 DMA。