From 6336850c910f72dc1ff2ec1436e0c3b8a2f5443a Mon Sep 17 00:00:00 2001 From: Ryan Harkin Date: Wed, 11 May 2016 09:23:59 +0100 Subject: EmbeddedPkg/Lan9118Dxe: add mask PCD to disable auto-negotiation features Add a PCD to allow the platform to mask in/out specific features of the LAN9118 device advertised during auto-negotiation. For example, the Juno ARM Development Platform doesn't support full duplex mode. This PCD will allow the platform developer to prevent the full duplex modes from being advertised. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ryan Harkin [ardb: change default feature mask so that full duplex is disabled] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Acked-by: Leif Lindholm --- EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf | 1 + EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c | 1 + 2 files changed, 2 insertions(+) (limited to 'EmbeddedPkg/Drivers') diff --git a/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf b/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf index 3c2246f..055a055 100644 --- a/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf +++ b/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf @@ -52,6 +52,7 @@ gEmbeddedTokenSpaceGuid.PcdLan9118DxeBaseAddress gEmbeddedTokenSpaceGuid.PcdLan9118DefaultMacAddress gEmbeddedTokenSpaceGuid.PcdLan9118DefaultNegotiationTimeout + gEmbeddedTokenSpaceGuid.PcdLan9118NegotiationFeatureMask [Depex] TRUE diff --git a/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c b/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c index 50c004d..ea308af 100644 --- a/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c +++ b/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c @@ -648,6 +648,7 @@ AutoNegotiate ( Features &= ~(PHYANA_PAUSE_OP_MASK); Features |= 3 << 10; } + Features &= FixedPcdGet32 (PcdLan9118NegotiationFeatureMask); // Write the features IndirectPHYWrite32 (PHY_INDEX_AUTO_NEG_ADVERT, Features); -- cgit v1.1