diff options
author | mdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-12-20 01:32:07 +0000 |
---|---|---|
committer | mdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-12-20 01:32:07 +0000 |
commit | f2ad94972317bb03be998a7b9211d07edb96ad31 (patch) | |
tree | 8e1e67053c06ded0afd0982e07d6767a243824dd | |
parent | 467d15ae63fb9d36904f06f11cde6c4cd5c297a2 (diff) | |
download | edk2-platforms-f2ad94972317bb03be998a7b9211d07edb96ad31.tar.xz |
Fix ICC build issues
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11185 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c index dfccbc3847..82dc7bb078 100644 --- a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c +++ b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c @@ -128,9 +128,10 @@ SerialPortInitialize ( if ((SerialPortReadRegister (R_UART_LCR) & 0x3F) != (PcdGet8 (PcdSerialLineControl) & 0x3F)) {
Initialized = FALSE;
}
- SerialPortWriteRegister (R_UART_LCR, SerialPortReadRegister (R_UART_LCR) | B_UART_LCR_DLAB);
- Divisor = (SerialPortReadRegister (R_UART_BAUD_HIGH) << 8) | SerialPortReadRegister (R_UART_BAUD_LOW);
- SerialPortWriteRegister (R_UART_LCR, SerialPortReadRegister (R_UART_LCR) & ~B_UART_LCR_DLAB);
+ SerialPortWriteRegister (R_UART_LCR, (UINT8)(SerialPortReadRegister (R_UART_LCR) | B_UART_LCR_DLAB));
+ Divisor = SerialPortReadRegister (R_UART_BAUD_HIGH) << 8;
+ Divisor |= SerialPortReadRegister (R_UART_BAUD_LOW);
+ SerialPortWriteRegister (R_UART_LCR, (UINT8)(SerialPortReadRegister (R_UART_LCR) & ~B_UART_LCR_DLAB));
if (Divisor != 115200 / PcdGet32 (PcdSerialBaudRate)) {
Initialized = FALSE;
}
@@ -150,13 +151,13 @@ SerialPortInitialize ( // Clear DLAB and configure Data Bits, Parity, and Stop Bits.
// Strip reserved bits from PcdSerialLineControl
//
- SerialPortWriteRegister (R_UART_LCR, PcdGet8 (PcdSerialLineControl) & 0x3F);
+ SerialPortWriteRegister (R_UART_LCR, (UINT8)(PcdGet8 (PcdSerialLineControl) & 0x3F));
//
// Enable and reset FIFOs
// Strip reserved bits from PcdSerialFifoControl
//
- SerialPortWriteRegister (R_UART_FCR, PcdGet8 (PcdSerialFifoControl) & 0x17);
+ SerialPortWriteRegister (R_UART_FCR, (UINT8)(PcdGet8 (PcdSerialFifoControl) & 0x17));
//
// Put Modem Control Register(MCR) into its reset state of 0x00.
@@ -265,7 +266,7 @@ SerialPortRead ( return 0;
}
- Mcr = SerialPortReadRegister (R_UART_MCR) & ~B_UART_MCR_RTS;
+ Mcr = (UINT8)(SerialPortReadRegister (R_UART_MCR) & ~B_UART_MCR_RTS);
for (Result = 0; NumberOfBytes-- != 0; Result++, Buffer++) {
//
@@ -276,7 +277,7 @@ SerialPortRead ( //
// Set RTS to let the peer send some data
//
- SerialPortWriteRegister (R_UART_MCR, Mcr | B_UART_MCR_RTS);
+ SerialPortWriteRegister (R_UART_MCR, (UINT8)(Mcr | B_UART_MCR_RTS));
}
}
if (PcdGetBool (PcdSerialUseHardwareFlowControl)) {
@@ -320,7 +321,7 @@ SerialPortPoll ( //
// Clear RTS to prevent peer from sending data
//
- SerialPortWriteRegister (R_UART_MCR, SerialPortReadRegister (R_UART_MCR) & ~B_UART_MCR_RTS);
+ SerialPortWriteRegister (R_UART_MCR, (UINT8)(SerialPortReadRegister (R_UART_MCR) & ~B_UART_MCR_RTS));
}
return TRUE;
}
@@ -329,7 +330,7 @@ SerialPortPoll ( //
// Set RTS to let the peer send some data
//
- SerialPortWriteRegister (R_UART_MCR, SerialPortReadRegister (R_UART_MCR) | B_UART_MCR_RTS);
+ SerialPortWriteRegister (R_UART_MCR, (UINT8)(SerialPortReadRegister (R_UART_MCR) | B_UART_MCR_RTS));
}
return FALSE;
|