/** @file\r
Serial driver for standard UARTS on an ISA bus.\r
\r
-Copyright (c) 2006 - 2009, Intel Corporation<BR>\r
+Copyright (c) 2006 - 2010, Intel Corporation<BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
Status = EFI_ALREADY_STARTED;\r
for (Index = 0; Index < EntryCount; Index++) {\r
- if (OpenInfoBuffer[Index].Attributes & EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER) {\r
+ if ((OpenInfoBuffer[Index].Attributes & EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER) != 0) {\r
Status = gBS->OpenProtocol (\r
OpenInfoBuffer[Index].ControllerHandle,\r
&gEfiSerialIoProtocolGuid,\r
break;\r
}\r
}\r
- FreePool (OpenInfoBuffer);\r
\r
- if (Index < EntryCount) {\r
- //\r
- // If gEfiSerialIoProtocolGuid is opened by one child device, return\r
- //\r
- return Status;\r
- }\r
- //\r
- // If gEfiSerialIoProtocolGuid is not opened by any child device,\r
- // go further to create child device handle based on RemainingDevicePath\r
- //\r
+ FreePool (OpenInfoBuffer);\r
+ return Status;\r
}\r
\r
if (RemainingDevicePath != NULL) {\r
// Check for default settings and fill in actual values.\r
//\r
if (BaudRate == 0) {\r
- BaudRate = FixedPcdGet64 (PcdUartDefaultBaudRate);\r
+ BaudRate = PcdGet64 (PcdUartDefaultBaudRate);\r
}\r
\r
if (ReceiveFifoDepth == 0) {\r
}\r
\r
if (Parity == DefaultParity) {\r
- Parity = (EFI_PARITY_TYPE)FixedPcdGet8 (PcdUartDefaultParity);\r
+ Parity = (EFI_PARITY_TYPE)PcdGet8 (PcdUartDefaultParity);\r
}\r
\r
if (DataBits == 0) {\r
- DataBits = FixedPcdGet8 (PcdUartDefaultDataBits);\r
+ DataBits = PcdGet8 (PcdUartDefaultDataBits);\r
}\r
\r
if (StopBits == DefaultStopBits) {\r
- StopBits = (EFI_STOP_BITS_TYPE) FixedPcdGet8 (PcdUartDefaultStopBits);\r
+ StopBits = (EFI_STOP_BITS_TYPE) PcdGet8 (PcdUartDefaultStopBits);\r
}\r
//\r
// 5 and 6 data bits can not be verified on a 16550A UART\r