diff options
author | Liming Gao <liming.gao@intel.com> | 2018-06-27 21:08:52 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-06-28 11:19:45 +0800 |
commit | d1102dba7210b95e41d06c2338a22ba6af248645 (patch) | |
tree | 8b4af076b5d6f2aa7f35563d4defcca4d4bfdd87 /MdeModulePkg/Bus/Usb/UsbBusPei | |
parent | ca79bab7af4770c5eb578f6d495af01705aedb79 (diff) | |
download | edk2-d1102dba7210b95e41d06c2338a22ba6af248645.tar.gz edk2-d1102dba7210b95e41d06c2338a22ba6af248645.tar.bz2 edk2-d1102dba7210b95e41d06c2338a22ba6af248645.zip |
MdeModulePkg: Clean up source files
1. Do not use tab characters
2. No trailing white space in one line
3. All files must end with CRLF
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Diffstat (limited to 'MdeModulePkg/Bus/Usb/UsbBusPei')
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.c | 4 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.h | 2 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c | 4 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.h | 4 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf | 4 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.uni | 4 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPeiExtra.uni | 6 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusPei/UsbIoPeim.c | 10 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.c | 88 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.h | 14 |
10 files changed, 70 insertions, 70 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.c b/MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.c index ac930ee8ea..806602511c 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.c +++ b/MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.c @@ -2,7 +2,7 @@ Usb Hub Request Support In PEI Phase
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
-
+
This program and the accompanying materials
are licensed and made available under the terms and conditions
of the BSD License which accompanies this distribution. The
@@ -440,7 +440,7 @@ PeiDoHubConfig ( HubDescriptor = (EFI_USB_HUB_DESCRIPTOR *) HubDescBuffer;
//
- // Get the hub descriptor
+ // Get the hub descriptor
//
Status = PeiUsbHubReadDesc (
PeiServices,
diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.h b/MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.h index 341f6f32e3..385a14ec0d 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.h +++ b/MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.h @@ -2,7 +2,7 @@ Constants definitions for Usb Hub Peim
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
-
+
This program and the accompanying materials
are licensed and made available under the terms and conditions
of the BSD License which accompanies this distribution. The
diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c b/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c index 42be13ac3b..c5e599e2f7 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c +++ b/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c @@ -1,8 +1,8 @@ /** @file
Common Libarary for PEI USB
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved. <BR>
-
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved. <BR>
+
This program and the accompanying materials
are licensed and made available under the terms and conditions
of the BSD License which accompanies this distribution. The
diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.h b/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.h index 1ace89fbc3..35f47a35ec 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.h +++ b/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.h @@ -1,8 +1,8 @@ /** @file
Common Libarary for PEI USB
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved. <BR>
-
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved. <BR>
+
This program and the accompanying materials
are licensed and made available under the terms and conditions
of the BSD License which accompanies this distribution. The
diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf index 734619a2fa..0d81bf8dc2 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf +++ b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf @@ -1,7 +1,7 @@ ## @file
# The Usb Bus Peim driver is used to support recovery from usb device.
#
-# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions
@@ -54,7 +54,7 @@ [Pcd]
gEfiMdePkgTokenSpaceGuid.PcdUsbTransferTimeoutValue ## CONSUMES
-
+
[Ppis]
gPeiUsbIoPpiGuid ## PRODUCES
gPeiUsbHostControllerPpiGuid ## SOMETIMES_CONSUMES
diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.uni b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.uni index bd18fdbfec..672c6761a5 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.uni +++ b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.uni @@ -3,14 +3,14 @@ //
// The USB Bus PEIM driver is used to support recovery from USB devices.
//
-// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
//
// This program and the accompanying materials
// are licensed and made available under the terms and conditions
// of the BSD License which accompanies this distribution. The
// full text of the license may be found at
// http://opensource.org/licenses/bsd-license.php
-//
+//
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPeiExtra.uni b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPeiExtra.uni index a84da95a47..4b784a3b0c 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPeiExtra.uni +++ b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPeiExtra.uni @@ -1,7 +1,7 @@ // /** @file
// UsbBusPei Localized Strings and Content
//
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
//
// This program and the accompanying materials
// are licensed and made available under the terms and conditions
@@ -14,8 +14,8 @@ //
// **/
-#string STR_PROPERTIES_MODULE_NAME
-#language en-US
+#string STR_PROPERTIES_MODULE_NAME
+#language en-US
"USB Bus PEI Module for Recovery"
diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbIoPeim.c b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbIoPeim.c index d13a7ee0a3..5c659401ae 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbIoPeim.c +++ b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbIoPeim.c @@ -1,8 +1,8 @@ /** @file
The module is used to implement Usb Io PPI interfaces.
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved. <BR>
-
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved. <BR>
+
This program and the accompanying materials
are licensed and made available under the terms and conditions
of the BSD License which accompanies this distribution. The
@@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /**
Submits control transfer to a target USB device.
-
+
@param PeiServices The pointer of EFI_PEI_SERVICES.
@param This The pointer of PEI_USB_IO_PPI.
@param Request USB device request to send.
@@ -132,11 +132,11 @@ PeiUsbControlTransfer ( /**
Submits bulk transfer to a bulk endpoint of a USB device.
-
+
@param PeiServices The pointer of EFI_PEI_SERVICES.
@param This The pointer of PEI_USB_IO_PPI.
@param DeviceEndpoint Endpoint number and its direction in bit 7.
- @param Data A pointer to the buffer of data to transmit
+ @param Data A pointer to the buffer of data to transmit
from or receive into.
@param DataLength The lenght of the data buffer.
@param Timeout Indicates the maximum time, in millisecond, which the
diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.c b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.c index a4bb4d7aa7..10d5232e59 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.c +++ b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.c @@ -1,8 +1,8 @@ /** @file
The module to produce Usb Bus PPI.
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
-
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+
This program and the accompanying materials
are licensed and made available under the terms and conditions
of the BSD License which accompanies this distribution. The
@@ -37,7 +37,7 @@ EFI_PEI_PPI_DESCRIPTOR mUsbIoPpiList = { /**
The enumeration routine to detect device change.
-
+
@param PeiServices Describes the list of possible PEI Services.
@param UsbHcPpi The pointer of PEI_USB_HOST_CONTROLLER_PPI instance.
@param Usb2HcPpi The pointer of PEI_USB2_HOST_CONTROLLER_PPI instance.
@@ -56,7 +56,7 @@ PeiUsbEnumeration ( /**
Configure new detected usb device.
-
+
@param PeiServices Describes the list of possible PEI Services.
@param PeiUsbDevice The pointer of PEI_USB_DEVICE instance.
@param Port The port to be configured.
@@ -77,7 +77,7 @@ PeiConfigureUsbDevice ( /**
Get all configurations from a detected usb device.
-
+
@param PeiServices Describes the list of possible PEI Services.
@param PeiUsbDevice The pointer of PEI_USB_DEVICE instance.
@@ -94,7 +94,7 @@ PeiUsbGetAllConfiguration ( /**
Get the start position of next wanted descriptor.
-
+
@param Buffer Buffer containing data to parse.
@param Length Buffer length.
@param DescType Descriptor type.
@@ -116,7 +116,7 @@ GetExpectedDescriptor ( /**
The entrypoint of the module, it will enumerate all HCs.
-
+
@param FileHandle Handle of the file being invoked.
@param PeiServices Describes the list of possible PEI Services.
@@ -142,7 +142,7 @@ PeimInitializeUsb ( }
//
- // gPeiUsbHostControllerPpiGuid and gPeiUsb2HostControllerPpiGuid should not
+ // gPeiUsbHostControllerPpiGuid and gPeiUsb2HostControllerPpiGuid should not
// be produced at the same time
//
Index = 0;
@@ -176,18 +176,18 @@ PeimInitializeUsb ( Index,
NULL,
(VOID **) &Usb2HcPpi
- );
+ );
if (EFI_ERROR (Status)) {
//
// No more host controller, break out
//
break;
- }
- PeiUsbEnumeration ((EFI_PEI_SERVICES **) PeiServices, NULL, Usb2HcPpi);
+ }
+ PeiUsbEnumeration ((EFI_PEI_SERVICES **) PeiServices, NULL, Usb2HcPpi);
Index++;
}
}
-
+
if (Index == 0) {
return EFI_UNSUPPORTED;
}
@@ -198,7 +198,7 @@ PeimInitializeUsb ( /**
The Hub Enumeration just scans the hub ports one time. It also
doesn't support hot-plug.
-
+
@param PeiServices Describes the list of possible PEI Services.
@param PeiUsbDevice The pointer of PEI_USB_DEVICE instance.
@param CurrentAddress The DeviceAddress of usb device.
@@ -289,13 +289,13 @@ PeiHubEnumeration ( NewPeiUsbDevice->IsHub = 0x0;
NewPeiUsbDevice->DownStreamPortNo = 0x0;
- if (((PortStatus.PortChangeStatus & USB_PORT_STAT_C_RESET) == 0) ||
+ if (((PortStatus.PortChangeStatus & USB_PORT_STAT_C_RESET) == 0) ||
((PortStatus.PortStatus & (USB_PORT_STAT_CONNECTION | USB_PORT_STAT_ENABLE)) == 0)) {
//
- // If the port already has reset change flag and is connected and enabled, skip the port reset logic.
+ // If the port already has reset change flag and is connected and enabled, skip the port reset logic.
//
PeiResetHubPort (PeiServices, UsbIoPpi, (UINT8)(Index + 1));
-
+
PeiHubGetPortStatus (
PeiServices,
UsbIoPpi,
@@ -406,7 +406,7 @@ PeiHubEnumeration ( /**
The enumeration routine to detect device change.
-
+
@param PeiServices Describes the list of possible PEI Services.
@param UsbHcPpi The pointer of PEI_USB_HOST_CONTROLLER_PPI instance.
@param Usb2HcPpi The pointer of PEI_USB2_HOST_CONTROLLER_PPI instance.
@@ -440,7 +440,7 @@ PeiUsbEnumeration ( PeiServices,
Usb2HcPpi,
(UINT8 *) &NumOfRootPort
- );
+ );
} else if (UsbHcPpi != NULL) {
UsbHcPpi->GetRootHubPortNumber (
PeiServices,
@@ -464,7 +464,7 @@ PeiUsbEnumeration ( Usb2HcPpi,
(UINT8) Index,
&PortStatus
- );
+ );
} else {
UsbHcPpi->GetRootHubPortStatus (
PeiServices,
@@ -515,10 +515,10 @@ PeiUsbEnumeration ( PeiUsbDevice->IsHub = 0x0;
PeiUsbDevice->DownStreamPortNo = 0x0;
- if (((PortStatus.PortChangeStatus & USB_PORT_STAT_C_RESET) == 0) ||
+ if (((PortStatus.PortChangeStatus & USB_PORT_STAT_C_RESET) == 0) ||
((PortStatus.PortStatus & (USB_PORT_STAT_CONNECTION | USB_PORT_STAT_ENABLE)) == 0)) {
//
- // If the port already has reset change flag and is connected and enabled, skip the port reset logic.
+ // If the port already has reset change flag and is connected and enabled, skip the port reset logic.
//
ResetRootPort (
PeiServices,
@@ -550,7 +550,7 @@ PeiUsbEnumeration ( Usb2HcPpi,
(UINT8) Index,
EfiUsbPortResetChange
- );
+ );
} else {
UsbHcPpi->ClearRootHubPortFeature (
PeiServices,
@@ -650,7 +650,7 @@ PeiUsbEnumeration ( /**
Configure new detected usb device.
-
+
@param PeiServices Describes the list of possible PEI Services.
@param PeiUsbDevice The pointer of PEI_USB_DEVICE instance.
@param Port The port to be configured.
@@ -767,7 +767,7 @@ PeiConfigureUsbDevice ( /**
Get all configurations from a detected usb device.
-
+
@param PeiServices Describes the list of possible PEI Services.
@param PeiUsbDevice The pointer of PEI_USB_DEVICE instance.
@@ -920,7 +920,7 @@ PeiUsbGetAllConfiguration ( /**
Get the start position of next wanted descriptor.
-
+
@param Buffer Buffer containing data to parse.
@param Length Buffer length.
@param DescType Descriptor type.
@@ -998,7 +998,7 @@ GetExpectedDescriptor ( /**
Send reset signal over the given root hub port.
-
+
@param PeiServices Describes the list of possible PEI Services.
@param UsbHcPpi The pointer of PEI_USB_HOST_CONTROLLER_PPI instance.
@param Usb2HcPpi The pointer of PEI_USB2_HOST_CONTROLLER_PPI instance.
@@ -1022,7 +1022,7 @@ ResetRootPort ( if (Usb2HcPpi != NULL) {
MicroSecondDelay (200 * 1000);
-
+
//
// reset root port
//
@@ -1032,12 +1032,12 @@ ResetRootPort ( PortNum,
EfiUsbPortReset
);
-
+
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "SetRootHubPortFeature EfiUsbPortReset Failed\n"));
return;
}
-
+
//
// Drive the reset signal for at least 50ms. Check USB 2.0 Spec
// section 7.1.7.5 for timing requirements.
@@ -1053,7 +1053,7 @@ ResetRootPort ( PortNum,
EfiUsbPortReset
);
-
+
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "ClearRootHubPortFeature EfiUsbPortReset Failed\n"));
return;
@@ -1073,7 +1073,7 @@ ResetRootPort ( Usb2HcPpi,
PortNum,
&PortStatus
- );
+ );
if (EFI_ERROR (Status)) {
return;
}
@@ -1103,7 +1103,7 @@ ResetRootPort ( PortNum,
EfiUsbPortConnectChange
);
-
+
//
// Set port enable
//
@@ -1113,18 +1113,18 @@ ResetRootPort ( PortNum,
EfiUsbPortEnable
);
-
+
Usb2HcPpi->ClearRootHubPortFeature (
PeiServices,
Usb2HcPpi,
PortNum,
EfiUsbPortEnableChange
);
-
+
MicroSecondDelay ((RetryIndex + 1) * 50 * 1000);
} else {
MicroSecondDelay (200 * 1000);
-
+
//
// reset root port
//
@@ -1134,18 +1134,18 @@ ResetRootPort ( PortNum,
EfiUsbPortReset
);
-
+
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "SetRootHubPortFeature EfiUsbPortReset Failed\n"));
return;
}
-
+
//
// Drive the reset signal for at least 50ms. Check USB 2.0 Spec
// section 7.1.7.5 for timing requirements.
//
MicroSecondDelay (USB_SET_ROOT_PORT_RESET_STALL);
-
+
//
// clear reset root port
//
@@ -1155,12 +1155,12 @@ ResetRootPort ( PortNum,
EfiUsbPortReset
);
-
+
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "ClearRootHubPortFeature EfiUsbPortReset Failed\n"));
return;
}
-
+
MicroSecondDelay (USB_CLR_ROOT_PORT_RESET_STALL);
//
@@ -1175,7 +1175,7 @@ ResetRootPort ( UsbHcPpi,
PortNum,
&PortStatus
- );
+ );
if (EFI_ERROR (Status)) {
return;
}
@@ -1205,7 +1205,7 @@ ResetRootPort ( PortNum,
EfiUsbPortConnectChange
);
-
+
//
// Set port enable
//
@@ -1215,14 +1215,14 @@ ResetRootPort ( PortNum,
EfiUsbPortEnable
);
-
+
UsbHcPpi->ClearRootHubPortFeature (
PeiServices,
UsbHcPpi,
PortNum,
EfiUsbPortEnableChange
);
-
+
MicroSecondDelay ((RetryIndex + 1) * 50 * 1000);
}
return;
diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.h b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.h index dff8eeb202..1610974537 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.h +++ b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.h @@ -1,8 +1,8 @@ /** @file
Usb Peim definition.
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved. <BR>
-
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved. <BR>
+
This program and the accompanying materials
are licensed and made available under the terms and conditions
of the BSD License which accompanies this distribution. The
@@ -88,7 +88,7 @@ typedef struct { #define USB_WAIT_PORT_STS_CHANGE_STALL (100)
//
-// Host software return timeout if port status doesn't change
+// Host software return timeout if port status doesn't change
// after 500ms(LOOP * STALL = 5000 * 0.1ms), set by experience
//
#define USB_WAIT_PORT_STS_CHANGE_LOOP 5000
@@ -112,7 +112,7 @@ typedef struct { /**
Submits control transfer to a target USB device.
-
+
@param PeiServices The pointer of EFI_PEI_SERVICES.
@param This The pointer of PEI_USB_IO_PPI.
@param Request USB device request to send.
@@ -144,11 +144,11 @@ PeiUsbControlTransfer ( /**
Submits bulk transfer to a bulk endpoint of a USB device.
-
+
@param PeiServices The pointer of EFI_PEI_SERVICES.
@param This The pointer of PEI_USB_IO_PPI.
@param DeviceEndpoint Endpoint number and its direction in bit 7.
- @param Data A pointer to the buffer of data to transmit
+ @param Data A pointer to the buffer of data to transmit
from or receive into.
@param DataLength The lenght of the data buffer.
@param Timeout Indicates the maximum time, in millisecond, which the
@@ -233,7 +233,7 @@ PeiUsbPortReset ( /**
Send reset signal over the given root hub port.
-
+
@param PeiServices Describes the list of possible PEI Services.
@param UsbHcPpi The pointer of PEI_USB_HOST_CONTROLLER_PPI instance.
@param Usb2HcPpi The pointer of PEI_USB2_HOST_CONTROLLER_PPI instance.
|