MdePkg[all]
1.08
|
Data Structures | |
struct | _EFI_SD_MMC_COMMAND_BLOCK |
struct | _EFI_SD_MMC_STATUS_BLOCK |
struct | _EFI_SD_MMC_PASS_THRU_COMMAND_PACKET |
struct | _EFI_SD_MMC_PASS_THRU_PROTOCOL |
Macros | |
#define | EFI_SD_MMC_PASS_THRU_PROTOCOL_GUID |
Typedefs | |
typedef struct _EFI_SD_MMC_PASS_THRU_PROTOCOL | EFI_SD_MMC_PASS_THRU_PROTOCOL |
typedef struct _EFI_SD_MMC_COMMAND_BLOCK | EFI_SD_MMC_COMMAND_BLOCK |
typedef struct _EFI_SD_MMC_STATUS_BLOCK | EFI_SD_MMC_STATUS_BLOCK |
typedef struct _EFI_SD_MMC_PASS_THRU_COMMAND_PACKET | EFI_SD_MMC_PASS_THRU_COMMAND_PACKET |
typedef IN UINT8 | Slot |
typedef IN UINT8 IN OUT EFI_SD_MMC_PASS_THRU_COMMAND_PACKET * | Packet |
typedef IN UINT8 IN OUT EFI_SD_MMC_PASS_THRU_COMMAND_PACKET IN EFI_EVENT | Event |
typedef IN UINT8 OUT EFI_DEVICE_PATH_PROTOCOL ** | DevicePath |
Functions | |
typedef | EFI_STATUS (EFIAPI *EFI_SD_MMC_PASS_THRU_PASSTHRU)(IN EFI_SD_MMC_PASS_THRU_PROTOCOL *This |
Variables | |
EFI_GUID | gEfiSdMmcPassThruProtocolGuid |
The EFI_SD_MMC_PASS_THRU_PROTOCOL provides the ability to send SD/MMC Commands to any SD/MMC device attached to the SD compatible pci host controller.
Copyright (c) 2015, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
#define EFI_SD_MMC_PASS_THRU_PROTOCOL_GUID |
typedef IN EFI_DEVICE_PATH_PROTOCOL* DevicePath |
typedef struct _EFI_SD_MMC_COMMAND_BLOCK EFI_SD_MMC_COMMAND_BLOCK |
typedef struct _EFI_SD_MMC_PASS_THRU_PROTOCOL EFI_SD_MMC_PASS_THRU_PROTOCOL |
typedef struct _EFI_SD_MMC_STATUS_BLOCK EFI_SD_MMC_STATUS_BLOCK |
typedef EFI_STATUS | ( | EFIAPI * | EFI_SD_MMC_PASS_THRU_RESET_DEVICE | ) |
Sends SD command to an SD card that is attached to the SD controller.
The PassThru() function sends the SD command specified by Packet to the SD card specified by Slot.
If Packet is successfully sent to the SD card, then EFI_SUCCESS is returned.
If a device error occurs while sending the Packet, then EFI_DEVICE_ERROR is returned.
If Slot is not in a valid range for the SD controller, then EFI_INVALID_PARAMETER is returned.
If Packet defines a data command but both InDataBuffer and OutDataBuffer are NULL, EFI_INVALID_PARAMETER is returned.
[in] | This | A pointer to the EFI_SD_MMC_PASS_THRU_PROTOCOL instance. |
[in] | Slot | The slot number of the SD card to send the command to. |
[in,out] | Packet | A pointer to the SD command data structure. |
[in] | Event | If Event is NULL, blocking I/O is performed. If Event is not NULL, then nonblocking I/O is performed, and Event will be signaled when the Packet completes. |
EFI_SUCCESS | The SD Command Packet was sent by the host. |
EFI_DEVICE_ERROR | A device error occurred while attempting to send the SD command Packet. |
EFI_INVALID_PARAMETER | Packet, Slot, or the contents of the Packet is invalid. |
EFI_INVALID_PARAMETER | Packet defines a data command but both InDataBuffer and OutDataBuffer are NULL. |
EFI_NO_MEDIA | SD Device not present in the Slot. |
EFI_UNSUPPORTED | The command described by the SD Command Packet is not supported by the host controller. |
EFI_BAD_BUFFER_SIZE | The InTransferLength or OutTransferLength exceeds the limit supported by SD card ( i.e. if the number of bytes exceed the Last LBA). |
Used to retrieve next slot numbers supported by the SD controller. The function returns information about all available slots (populated or not-populated).
The GetNextSlot() function retrieves the next slot number on an SD controller. If on input Slot is 0xFF, then the slot number of the first slot on the SD controller is returned.
If Slot is a slot number that was returned on a previous call to GetNextSlot(), then the slot number of the next slot on the SD controller is returned.
If Slot is not 0xFF and Slot was not returned on a previous call to GetNextSlot(), EFI_INVALID_PARAMETER is returned.
If Slot is the slot number of the last slot on the SD controller, then EFI_NOT_FOUND is returned.
[in] | This | A pointer to the EFI_SD_MMMC_PASS_THRU_PROTOCOL instance. |
[in,out] | Slot | On input, a pointer to a slot number on the SD controller. On output, a pointer to the next slot number on the SD controller. An input value of 0xFF retrieves the first slot number on the SD controller. |
EFI_SUCCESS | The next slot number on the SD controller was returned in Slot. |
EFI_NOT_FOUND | There are no more slots on this SD controller. |
EFI_INVALID_PARAMETER | Slot is not 0xFF and Slot was not returned on a previous call to GetNextSlot(). |
Used to allocate and build a device path node for an SD card on the SD controller.
The BuildDevicePath() function allocates and builds a single device node for the SD card specified by Slot.
If the SD card specified by Slot is not present on the SD controller, then EFI_NOT_FOUND is returned.
If DevicePath is NULL, then EFI_INVALID_PARAMETER is returned.
If there are not enough resources to allocate the device path node, then EFI_OUT_OF_RESOURCES is returned.
Otherwise, DevicePath is allocated with the boot service AllocatePool(), the contents of DevicePath are initialized to describe the SD card specified by Slot, and EFI_SUCCESS is returned.
[in] | This | A pointer to the EFI_SD_MMMC_PASS_THRU_PROTOCOL instance. |
[in] | Slot | Specifies the slot number of the SD card for which a device path node is to be allocated and built. |
[out] | DevicePath | A pointer to a single device path node that describes the SD card specified by Slot. This function is responsible for allocating the buffer DevicePath with the boot service AllocatePool(). It is the caller's responsibility to free DevicePath when the caller is finished with DevicePath. |
EFI_SUCCESS | The device path node that describes the SD card specified by Slot was allocated and returned in DevicePath. |
EFI_NOT_FOUND | The SD card specified by Slot does not exist on the SD controller. |
EFI_INVALID_PARAMETER | DevicePath is NULL. |
EFI_OUT_OF_RESOURCES | There are not enough resources to allocate DevicePath. |
This function retrieves an SD card slot number based on the input device path.
The GetSlotNumber() function retrieves slot number for the SD card specified by the DevicePath node. If DevicePath is NULL, EFI_INVALID_PARAMETER is returned.
If DevicePath is not a device path node type that the SD Pass Thru driver supports, EFI_UNSUPPORTED is returned.
[in] | This | A pointer to the EFI_SD_MMC_PASS_THRU_PROTOCOL instance. |
[in] | DevicePath | A pointer to the device path node that describes a SD card on the SD controller. |
[out] | Slot | On return, points to the slot number of an SD card on the SD controller. |
EFI_SUCCESS | SD card slot number is returned in Slot. |
EFI_INVALID_PARAMETER | Slot or DevicePath is NULL. |
EFI_UNSUPPORTED | DevicePath is not a device path node type that the SD Pass Thru driver supports. |
Resets an SD card that is connected to the SD controller.
The ResetDevice() function resets the SD card specified by Slot.
If this SD controller does not support a device reset operation, EFI_UNSUPPORTED is returned.
If Slot is not in a valid slot number for this SD controller, EFI_INVALID_PARAMETER is returned.
If the device reset operation is completed, EFI_SUCCESS is returned.
[in] | This | A pointer to the EFI_SD_MMC_PASS_THRU_PROTOCOL instance. |
[in] | Slot | Specifies the slot number of the SD card to be reset. |
EFI_SUCCESS | The SD card specified by Slot was reset. |
EFI_UNSUPPORTED | The SD controller does not support a device reset operation. |
EFI_INVALID_PARAMETER | Slot number is invalid. |
EFI_NO_MEDIA | SD Device not present in the Slot. |
EFI_DEVICE_ERROR | The reset command failed due to a device error |
EFI_GUID gEfiSdMmcPassThruProtocolGuid |