2 UfsHcDxe driver is used to provide platform-dependent info, mainly UFS host controller
3 MMIO base, to upper layer UFS drivers.
5 Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #include "UfsPciHcDxe.h"
19 // NVM Express Driver Binding Protocol Instance
21 EFI_DRIVER_BINDING_PROTOCOL gUfsHcDriverBinding
= {
22 UfsHcDriverBindingSupported
,
23 UfsHcDriverBindingStart
,
24 UfsHcDriverBindingStop
,
31 // Template for Ufs host controller private data.
33 UFS_HOST_CONTROLLER_PRIVATE_DATA gUfsHcTemplate
= {
34 UFS_HC_PRIVATE_DATA_SIGNATURE
, // Signature
51 Get the MMIO base of the UFS host controller.
53 @param[in] This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance.
54 @param[out] MmioBar The MMIO base address of UFS host controller.
56 @retval EFI_SUCCESS The operation succeeds.
57 @retval others The operation fails.
62 IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL
*This
,
66 UFS_HOST_CONTROLLER_PRIVATE_DATA
*Private
;
67 EFI_PCI_IO_PROTOCOL
*PciIo
;
70 EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
*BarDesc
;
72 if ((This
== NULL
) || (MmioBar
== NULL
)) {
73 return EFI_INVALID_PARAMETER
;
77 Private
= UFS_HOST_CONTROLLER_PRIVATE_DATA_FROM_UFSHC (This
);
78 PciIo
= Private
->PciIo
;
79 BarIndex
= Private
->BarIndex
;
81 Status
= PciIo
->GetBarAttributes (
87 if (EFI_ERROR (Status
)) {
91 *MmioBar
= (UINTN
)BarDesc
->AddrRangeMin
;
99 Provides the UFS controller-specific addresses needed to access system memory.
101 @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance.
102 @param Operation Indicates if the bus master is going to read or write to system memory.
103 @param HostAddress The system memory address to map to the UFS controller.
104 @param NumberOfBytes On input the number of bytes to map. On output the number of bytes
106 @param DeviceAddress The resulting map address for the bus master UFS controller to use to
107 access the hosts HostAddress.
108 @param Mapping A resulting value to pass to Unmap().
110 @retval EFI_SUCCESS The range was mapped for the returned NumberOfBytes.
111 @retval EFI_UNSUPPORTED The HostAddress cannot be mapped as a common buffer.
112 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
113 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
114 @retval EFI_DEVICE_ERROR The system hardware could not map the requested address.
120 IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL
*This
,
121 IN EDKII_UFS_HOST_CONTROLLER_OPERATION Operation
,
122 IN VOID
*HostAddress
,
123 IN OUT UINTN
*NumberOfBytes
,
124 OUT EFI_PHYSICAL_ADDRESS
*DeviceAddress
,
128 UFS_HOST_CONTROLLER_PRIVATE_DATA
*Private
;
129 EFI_PCI_IO_PROTOCOL
*PciIo
;
132 if ((This
== NULL
) || (HostAddress
== NULL
) || (NumberOfBytes
== NULL
) || (DeviceAddress
== NULL
) || (Mapping
== NULL
)) {
133 return EFI_INVALID_PARAMETER
;
136 Private
= UFS_HOST_CONTROLLER_PRIVATE_DATA_FROM_UFSHC (This
);
137 PciIo
= Private
->PciIo
;
139 Status
= PciIo
->Map (PciIo
, (EFI_PCI_IO_PROTOCOL_OPERATION
)Operation
, HostAddress
, NumberOfBytes
, DeviceAddress
, Mapping
);
144 Completes the Map() operation and releases any corresponding resources.
146 @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance.
147 @param Mapping The mapping value returned from Map().
149 @retval EFI_SUCCESS The range was unmapped.
150 @retval EFI_DEVICE_ERROR The data was not committed to the target system memory.
156 IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL
*This
,
160 UFS_HOST_CONTROLLER_PRIVATE_DATA
*Private
;
161 EFI_PCI_IO_PROTOCOL
*PciIo
;
164 if ((This
== NULL
) || (Mapping
== NULL
)) {
165 return EFI_INVALID_PARAMETER
;
168 Private
= UFS_HOST_CONTROLLER_PRIVATE_DATA_FROM_UFSHC (This
);
169 PciIo
= Private
->PciIo
;
171 Status
= PciIo
->Unmap (PciIo
, Mapping
);
176 Allocates pages that are suitable for an EfiUfsHcOperationBusMasterCommonBuffer
179 @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance.
180 @param Type This parameter is not used and must be ignored.
181 @param MemoryType The type of memory to allocate, EfiBootServicesData or
182 EfiRuntimeServicesData.
183 @param Pages The number of pages to allocate.
184 @param HostAddress A pointer to store the base system memory address of the
186 @param Attributes The requested bit mask of attributes for the allocated range.
188 @retval EFI_SUCCESS The requested memory pages were allocated.
189 @retval EFI_UNSUPPORTED Attributes is unsupported. The only legal attribute bits are
190 MEMORY_WRITE_COMBINE and MEMORY_CACHED.
191 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
192 @retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated.
197 UfsHcAllocateBuffer (
198 IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL
*This
,
199 IN EFI_ALLOCATE_TYPE Type
,
200 IN EFI_MEMORY_TYPE MemoryType
,
202 OUT VOID
**HostAddress
,
206 UFS_HOST_CONTROLLER_PRIVATE_DATA
*Private
;
207 EFI_PCI_IO_PROTOCOL
*PciIo
;
210 if ((This
== NULL
) || (HostAddress
== NULL
)) {
211 return EFI_INVALID_PARAMETER
;
214 Private
= UFS_HOST_CONTROLLER_PRIVATE_DATA_FROM_UFSHC (This
);
215 PciIo
= Private
->PciIo
;
217 Status
= PciIo
->AllocateBuffer (PciIo
, Type
, MemoryType
, Pages
, HostAddress
, Attributes
);
222 Frees memory that was allocated with AllocateBuffer().
224 @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance.
225 @param Pages The number of pages to free.
226 @param HostAddress The base system memory address of the allocated range.
228 @retval EFI_SUCCESS The requested memory pages were freed.
229 @retval EFI_INVALID_PARAMETER The memory range specified by HostAddress and Pages
230 was not allocated with AllocateBuffer().
236 IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL
*This
,
241 UFS_HOST_CONTROLLER_PRIVATE_DATA
*Private
;
242 EFI_PCI_IO_PROTOCOL
*PciIo
;
245 if ((This
== NULL
) || (HostAddress
== NULL
)) {
246 return EFI_INVALID_PARAMETER
;
249 Private
= UFS_HOST_CONTROLLER_PRIVATE_DATA_FROM_UFSHC (This
);
250 PciIo
= Private
->PciIo
;
252 Status
= PciIo
->FreeBuffer (PciIo
, Pages
, HostAddress
);
257 Flushes all posted write transactions from the UFS bus to attached UFS device.
259 @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance.
261 @retval EFI_SUCCESS The posted write transactions were flushed from the UFS bus
262 to attached UFS device.
263 @retval EFI_DEVICE_ERROR The posted write transactions were not flushed from the UFS
264 bus to attached UFS device due to a hardware error.
270 IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL
*This
273 UFS_HOST_CONTROLLER_PRIVATE_DATA
*Private
;
274 EFI_PCI_IO_PROTOCOL
*PciIo
;
277 Private
= UFS_HOST_CONTROLLER_PRIVATE_DATA_FROM_UFSHC (This
);
278 PciIo
= Private
->PciIo
;
280 Status
= PciIo
->Flush (PciIo
);
285 Enable a UFS bus driver to access UFS MMIO registers in the UFS Host Controller memory space.
287 @param This A pointer to the EDKII_UFS_HOST_CONTROLLER_PROTOCOL instance.
288 @param Width Signifies the width of the memory operations.
289 @param Offset The offset within the UFS Host Controller MMIO space to start the
291 @param Count The number of memory operations to perform.
292 @param Buffer For read operations, the destination buffer to store the results.
293 For write operations, the source buffer to write data from.
295 @retval EFI_SUCCESS The data was read from or written to the UFS host controller.
296 @retval EFI_UNSUPPORTED The address range specified by Offset, Width, and Count is not
297 valid for the UFS Host Controller memory space.
298 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
299 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
305 IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL
*This
,
306 IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL_WIDTH Width
,
312 UFS_HOST_CONTROLLER_PRIVATE_DATA
*Private
;
313 EFI_PCI_IO_PROTOCOL
*PciIo
;
317 Private
= UFS_HOST_CONTROLLER_PRIVATE_DATA_FROM_UFSHC (This
);
318 PciIo
= Private
->PciIo
;
319 BarIndex
= Private
->BarIndex
;
321 Status
= PciIo
->Mem
.Read (PciIo
, (EFI_PCI_IO_PROTOCOL_WIDTH
)Width
, BarIndex
, Offset
, Count
, Buffer
);
327 Enable a UFS bus driver to access UFS MMIO registers in the UFS Host Controller memory space.
329 @param This A pointer to the EDKII_UFS_HOST_CONTROLLER_PROTOCOL instance.
330 @param Width Signifies the width of the memory operations.
331 @param Offset The offset within the UFS Host Controller MMIO space to start the
333 @param Count The number of memory operations to perform.
334 @param Buffer For read operations, the destination buffer to store the results.
335 For write operations, the source buffer to write data from.
337 @retval EFI_SUCCESS The data was read from or written to the UFS host controller.
338 @retval EFI_UNSUPPORTED The address range specified by Offset, Width, and Count is not
339 valid for the UFS Host Controller memory space.
340 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
341 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
347 IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL
*This
,
348 IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL_WIDTH Width
,
354 UFS_HOST_CONTROLLER_PRIVATE_DATA
*Private
;
355 EFI_PCI_IO_PROTOCOL
*PciIo
;
359 Private
= UFS_HOST_CONTROLLER_PRIVATE_DATA_FROM_UFSHC (This
);
360 PciIo
= Private
->PciIo
;
361 BarIndex
= Private
->BarIndex
;
363 Status
= PciIo
->Mem
.Write (PciIo
, (EFI_PCI_IO_PROTOCOL_WIDTH
)Width
, BarIndex
, Offset
, Count
, Buffer
);
369 Tests to see if this driver supports a given controller. If a child device is provided,
370 it further tests to see if this driver supports creating a handle for the specified child device.
372 This function checks to see if the driver specified by This supports the device specified by
373 ControllerHandle. Drivers will typically use the device path attached to
374 ControllerHandle and/or the services from the bus I/O abstraction attached to
375 ControllerHandle to determine if the driver supports ControllerHandle. This function
376 may be called many times during platform initialization. In order to reduce boot times, the tests
377 performed by this function must be very small, and take as little time as possible to execute. This
378 function must not change the state of any hardware devices, and this function must be aware that the
379 device specified by ControllerHandle may already be managed by the same driver or a
380 different driver. This function must match its calls to AllocatePages() with FreePages(),
381 AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
382 Since ControllerHandle may have been previously started by the same driver, if a protocol is
383 already in the opened state, then it must not be closed with CloseProtocol(). This is required
384 to guarantee the state of ControllerHandle is not modified by this function.
386 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
387 @param[in] ControllerHandle The handle of the controller to test. This handle
388 must support a protocol interface that supplies
389 an I/O abstraction to the driver.
390 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
391 parameter is ignored by device drivers, and is optional for bus
392 drivers. For bus drivers, if this parameter is not NULL, then
393 the bus driver must determine if the bus controller specified
394 by ControllerHandle and the child controller specified
395 by RemainingDevicePath are both supported by this
398 @retval EFI_SUCCESS The device specified by ControllerHandle and
399 RemainingDevicePath is supported by the driver specified by This.
400 @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and
401 RemainingDevicePath is already being managed by the driver
403 @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and
404 RemainingDevicePath is already being managed by a different
405 driver or an application that requires exclusive access.
406 Currently not implemented.
407 @retval EFI_UNSUPPORTED The device specified by ControllerHandle and
408 RemainingDevicePath is not supported by the driver specified by This.
412 UfsHcDriverBindingSupported (
413 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
414 IN EFI_HANDLE Controller
,
415 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
420 EFI_DEVICE_PATH_PROTOCOL
*ParentDevicePath
;
421 EFI_PCI_IO_PROTOCOL
*PciIo
;
425 ParentDevicePath
= NULL
;
429 // UfsHcDxe is a device driver, and should ingore the
430 // "RemainingDevicePath" according to EFI spec
432 Status
= gBS
->OpenProtocol (
434 &gEfiDevicePathProtocolGuid
,
435 (VOID
*) &ParentDevicePath
,
436 This
->DriverBindingHandle
,
438 EFI_OPEN_PROTOCOL_BY_DRIVER
440 if (EFI_ERROR (Status
)) {
442 // EFI_ALREADY_STARTED is also an error
447 // Close the protocol because we don't use it here
451 &gEfiDevicePathProtocolGuid
,
452 This
->DriverBindingHandle
,
457 // Now test the EfiPciIoProtocol
459 Status
= gBS
->OpenProtocol (
461 &gEfiPciIoProtocolGuid
,
463 This
->DriverBindingHandle
,
465 EFI_OPEN_PROTOCOL_BY_DRIVER
467 if (EFI_ERROR (Status
)) {
471 // Now further check the PCI header: Base class (offset 0x0B) and
472 // Sub Class (offset 0x0A). This controller should be an UFS controller
474 Status
= PciIo
->Pci
.Read (
481 if (EFI_ERROR (Status
)) {
484 &gEfiPciIoProtocolGuid
,
485 This
->DriverBindingHandle
,
488 return EFI_UNSUPPORTED
;
491 // Since we already got the PciData, we can close protocol to avoid to carry it on for multiple exit points.
495 &gEfiPciIoProtocolGuid
,
496 This
->DriverBindingHandle
,
501 // Examine UFS Host Controller PCI Configuration table fields
503 if (PciData
.Hdr
.ClassCode
[2] == PCI_CLASS_MASS_STORAGE
) {
504 if (PciData
.Hdr
.ClassCode
[1] == 0x09 ) { //UFS Controller Subclass
510 return EFI_UNSUPPORTED
;
518 Starts a device controller or a bus controller.
520 The Start() function is designed to be invoked from the EFI boot service ConnectController().
521 As a result, much of the error checking on the parameters to Start() has been moved into this
522 common boot service. It is legal to call Start() from other locations,
523 but the following calling restrictions must be followed or the system behavior will not be deterministic.
524 1. ControllerHandle must be a valid EFI_HANDLE.
525 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
526 EFI_DEVICE_PATH_PROTOCOL.
527 3. Prior to calling Start(), the Supported() function for the driver specified by This must
528 have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
530 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
531 @param[in] ControllerHandle The handle of the controller to start. This handle
532 must support a protocol interface that supplies
533 an I/O abstraction to the driver.
534 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
535 parameter is ignored by device drivers, and is optional for bus
536 drivers. For a bus driver, if this parameter is NULL, then handles
537 for all the children of Controller are created by this driver.
538 If this parameter is not NULL and the first Device Path Node is
539 not the End of Device Path Node, then only the handle for the
540 child device specified by the first Device Path Node of
541 RemainingDevicePath is created by this driver.
542 If the first Device Path Node of RemainingDevicePath is
543 the End of Device Path Node, no child handle is created by this
546 @retval EFI_SUCCESS The device was started.
547 @retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.
548 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
549 @retval Others The driver failded to start the device.
554 UfsHcDriverBindingStart (
555 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
556 IN EFI_HANDLE Controller
,
557 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
561 EFI_PCI_IO_PROTOCOL
*PciIo
;
562 UFS_HOST_CONTROLLER_PRIVATE_DATA
*Private
;
565 EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
*BarDesc
;
573 // Now test and open the EfiPciIoProtocol
575 Status
= gBS
->OpenProtocol (
577 &gEfiPciIoProtocolGuid
,
579 This
->DriverBindingHandle
,
581 EFI_OPEN_PROTOCOL_BY_DRIVER
584 // Status == 0 - A normal execution flow, SUCCESS and the program proceeds.
585 // Status == ALREADY_STARTED - A non-zero Status code returned. It indicates
586 // that the protocol has been opened and should be treated as a
587 // normal condition and the program proceeds. The Protocol will not
588 // opened 'again' by this call.
589 // Status != ALREADY_STARTED - Error status, terminate program execution
591 if (EFI_ERROR (Status
)) {
593 // EFI_ALREADY_STARTED is also an error
598 Private
= AllocateCopyPool (sizeof (UFS_HOST_CONTROLLER_PRIVATE_DATA
), &gUfsHcTemplate
);
599 if (Private
== NULL
) {
600 Status
= EFI_OUT_OF_RESOURCES
;
604 Private
->PciIo
= PciIo
;
606 for (BarIndex
= 0; BarIndex
< PCI_MAX_BAR
; BarIndex
++) {
607 Status
= PciIo
->GetBarAttributes (
613 if (Status
== EFI_UNSUPPORTED
) {
615 } else if (EFI_ERROR (Status
)) {
619 if (BarDesc
->ResType
== ACPI_ADDRESS_SPACE_TYPE_MEM
) {
620 Private
->BarIndex
= BarIndex
;
628 Status
= PciIo
->Attributes (
630 EfiPciIoAttributeOperationGet
,
632 &Private
->PciAttributes
635 if (EFI_ERROR (Status
)) {
639 Status
= PciIo
->Attributes (
641 EfiPciIoAttributeOperationSupported
,
646 if (!EFI_ERROR (Status
)) {
647 Supports
&= (UINT64
)EFI_PCI_DEVICE_ENABLE
;
648 Status
= PciIo
->Attributes (
650 EfiPciIoAttributeOperationEnable
,
659 /// Install UFS_HOST_CONTROLLER protocol
661 Status
= gBS
->InstallProtocolInterface (
663 &gEdkiiUfsHostControllerProtocolGuid
,
664 EFI_NATIVE_INTERFACE
,
665 (VOID
*)&(Private
->UfsHc
)
669 if (EFI_ERROR (Status
)) {
670 if ((Private
!= NULL
) && (Private
->PciAttributes
!= 0)) {
672 // Restore original PCI attributes
676 EfiPciIoAttributeOperationSet
,
677 Private
->PciAttributes
,
683 &gEfiPciIoProtocolGuid
,
684 This
->DriverBindingHandle
,
687 if (Private
!= NULL
) {
697 Stops a device controller or a bus controller.
699 The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
700 As a result, much of the error checking on the parameters to Stop() has been moved
701 into this common boot service. It is legal to call Stop() from other locations,
702 but the following calling restrictions must be followed or the system behavior will not be deterministic.
703 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
704 same driver's Start() function.
705 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid
706 EFI_HANDLE. In addition, all of these handles must have been created in this driver's
707 Start() function, and the Start() function must have called OpenProtocol() on
708 ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
710 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
711 @param[in] ControllerHandle A handle to the device being stopped. The handle must
712 support a bus specific I/O protocol for the driver
713 to use to stop the device.
714 @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
715 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
716 if NumberOfChildren is 0.
718 @retval EFI_SUCCESS The device was stopped.
719 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.
724 UfsHcDriverBindingStop (
725 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
726 IN EFI_HANDLE Controller
,
727 IN UINTN NumberOfChildren
,
728 IN EFI_HANDLE
*ChildHandleBuffer
732 UFS_HOST_CONTROLLER_PRIVATE_DATA
*Private
;
733 EDKII_UFS_HOST_CONTROLLER_PROTOCOL
*UfsHc
;
738 Status
= gBS
->OpenProtocol (
740 &gEdkiiUfsHostControllerProtocolGuid
,
742 This
->DriverBindingHandle
,
744 EFI_OPEN_PROTOCOL_GET_PROTOCOL
747 if (EFI_ERROR (Status
)) {
748 return EFI_DEVICE_ERROR
;
751 Private
= UFS_HOST_CONTROLLER_PRIVATE_DATA_FROM_UFSHC (UfsHc
);
753 Status
= gBS
->UninstallProtocolInterface (
755 &gEdkiiUfsHostControllerProtocolGuid
,
758 if (!EFI_ERROR (Status
)) {
760 // Restore original PCI attributes
762 Status
= Private
->PciIo
->Attributes (
764 EfiPciIoAttributeOperationSet
,
765 Private
->PciAttributes
,
768 ASSERT_EFI_ERROR (Status
);
771 // Close protocols opened by UFS host controller driver
775 &gEfiPciIoProtocolGuid
,
776 This
->DriverBindingHandle
,
787 The entry point for UFS host controller driver, used to install this driver on the ImageHandle.
789 @param[in] ImageHandle The firmware allocated handle for this driver image.
790 @param[in] SystemTable Pointer to the EFI system table.
792 @retval EFI_SUCCESS Driver loaded.
793 @retval other Driver not loaded.
799 IN EFI_HANDLE ImageHandle
,
800 IN EFI_SYSTEM_TABLE
*SystemTable
805 Status
= EfiLibInstallDriverBindingComponentName2 (
808 &gUfsHcDriverBinding
,
810 &gUfsHcComponentName
,
811 &gUfsHcComponentName2
813 ASSERT_EFI_ERROR (Status
);