From acbb7a39bb5f880b36da333684235cc673523336 Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Mon, 31 Jul 2023 09:50:22 +0000 Subject: [PATCH] ethernet: smsc91x: select MDIO This driver implements an MDIO device. Enable the MDIO driver to avoid a build error for: orphan section `._device.static.3_CONFIG_MDIO_INIT_PRIORITY_' Also set the proper compatible in mdio_shell so that the ethernet tests build correctly. Signed-off-by: Fabio Baltieri --- drivers/ethernet/Kconfig.smsc91x | 1 + drivers/mdio/mdio_shell.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/ethernet/Kconfig.smsc91x b/drivers/ethernet/Kconfig.smsc91x index d384c220b3c..81059014057 100644 --- a/drivers/ethernet/Kconfig.smsc91x +++ b/drivers/ethernet/Kconfig.smsc91x @@ -5,5 +5,6 @@ config ETH_SMSC91X bool "SMSC91x Ethernet driver" default y depends on DT_HAS_SMSC_LAN91C111_ENABLED + select MDIO help Enable driver for SMSC/LAN91x family of chips. diff --git a/drivers/mdio/mdio_shell.c b/drivers/mdio/mdio_shell.c index a89cdb770bf..090cde16ece 100644 --- a/drivers/mdio/mdio_shell.c +++ b/drivers/mdio/mdio_shell.c @@ -22,6 +22,8 @@ LOG_MODULE_REGISTER(mdio_shell, CONFIG_LOG_DEFAULT_LEVEL); #define DT_DRV_COMPAT nxp_s32_netc_emdio #elif DT_HAS_COMPAT_STATUS_OKAY(adi_adin2111_mdio) #define DT_DRV_COMPAT adi_adin2111_mdio +#elif DT_HAS_COMPAT_STATUS_OKAY(smsc_lan91c111_mdio) +#define DT_DRV_COMPAT smsc_lan91c111_mdio #else #error "No known devicetree compatible match for MDIO shell" #endif