diff options
author | Ryan Harkin <ryan.harkin@linaro.org> | 2016-05-11 09:23:59 +0100 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-05-11 11:39:53 +0200 |
commit | 6336850c910f72dc1ff2ec1436e0c3b8a2f5443a (patch) | |
tree | 988697d15b8ef424ed417afb206c400ef3ad7a1a /EmbeddedPkg | |
parent | 321151fedb3013fe3a588ee7a4fe6639ceb29c7e (diff) | |
download | edk2-6336850c910f72dc1ff2ec1436e0c3b8a2f5443a.tar.gz edk2-6336850c910f72dc1ff2ec1436e0c3b8a2f5443a.tar.bz2 edk2-6336850c910f72dc1ff2ec1436e0c3b8a2f5443a.zip |
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 <ryan.harkin@linaro.org>
[ardb: change default feature mask so that full duplex is disabled]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'EmbeddedPkg')
-rw-r--r-- | EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf | 1 | ||||
-rw-r--r-- | EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c | 1 | ||||
-rw-r--r-- | EmbeddedPkg/EmbeddedPkg.dec | 3 |
3 files changed, 5 insertions, 0 deletions
diff --git a/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf b/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf index 3c2246fb8a..055a055299 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 50c004d728..ea308afe6b 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);
diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec index 7bcb1332df..775d863c5f 100644 --- a/EmbeddedPkg/EmbeddedPkg.dec +++ b/EmbeddedPkg/EmbeddedPkg.dec @@ -147,6 +147,9 @@ gEmbeddedTokenSpaceGuid.PcdLan9118DxeBaseAddress|0x0|UINT32|0x00000025
gEmbeddedTokenSpaceGuid.PcdLan9118DefaultMacAddress|0x0|UINT64|0x00000026
gEmbeddedTokenSpaceGuid.PcdLan9118DefaultNegotiationTimeout|4000|UINT32|0x00000027
+ # The default feature mask below disables full duplex negotiation, since full
+ # duplex operation is suspected to be broken in the driver.
+ gEmbeddedTokenSpaceGuid.PcdLan9118NegotiationFeatureMask|0xFFFFFEBF|UINT32|0x00000028
#
# Android FastBoot
|