summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg/ArmVExpressPkg/Library
diff options
context:
space:
mode:
authorOlivier Martin <olivier.martin@arm.com>2013-08-19 17:35:18 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-08-19 17:35:18 +0000
commit48999d26c538a36c22333eb85ae2bf0275d09d07 (patch)
treec566b846624cca771b1cb639eab5d9a994ff5344 /ArmPlatformPkg/ArmVExpressPkg/Library
parent4ca88ec73f3da8b20ed3b2a26b4f2d8e95a05bed (diff)
downloadedk2-platforms-48999d26c538a36c22333eb85ae2bf0275d09d07.tar.xz
ArmPlatformPkg/ArmVExpressPkg: Add System ID of FVP models to VE LCD driver.
- Setting DVI fails on VE models. The FVP models behave the same. These have updated SYS ID numbers and they need to be added to the driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14564 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/ArmVExpressPkg/Library')
-rw-r--r--ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c b/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c
index f6f01fa20d..c6b37fca01 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c
+++ b/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c
@@ -1,6 +1,6 @@
/** @file
- Copyright (c) 2011, ARM Ltd. All rights reserved.<BR>
+ Copyright (c) 2011-2013, ARM Ltd. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -234,6 +234,7 @@ LcdPlatformSetMode (
UINT32 LcdSite;
UINT32 OscillatorId;
SYS_CONFIG_FUNCTION Function;
+ UINT32 SysId;
if (ModeNumber >= LcdPlatformGetMaxMode ()) {
return EFI_INVALID_PARAMETER;
@@ -261,14 +262,20 @@ LcdPlatformSetMode (
return Status;
}
- // On the ARM Versatile Express Model (RTSM) the value of the SysId is equal to 0x225F500.
- // Note: The DVI Mode is not modelled on RTSM
- if (MmioRead32 (ARM_VE_SYS_ID_REG) != 0x225F500) {
- // Set the DVI into the new mode
- Status = ArmPlatformSysConfigSet (SYS_CFG_DVIMODE, mResolutions[ModeNumber].Mode);
- if (EFI_ERROR(Status)) {
- ASSERT_EFI_ERROR (Status);
- return Status;
+ // The FVP foundation model does not have an LCD.
+ // On the FVP models the GIC variant in encoded in bits [15:12].
+ // Note: The DVI Mode is not modelled by RTSM or FVP models.
+ SysId = MmioRead32 (ARM_VE_SYS_ID_REG);
+ if (SysId != ARM_RTSM_SYS_ID) {
+ // Take out the FVP GIC variant to reduce the permutations.
+ SysId &= ~ARM_FVP_SYS_ID_VARIANT_MASK;
+ if (SysId != (ARM_FVP_BASE_SYS_ID & ~ARM_FVP_SYS_ID_VARIANT_MASK)) {
+ // Set the DVI into the new mode
+ Status = ArmPlatformSysConfigSet (SYS_CFG_DVIMODE, mResolutions[ModeNumber].Mode);
+ if (EFI_ERROR(Status)) {
+ ASSERT_EFI_ERROR (Status);
+ return Status;
+ }
}
}