/* If no initialization is required, then return RETURN_SUCCESS. If the serial device was successfully initialized, then return RETURN_SUCCESS. If the serial device could not be initialized, then return RETURN_DEVICE_ERROR. */
RETURN_STATUS EFIAPI SerialPortInitialize(VOID)
/* If no initialization is required, then return RETURN_SUCCESS. If the serial device was successfully initialized, then return RETURN_SUCCESS. If the serial device could not be initialized, then return RETURN_DEVICE_ERROR. */
RETURN_STATUS EFIAPI SerialPortInitialize(VOID)
{
  if (SbiImplementsDbcn ()) {
    mHaveDbcn = TRUE;
    return RETURN_SUCCESS;
  }
  if (SbiImplementsLegacyPutchar ()) {
    mHaveLegacyPutchar = TRUE;
  }
  if (SbiImplementsLegacyGetchar ()) {
    mHaveLegacyGetchar = TRUE;
  }
  return (mHaveLegacyGetchar && mHaveLegacyPutchar) ?
         RETURN_SUCCESS :
         RETURN_DEVICE_ERROR;
}