]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Bus/Pci/Uhci/Dxe/uhchlp.c
Add DevicePathUtilities DevicePathToText DevciePathFromText USB2HostController protocols
[mirror_edk2.git] / EdkModulePkg / Bus / Pci / Uhci / Dxe / uhchlp.c
index 62d58eed789dc5105a5e2208ad4f54313d521930..74ddc6bb125c40c0646e915669839b05c39839f3 100644 (file)
@@ -49,13 +49,13 @@ Returns:
   // Perform 16bit Read in PCI IO Space\r
   //\r
   return PciIo->Io.Read (\r
-                    PciIo,\r
-                    EfiPciIoWidthUint16,\r
-                    USB_BAR_INDEX,\r
-                    (UINT64) PortOffset,\r
-                    1,\r
-                    Data\r
-                    );\r
+                     PciIo,\r
+                     EfiPciIoWidthUint16,\r
+                     USB_BAR_INDEX,\r
+                     (UINT64) PortOffset,\r
+                     1,\r
+                     Data\r
+                     );\r
 }\r
 \r
 EFI_STATUS\r
@@ -86,13 +86,13 @@ Returns:
   // Perform 32bit Read in PCI IO Space\r
   //\r
   return PciIo->Io.Read (\r
-                    PciIo,\r
-                    EfiPciIoWidthUint32,\r
-                    USB_BAR_INDEX,\r
-                    (UINT64) PortOffset,\r
-                    1,\r
-                    Data\r
-                    );\r
+                     PciIo,\r
+                     EfiPciIoWidthUint32,\r
+                     USB_BAR_INDEX,\r
+                     (UINT64) PortOffset,\r
+                     1,\r
+                     Data\r
+                     );\r
 }\r
 \r
 EFI_STATUS\r
@@ -123,13 +123,13 @@ Returns:
   // Perform 16bit Write in PCI IO Space\r
   //\r
   return PciIo->Io.Write (\r
-                    PciIo,\r
-                    EfiPciIoWidthUint16,\r
-                    USB_BAR_INDEX,\r
-                    (UINT64) PortOffset,\r
-                    1,\r
-                    &Data\r
-                    );\r
+                     PciIo,\r
+                     EfiPciIoWidthUint16,\r
+                     USB_BAR_INDEX,\r
+                     (UINT64) PortOffset,\r
+                     1,\r
+                     &Data\r
+                     );\r
 }\r
 \r
 EFI_STATUS\r
@@ -160,13 +160,13 @@ Returns:
   // Perform 32bit Write in PCI IO Space\r
   //\r
   return PciIo->Io.Write (\r
-                    PciIo,\r
-                    EfiPciIoWidthUint32,\r
-                    USB_BAR_INDEX,\r
-                    (UINT64) PortOffset,\r
-                    1,\r
-                    &Data\r
-                    );\r
+                     PciIo,\r
+                     EfiPciIoWidthUint32,\r
+                     USB_BAR_INDEX,\r
+                     (UINT64) PortOffset,\r
+                     1,\r
+                     &Data\r
+                     );\r
 }\r
 //\r
 //  USB register-base helper functions\r
