From: Jan Dąbroś jsd@semihalf.com
Improve PciEmulation driver in order to support SD/MMC controllers.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jan Dabros jsd@semihalf.com Signed-off-by: Marcin Wojtas mw@semihalf.com --- Platforms/Marvell/PciEmulation/PciEmulation.c | 4 ++++ Platforms/Marvell/PciEmulation/PciEmulation.h | 2 ++ 2 files changed, 6 insertions(+)
diff --git a/Platforms/Marvell/PciEmulation/PciEmulation.c b/Platforms/Marvell/PciEmulation/PciEmulation.c index 236838a..2d7c0d1 100644 --- a/Platforms/Marvell/PciEmulation/PciEmulation.c +++ b/Platforms/Marvell/PciEmulation/PciEmulation.c @@ -605,6 +605,10 @@ InstallDevices ( Private->ConfigSpace->Device.Bar[EFI_AHCI_BAR_INDEX] = Private->RootBridge.MemoryStart; break; + case SD_MMC_PCI_CLASS_CODE_NR: + Private->ConfigSpace->Device.Bar[EFI_SD_MMC_BAR_INDEX] = + Private->RootBridge.MemoryStart; + break; default: DEBUG((EFI_D_ERROR, "PciEmulation: Unknown PCI device. Abort.\n")); return EFI_D_ERROR; diff --git a/Platforms/Marvell/PciEmulation/PciEmulation.h b/Platforms/Marvell/PciEmulation/PciEmulation.h index 9dcd7e3..89b1858 100644 --- a/Platforms/Marvell/PciEmulation/PciEmulation.h +++ b/Platforms/Marvell/PciEmulation/PciEmulation.h @@ -47,9 +47,11 @@
#define XHCI_PCI_CLASS_CODE_NR 0x30030C #define AHCI_PCI_CLASS_CODE_NR 0x010601 +#define SD_MMC_PCI_CLASS_CODE_NR 0x010508
#define EFI_XHCI_BAR_INDEX 0x0 #define EFI_AHCI_BAR_INDEX 0x5 +#define EFI_SD_MMC_BAR_INDEX 0x0
typedef struct { ACPI_HID_DEVICE_PATH AcpiDevicePath;