diff --git a/bsp/imxrt/libraries/drivers/SConscript b/bsp/imxrt/libraries/drivers/SConscript index 46546243f5..60d9654238 100644 --- a/bsp/imxrt/libraries/drivers/SConscript +++ b/bsp/imxrt/libraries/drivers/SConscript @@ -50,6 +50,8 @@ if GetDepend('BSP_USING_ETH'): if GetDepend('BSP_USING_PHY'): src += ['drv_mdio.c'] + if GetDepend('PHY_USING_KSZ8081'): + src += ['drv_ksz8081.c'] if GetDepend('BSP_USING_AUDIO'): src += ['drv_sai.c'] diff --git a/bsp/imxrt/libraries/peripherals/phyksz8081.c b/bsp/imxrt/libraries/drivers/drv_ksz8081.c similarity index 99% rename from bsp/imxrt/libraries/peripherals/phyksz8081.c rename to bsp/imxrt/libraries/drivers/drv_ksz8081.c index 3735965663..f922f5f840 100644 --- a/bsp/imxrt/libraries/peripherals/phyksz8081.c +++ b/bsp/imxrt/libraries/drivers/drv_ksz8081.c @@ -358,12 +358,10 @@ static struct rt_phy_ops phy_ops = static int rt_phy_ksz8081_register( void ) { phy_ksz8081.ops = &phy_ops; - rt_hw_phy_register(&phy_ksz8081, "rtt-phy"); + rt_hw_phy_register(&phy_ksz8081, "ksz8081"); return 1; } INIT_DEVICE_EXPORT(rt_phy_ksz8081_register); - - #endif /* PHY_USING_KSZ8081 */ diff --git a/bsp/imxrt/libraries/peripherals/SConscript b/bsp/imxrt/libraries/peripherals/SConscript deleted file mode 100644 index 6d41c2b7c9..0000000000 --- a/bsp/imxrt/libraries/peripherals/SConscript +++ /dev/null @@ -1,16 +0,0 @@ -from building import * - -src = [] -cwd = [] -CPPDEFINES = [] - -cwd = GetCurrentDir() - -if GetDepend('BSP_USING_PHY') and GetDepend('PHY_USING_KSZ8081'): - src += ['phyksz8081.c'] - -path = [cwd] - -group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES=CPPDEFINES) - -Return('group')