@@ -657,10 +657,10 @@ Returns:
   EFI_STATUS  Status;\r
 \r
   Status = ReadUHCCommandReg (\r
-            HcDev->PciIo,\r
-            (UINT32) (USBCMD),\r
-            &CommandContent\r
-            );\r
+             HcDev->PciIo,\r
+             (UINT32) (USBCMD),\r
+             &CommandContent\r
+             );\r
 \r
   if ((CommandContent & USBCMD_MAXP) != USBCMD_MAXP) {\r
     CommandContent |= USBCMD_MAXP;\r
@@ -715,25 +715,25 @@ Returns:
   BufferSizeInBytes = 4096;\r
   BufferSizeInPages = EFI_SIZE_TO_PAGES (BufferSizeInBytes);\r
   Status = HcDev->PciIo->AllocateBuffer (\r
-                          HcDev->PciIo,\r
-                          AllocateAnyPages,\r
-                          EfiBootServicesData,\r
-                          BufferSizeInPages,\r
-                          &CommonBuffer,\r
-                          0\r
-                          );\r
+                           HcDev->PciIo,\r
+                           AllocateAnyPages,\r
+                           EfiBootServicesData,\r
+                           BufferSizeInPages,\r
+                           &CommonBuffer,\r
+                           0\r
+                           );\r
   if (EFI_ERROR (Status)) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
   Status = HcDev->PciIo->Map (\r
-                          HcDev->PciIo,\r
-                          EfiPciIoOperationBusMasterCommonBuffer,\r
-                          CommonBuffer,\r
-                          &BufferSizeInBytes,\r
-                          &MappedAddress,\r
-                          &Mapping\r
-                          );\r
+                           HcDev->PciIo,\r
+                           EfiPciIoOperationBusMasterCommonBuffer,\r
+                           CommonBuffer,\r
+                           &BufferSizeInBytes,\r
+                           &MappedAddress,\r
+                           &Mapping\r
+                           );\r
   if (EFI_ERROR (Status) || (BufferSizeInBytes != 4096)) {\r
     HcDev->PciIo->FreeBuffer (HcDev->PciIo, BufferSizeInPages, CommonBuffer);\r
     return EFI_UNSUPPORTED;\r
@@ -3589,13 +3589,13 @@ Returns:
   // and it is allocated as common buffer use.\r
   //\r
   Status = HcDev->PciIo->AllocateBuffer (\r
-                          HcDev->PciIo,\r
-                          AllocateAnyPages,\r
-                          EfiBootServicesData,\r
-                          MemoryBlockSizeInPages,\r
-                          &CommonBuffer,\r
-                          0\r
-                          );\r
+                           HcDev->PciIo,\r
+                           AllocateAnyPages,\r
+                           EfiBootServicesData,\r
+                           MemoryBlockSizeInPages,\r
+                           &CommonBuffer,\r
+                           0\r
+                           );\r
   if (EFI_ERROR (Status)) {\r
     gBS->FreePool ((*MemoryHeader)->BitArrayPtr);\r
     gBS->FreePool (*MemoryHeader);\r
@@ -3604,13 +3604,13 @@ Returns:
 \r
   MemoryBlockSizeInBytes = EFI_PAGES_TO_SIZE (MemoryBlockSizeInPages);\r
   Status = HcDev->PciIo->Map (\r
-                          HcDev->PciIo,\r
-                          EfiPciIoOperationBusMasterCommonBuffer,\r
-                          CommonBuffer,\r
-                          &MemoryBlockSizeInBytes,\r
-                          &MappedAddress,\r
-                          &Mapping\r
-                          );\r
+                           HcDev->PciIo,\r
+                           EfiPciIoOperationBusMasterCommonBuffer,\r
+                           CommonBuffer,\r
+                           &MemoryBlockSizeInBytes,\r
+                           &MappedAddress,\r
+                           &Mapping\r
+                           );\r
   //\r
   // if returned Mapped size is less than the size we request,do not support.\r
   //\r
@@ -3741,10 +3741,10 @@ Returns:
        TempHeaderPtr = TempHeaderPtr->Next) {\r
 \r
     Status = AllocMemInMemoryBlock (\r
-              TempHeaderPtr,\r
-              (VOID **) Pool,\r
-              RealAllocSize / 32\r
-              );\r
+               TempHeaderPtr,\r
+               (VOID **) Pool,\r
+               RealAllocSize / 32\r
+               );\r
     if (!EFI_ERROR (Status)) {\r
       ZeroMem (*Pool, AllocSize);\r
       return EFI_SUCCESS;\r
@@ -3777,10 +3777,10 @@ Returns:
   InsertMemoryHeaderToList (MemoryHeader, NewMemoryHeader);\r
 \r
   Status = AllocMemInMemoryBlock (\r
-            NewMemoryHeader,\r
-            (VOID **) Pool,\r
-            RealAllocSize / 32\r
-            );\r
+             NewMemoryHeader,\r
+             (VOID **) Pool,\r
+             RealAllocSize / 32\r
+             );\r
 \r
   if (!EFI_ERROR (Status)) {\r
     ZeroMem (*Pool, AllocSize);\r
@@ -4226,12 +4226,12 @@ TurnOffUSBEmulation (
   //\r
   Command = 0;\r
   PciIo->Pci.Write (\r
-              PciIo,\r
-              EfiPciIoWidthUint16,\r
-              USB_EMULATION,\r
-              1,\r
-              &Command\r
-              );\r
+               PciIo,\r
+               EfiPciIoWidthUint16,\r
+               USB_EMULATION,\r
+               1,\r
+               &Command\r
+               );\r
 \r
   return ;\r
 }\r