]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c
IntelFrameworkModulePkg: Clean up source files
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Isa / IsaSerialDxe / Serial.c
index 7824d38a9ca8a1ddee3ead85c099296949ba3bdb..56c2d4dda7158fa654dbd32f0500187c3c47fe94 100644 (file)
@@ -90,7 +90,7 @@ SERIAL_DEV  gSerialDevTempate = {
   Check the device path node whether it's the Flow Control node or not.\r
 \r
   @param[in] FlowControl    The device path node to be checked.\r
-  \r
+\r
   @retval TRUE              It's the Flow Control node.\r
   @retval FALSE             It's not.\r
 \r
@@ -111,7 +111,7 @@ IsUartFlowControlNode (
   Check the device path node whether it contains Flow Control node or not.\r
 \r
   @param[in] DevicePath     The device path to be checked.\r
-  \r
+\r
   @retval TRUE              It contains the Flow Control node.\r
   @retval FALSE             It doesn't.\r
 \r
@@ -134,9 +134,9 @@ ContainsFlowControl (
 /**\r
   The user Entry Point for module IsaSerial. The user code starts with this function.\r
 \r
-  @param[in] ImageHandle    The firmware allocated handle for the EFI image.  \r
+  @param[in] ImageHandle    The firmware allocated handle for the EFI image.\r
   @param[in] SystemTable    A pointer to the EFI System Table.\r
-  \r
+\r
   @retval EFI_SUCCESS       The entry point is executed successfully.\r
   @retval other             Some error occurs when executing this entry point.\r
 \r
@@ -213,7 +213,7 @@ SerialControllerDriverSupported (
   //\r
   if (RemainingDevicePath != NULL) {\r
     //\r
-    // Check if RemainingDevicePath is the End of Device Path Node, \r
+    // Check if RemainingDevicePath is the End of Device Path Node,\r
     // if yes, go on checking other conditions\r
     //\r
     if (!IsDevicePathEnd (RemainingDevicePath)) {\r
@@ -230,27 +230,27 @@ SerialControllerDriverSupported (
                                         ) {\r
         goto Error;\r
       }\r
-  \r
+\r
       if (UartNode->BaudRate > SERIAL_PORT_MAX_BAUD_RATE) {\r
         goto Error;\r
       }\r
-  \r
+\r
       if (UartNode->Parity < NoParity || UartNode->Parity > SpaceParity) {\r
         goto Error;\r
       }\r
-  \r
+\r
       if (UartNode->DataBits < 5 || UartNode->DataBits > 8) {\r
         goto Error;\r
       }\r
-  \r
+\r
       if (UartNode->StopBits < OneStopBit || UartNode->StopBits > TwoStopBits) {\r
         goto Error;\r
       }\r
-  \r
+\r
       if ((UartNode->DataBits == 5) && (UartNode->StopBits == TwoStopBits)) {\r
         goto Error;\r
       }\r
-  \r
+\r
       if ((UartNode->DataBits >= 6) && (UartNode->DataBits <= 8) && (UartNode->StopBits == OneFiveStopBits)) {\r
         goto Error;\r
       }\r
@@ -510,7 +510,7 @@ SerialControllerDriverStart (
               // Clear the bits that are not allowed to pass to SetControl\r
               //\r
               Control &= (EFI_SERIAL_REQUEST_TO_SEND | EFI_SERIAL_DATA_TERMINAL_READY |\r
-                          EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE | EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE | \r
+                          EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE | EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE |\r
                           EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE);\r
               Status = SerialIo->SetControl (SerialIo, Control);\r
             }\r
@@ -529,7 +529,7 @@ SerialControllerDriverStart (
       //\r
       // If RemainingDevicePath is the End of Device Path Node,\r
       // skip enumerate any device and return EFI_SUCESSS\r
-      // \r
+      //\r
       return EFI_SUCCESS;\r
     }\r
   }\r
@@ -550,13 +550,13 @@ SerialControllerDriverStart (
   FlowControlMap                    = 0;\r
 \r
   //\r
-  // Check if RemainingDevicePath is NULL, \r
+  // Check if RemainingDevicePath is NULL,\r
   // if yes, use the values from the gSerialDevTempate as no remaining device path was\r
   // passed in.\r
   //\r
   if (RemainingDevicePath != NULL) {\r
     //\r
-    // If RemainingDevicePath isn't NULL, \r
+    // If RemainingDevicePath isn't NULL,\r
     // match the configuration of the RemainingDevicePath. IsHandleSupported()\r
     // already checked to make sure the RemainingDevicePath contains settings\r
     // that we can support.\r
@@ -577,7 +577,7 @@ SerialControllerDriverStart (
       SerialDevice->BaseAddress = (UINT16) SerialDevice->IsaIo->ResourceList->ResourceItem[Index].StartRange;\r
     }\r
   }\r
-  \r
+\r
   SerialDevice->HardwareFlowControl = (BOOLEAN) (FlowControlMap == UART_FLOW_CONTROL_HARDWARE);\r
 \r
   //\r
@@ -601,7 +601,7 @@ SerialControllerDriverStart (
 \r
   //\r
   // Build the device path by appending the UART node to the ParentDevicePath.\r
-  // The Uart setings are zero here, since  SetAttribute() will update them to match \r
+  // The Uart setings are zero here, since  SetAttribute() will update them to match\r
   // the default setings.\r
   //\r
   SerialDevice->DevicePath = AppendDevicePathNode (\r
@@ -853,7 +853,7 @@ IsaSerialFifoFull (
 \r
 /**\r
   Detect whether specific FIFO is empty or not.\r
\r
+\r
   @param  Fifo    A pointer to the Data Structure SERIAL_DEV_FIFO\r
 \r
   @return whether specific FIFO is empty or not\r
@@ -1022,7 +1022,7 @@ IsaSerialReceiveTransmit (
           Data = READ_RBR (SerialDevice->IsaIo, SerialDevice->BaseAddress);\r
 \r
           IsaSerialFifoAdd (&SerialDevice->Receive, Data);\r
-          \r
+\r
           //\r
           // For full handshake flow control, if receive buffer full\r
           // tell the peer to stop sending data.\r
@@ -1571,7 +1571,7 @@ IsaSerialSetControl (
   // first determine the parameter is invalid\r
   //\r
   if ((Control & (~(EFI_SERIAL_REQUEST_TO_SEND | EFI_SERIAL_DATA_TERMINAL_READY |\r
-                    EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE | EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE | \r
+                    EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE | EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE |\r
                     EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE))) != 0) {\r
     return EFI_UNSUPPORTED;\r
   }\r
@@ -1783,20 +1783,20 @@ IsaSerialWrite (
   //\r
   // Compute the number of bits in a single character.  This is a start bit,\r
   // followed by the number of data bits, followed by the number of stop bits.\r
-  // The number of stop bits is specified by an enumeration that includes \r
+  // The number of stop bits is specified by an enumeration that includes\r
   // support for 1.5 stop bits.  Treat 1.5 stop bits as 2 stop bits.\r
   //\r
-  BitsPerCharacter = \r
-    1 + \r
-    This->Mode->DataBits + \r
+  BitsPerCharacter =\r
+    1 +\r
+    This->Mode->DataBits +\r
     ((This->Mode->StopBits == TwoStopBits) ? 2 : This->Mode->StopBits);\r
 \r
   //\r
-  // Compute the timeout in microseconds to wait for a single byte to be \r
-  // transmitted.  The Mode structure contans a Timeout field that is the \r
-  // maximum time to transmit or receive a character.  However, many UARTs \r
+  // Compute the timeout in microseconds to wait for a single byte to be\r
+  // transmitted.  The Mode structure contans a Timeout field that is the\r
+  // maximum time to transmit or receive a character.  However, many UARTs\r
   // have a FIFO for transmits, so the time required to add one new character\r
-  // to the transmit FIFO may be the time required to flush a full FIFO.  If \r
+  // to the transmit FIFO may be the time required to flush a full FIFO.  If\r
   // the Timeout in the Mode structure is smaller than the time required to\r
   // flush a full FIFO at the current baud rate, then use a timeout value that\r
   // is required to flush a full transmit FIFO.\r
@@ -1809,7 +1809,7 @@ IsaSerialWrite (
                 NULL\r
                 )\r
               );\r
-  \r
+\r
   for (Index = 0; Index < *BufferSize; Index++) {\r
     IsaSerialFifoAdd (&SerialDevice->Transmit, CharBuffer[Index]);\r
 \r