From 17518b4a7d08bc88da8a3f1a15740ed6c703763a Mon Sep 17 00:00:00 2001 From: Augusto Fraga Giachero Date: Wed, 7 Aug 2019 08:59:38 -0600 Subject: [PATCH] arch/arm/src/lpc17xx_40xx/Kconfig: Add missing LPC17_40_PHY_CEMENT_DISABLE config to the lpc17xx Kconfig file. For some reason this config wasn't referenced anywhere else except in arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c. --- arch/arm/src/lpc17xx_40xx/Kconfig | 5 +++++ arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm/src/lpc17xx_40xx/Kconfig b/arch/arm/src/lpc17xx_40xx/Kconfig index 6c1eda91ffe..ec9a595ff60 100644 --- a/arch/arm/src/lpc17xx_40xx/Kconfig +++ b/arch/arm/src/lpc17xx_40xx/Kconfig @@ -734,6 +734,11 @@ config LPC17_40_PHY_AUTONEG ---help--- Enable auto-negotiation +config LPC17_40_PHY_CEMENT_DISABLE + bool "Don't re-write the PHY mode" + ---help--- + Re-writing the PHY mode might cause problems with some PHYs. + config LPC17_40_PHY_SPEED100 bool "100Mbit/Sec" depends on !LPC17_40_PHY_AUTONEG diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c index 6d673c111a1..7c3c9c0321a 100644 --- a/arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c +++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c @@ -2869,13 +2869,13 @@ static inline int lpc17_40_phyinit(struct lpc17_40_driver_s *priv) /* Disable auto-configuration. Set the fixed speed/duplex mode. * (probably more than little redundant). * - * REVISIT: Revisit the following CONFIG_PHY_CEMENT_DISABLE work-around. + * REVISIT: Revisit the following CONFIG_LPC17_40_PHY_CEMENT_DISABLE work-around. * It is should not needed if CONFIG_LPC17_40_PHY_AUTONEG is defined and is known * cause a problem for at least one PHY (DP83848I PHY). It might be * safe just to remove this elided coded for all PHYs. */ -#ifndef CONFIG_PHY_CEMENT_DISABLE +#ifndef CONFIG_LPC17_40_PHY_CEMENT_DISABLE ret = lpc17_40_phymode(phyaddr, priv->lp_mode); #endif lpc17_40_showmii(phyaddr, "After final configuration");