From b5daabdcd8a88db615a5d1dfb7b35b61b1ede0c5 Mon Sep 17 00:00:00 2001 From: Girish Pathak Date: Wed, 14 Feb 2018 11:52:46 +0000 Subject: ArmPlatformPkg: PL111Lcd: Combine two writes to LCDControl Currenty bit LcdPwr of the LCDControl register is enabled immediately after setting other bits of the LCDControl register. This two write sequence is unnecessary. This change removes this extra write by setting LcdPwr bit along with other bits of the LcdControl register. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Girish Pathak Signed-off-by: Evan Lloyd Reviewed-by: Leif Lindholm --- ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'ArmPlatformPkg') diff --git a/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c b/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c index 287e3ca272..465cb68454 100644 --- a/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c +++ b/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c @@ -137,11 +137,7 @@ LcdSetMode ( // PL111_REG_LCD_CONTROL LcdControl = PL111_CTRL_LCD_EN | PL111_CTRL_LCD_BPP (LcdBpp) | - PL111_CTRL_LCD_TFT | PL111_CTRL_BGR; - MmioWrite32 (PL111_REG_LCD_CONTROL, LcdControl); - - // Turn on power to the LCD Panel - LcdControl |= PL111_CTRL_LCD_PWR; + PL111_CTRL_LCD_TFT | PL111_CTRL_LCD_PWR | PL111_CTRL_BGR; MmioWrite32 (PL111_REG_LCD_CONTROL, LcdControl); return EFI_SUCCESS; -- cgit v1.2.3