TianoCore EDK2
master
Loading...
Searching...
No Matches
SdMmcPciHcPei.h
Go to the documentation of this file.
1
8
#ifndef _SD_MMC_PCI_HOST_CONTROLLER_PEI_H_
9
#define _SD_MMC_PCI_HOST_CONTROLLER_PEI_H_
10
11
#include <
PiPei.h
>
12
13
#include <
Ppi/MasterBootMode.h
>
14
#include <
Ppi/SdMmcHostController.h
>
15
16
#include <
IndustryStandard/Pci.h
>
17
18
#include <
Library/DebugLib.h
>
19
#include <
Library/BaseLib.h
>
20
#include <
Library/BaseMemoryLib.h
>
21
#include <
Library/PciLib.h
>
22
#include <
Library/PeiServicesLib.h
>
23
#include <
Library/MemoryAllocationLib.h
>
24
25
#define SD_MMC_HC_PEI_SIGNATURE SIGNATURE_32 ('S', 'D', 'M', 'C')
26
27
#define MAX_SD_MMC_HCS 8
28
#define MAX_SD_MMC_SLOTS 6
29
30
//
31
// SD Host Controller SlotInfo Register Offset
32
//
33
#define SD_MMC_HC_PEI_SLOT_OFFSET 0x40
34
35
typedef
struct
{
36
UINT8 FirstBar : 3;
// bit 0:2
37
UINT8 Reserved : 1;
// bit 3
38
UINT8 SlotNum : 3;
// bit 4:6
39
UINT8 Reserved1 : 1;
// bit 7
40
}
SD_MMC_HC_PEI_SLOT_INFO
;
41
42
typedef
struct
{
43
UINTN
SlotNum;
44
UINTN
MmioBarAddr[MAX_SD_MMC_SLOTS];
45
}
SD_MMC_HC_PEI_BAR
;
46
47
typedef
struct
{
48
UINTN
Signature;
49
EDKII_SD_MMC_HOST_CONTROLLER_PPI
SdMmcHostControllerPpi;
50
EFI_PEI_PPI_DESCRIPTOR
PpiList;
51
UINTN
TotalSdMmcHcs;
52
SD_MMC_HC_PEI_BAR
MmioBar[MAX_SD_MMC_HCS];
53
}
SD_MMC_HC_PEI_PRIVATE_DATA
;
54
55
#define SD_MMC_HC_PEI_PRIVATE_DATA_FROM_THIS(a) CR (a, SD_MMC_HC_PEI_PRIVATE_DATA, SdMmcHostControllerPpi, SD_MMC_HC_PEI_SIGNATURE)
56
71
EFI_STATUS
72
EFIAPI
73
GetSdMmcHcMmioBar
(
74
IN
EDKII_SD_MMC_HOST_CONTROLLER_PPI
*This,
75
IN
UINT8 ControllerId,
76
IN
OUT
UINTN
**MmioBar,
77
OUT
UINT8 *BarNum
78
);
79
80
#endif
UINTN
UINT64 UINTN
Definition:
ProcessorBind.h:112
BaseLib.h
BaseMemoryLib.h
MasterBootMode.h
IN
#define IN
Definition:
Base.h:279
OUT
#define OUT
Definition:
Base.h:284
Pci.h
DebugLib.h
PciLib.h
MemoryAllocationLib.h
PeiServicesLib.h
PiPei.h
SdMmcHostController.h
GetSdMmcHcMmioBar
EFI_STATUS EFIAPI GetSdMmcHcMmioBar(IN EDKII_SD_MMC_HOST_CONTROLLER_PPI *This, IN UINT8 ControllerId, IN OUT UINTN **MmioBar, OUT UINT8 *BarNum)
Definition:
SdMmcPciHcPei.c:36
EFI_STATUS
RETURN_STATUS EFI_STATUS
Definition:
UefiBaseType.h:29
_EDKII_SD_MMC_HOST_CONTROLLER_PPI
Definition:
SdMmcHostController.h:51
EFI_PEI_PPI_DESCRIPTOR
Definition:
PiPeiCis.h:90
SD_MMC_HC_PEI_BAR
Definition:
SdMmcPciHcPei.h:42
SD_MMC_HC_PEI_PRIVATE_DATA
Definition:
SdMmcPciHcPei.h:47
SD_MMC_HC_PEI_SLOT_INFO
Definition:
SdMmcPciHcPei.h:35
MdeModulePkg
Bus
Pci
SdMmcPciHcPei
SdMmcPciHcPei.h
Generated on Fri Nov 15 2024 18:01:09 for TianoCore EDK2 by
1.9.6