31 "Probing ID registers at 0x%lx for a PL111\n",
32 PL111_REG_CLCD_PERIPH_ID_0
36 if ((
MmioRead8 (PL111_REG_CLCD_PERIPH_ID_0) == PL111_CLCD_PERIPH_ID_0) &&
37 (
MmioRead8 (PL111_REG_CLCD_PERIPH_ID_1) == PL111_CLCD_PERIPH_ID_1) &&
38 ((
MmioRead8 (PL111_REG_CLCD_PERIPH_ID_2) & 0xf) == PL111_CLCD_PERIPH_ID_2) &&
39 (
MmioRead8 (PL111_REG_CLCD_PERIPH_ID_3) == PL111_CLCD_PERIPH_ID_3) &&
40 (
MmioRead8 (PL111_REG_CLCD_P_CELL_ID_0) == PL111_CLCD_P_CELL_ID_0) &&
41 (
MmioRead8 (PL111_REG_CLCD_P_CELL_ID_1) == PL111_CLCD_P_CELL_ID_1) &&
42 (
MmioRead8 (PL111_REG_CLCD_P_CELL_ID_2) == PL111_CLCD_P_CELL_ID_2) &&
43 (
MmioRead8 (PL111_REG_CLCD_P_CELL_ID_3) == PL111_CLCD_P_CELL_ID_3))
63 MmioWrite32 (PL111_REG_LCD_UP_BASE, (UINT32)VramBaseAddress);
98 if (EFI_ERROR (Status)) {
103 ASSERT (Horizontal !=
NULL);
104 ASSERT (Vertical !=
NULL);
107 if (EFI_ERROR (Status)) {
114 if (EFI_ERROR (Status)) {
120 MmioAnd32 (PL111_REG_LCD_CONTROL, ~PL111_CTRL_LCD_EN);
124 PL111_REG_LCD_TIMING_0,
126 Horizontal->BackPorch,
127 Horizontal->FrontPorch,
129 Horizontal->Resolution
134 PL111_REG_LCD_TIMING_1,
137 Vertical->FrontPorch,
144 PL111_REG_LCD_TIMING_2,
145 CLK_SIG_POLARITY (Horizontal->Resolution)
151 LcdControl = PL111_CTRL_LCD_EN | PL111_CTRL_LCD_BPP (LcdBpp) |
152 PL111_CTRL_LCD_TFT | PL111_CTRL_LCD_PWR;
154 LcdControl |= PL111_CTRL_BGR;
170 MmioAnd32 (PL111_REG_LCD_CONTROL, ~PL111_CTRL_LCD_EN);
UINT32 EFIAPI MmioAnd32(IN UINTN Address, IN UINT32 AndData)
UINT8 EFIAPI MmioRead8(IN UINTN Address)
UINT32 EFIAPI MmioWrite32(IN UINTN Address, IN UINT32 Value)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
@ PixelBlueGreenRedReserved8BitPerColor
EFI_STATUS LcdSetMode(IN UINT32 ModeNumber)
EFI_STATUS LcdIdentify(VOID)
EFI_STATUS LcdInitialize(IN EFI_PHYSICAL_ADDRESS VramBaseAddress)
UINT64 EFI_PHYSICAL_ADDRESS
EFI_GRAPHICS_PIXEL_FORMAT PixelFormat