summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>2019-03-06 20:52:53 +0530
committerThomas Abraham <thomas.abraham@arm.com>2019-03-08 10:30:14 +0530
commitbdb7cfdc2aebcd0558e7bb787709319cb683be24 (patch)
treefe9d4f9b00060e484112c222b3560d872e5bd233
parentef9aeb507b3946340cacb23ba5c002c16890c362 (diff)
ArmPlatformPkg: allow platforms to optionally disable HDLCD initializationRD-N1-E1-EDGE-19.1-RC0
Add a new PCD PcdArmHdlcdEnable to enable or disable the HDLCD library initilization. By default, it is set to TRUE. If set to false in the platform dsc file, the initilization of HDLCD library will be skipped. Change-Id: Ia77fe53019fdf7c60764e6814dfead3b5cceb323 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
-rw-r--r--ArmPlatformPkg/ArmPlatformPkg.dec5
-rw-r--r--ArmPlatformPkg/Library/HdLcd/HdLcd.c3
-rw-r--r--ArmPlatformPkg/Library/HdLcd/HdLcd.inf3
3 files changed, 8 insertions, 3 deletions
diff --git a/ArmPlatformPkg/ArmPlatformPkg.dec b/ArmPlatformPkg/ArmPlatformPkg.dec
index 44c00bd0c1..e61e38eac2 100644
--- a/ArmPlatformPkg/ArmPlatformPkg.dec
+++ b/ArmPlatformPkg/ArmPlatformPkg.dec
@@ -1,6 +1,6 @@
#/** @file
#
-# Copyright (c) 2011-2018, ARM Limited. All rights reserved.
+# Copyright (c) 2011-2019, ARM Limited. All rights reserved.
# Copyright (c) 2015, Intel Corporation. All rights reserved.
#
# This program and the accompanying materials
@@ -114,6 +114,9 @@
## If set, this will swap settings for HDLCD RED_SELECT and BLUE_SELECT registers
gArmPlatformTokenSpaceGuid.PcdArmHdLcdSwapBlueRedSelect|FALSE|BOOLEAN|0x00000045
+ ## If set to false by the platform, this will disable the HDLCD intialization
+ gArmPlatformTokenSpaceGuid.PcdArmHdLcdEnable|TRUE|BOOLEAN|0x00000046
+
[PcdsFixedAtBuild.common,PcdsDynamic.common]
## PL031 RealTimeClock
gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0|UINT32|0x00000024
diff --git a/ArmPlatformPkg/Library/HdLcd/HdLcd.c b/ArmPlatformPkg/Library/HdLcd/HdLcd.c
index 5396dde3ba..13e33d0d8e 100644
--- a/ArmPlatformPkg/Library/HdLcd/HdLcd.c
+++ b/ArmPlatformPkg/Library/HdLcd/HdLcd.c
@@ -172,7 +172,8 @@ LcdIdentify (
VOID
)
{
- if ((MmioRead32 (HDLCD_REG_VERSION) >> 16) == HDLCD_PRODUCT_ID) {
+ if (FixedPcdGetBool (PcdArmHdLcdEnable) &&
+ (MmioRead32 (HDLCD_REG_VERSION) >> 16) == HDLCD_PRODUCT_ID) {
return EFI_SUCCESS;
}
diff --git a/ArmPlatformPkg/Library/HdLcd/HdLcd.inf b/ArmPlatformPkg/Library/HdLcd/HdLcd.inf
index 7f2ba7bf1c..c9f0bd12a2 100644
--- a/ArmPlatformPkg/Library/HdLcd/HdLcd.inf
+++ b/ArmPlatformPkg/Library/HdLcd/HdLcd.inf
@@ -2,7 +2,7 @@
#
# Component description file for HDLCD module
#
-# Copyright (c) 2011-2018, ARM Ltd. All rights reserved.<BR>
+# Copyright (c) 2011-2019, 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
@@ -41,4 +41,5 @@
[FixedPcd]
gArmPlatformTokenSpaceGuid.PcdArmHdLcdBase
gArmPlatformTokenSpaceGuid.PcdArmHdLcdSwapBlueRedSelect
+ gArmPlatformTokenSpaceGuid.PcdArmHdLcdEnable