From 84da9b93933ceb08e9407185294a96aa4ab5d580 Mon Sep 17 00:00:00 2001 From: GuEe-GUI <2991707448@qq.com> Date: Wed, 22 Jul 2026 22:06:56 +0800 Subject: [dm][phy] improve PHY v2 support and add RTL8211F driver Signed-off-by: GuEe-GUI <2991707448@qq.com> --- components/drivers/phy/SConscript | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'components/drivers/phy/SConscript') diff --git a/components/drivers/phy/SConscript b/components/drivers/phy/SConscript index ba227c72d4..2bf716b8a7 100644 --- a/components/drivers/phy/SConscript +++ b/components/drivers/phy/SConscript @@ -1,17 +1,23 @@ from building import * -cwd = GetCurrentDir() +group = [] + +if not GetDepend(['RT_USING_PHY']) and not GetDepend(['RT_USING_PHY_V2']): + Return('group') + +cwd = GetCurrentDir() CPPPATH = [cwd, cwd + '/../include'] -src = Glob('*.c') -if GetDepend('RT_USING_OFW') == False: - SrcRemove(src, ['ofw.c']) -if GetDepend('RT_USING_PHY_V2') == False: - SrcRemove(src, ['general.c','mdio.c','ofw.c']) +src = ['phy.c'] + +if GetDepend(['RT_USING_PHY_V2']): + src += ['general.c', 'mdio.c'] + + if GetDepend(['RT_USING_OFW']): + src += ['ofw.c'] -if GetDepend('RT_USING_PHY_V2') == False: - if GetDepend('RT_USING_PHY') == False: - SrcRemove(src, ['phy.c']) + if GetDepend(['RT_PHY_V2_REALTEK']): + src += ['phy-realtek.c'] group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH) -- cgit v1.3.1