xref: /aosp_15_r20/external/coreboot/src/commonlib/storage/Makefile.mk (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1# SPDX-License-Identifier: GPL-2.0-only
2
3ifeq ($(CONFIG_COMMONLIB_STORAGE),y)
4
5bootblock-y += sd_mmc.c
6bootblock-y += storage.c
7
8verstage-y += sd_mmc.c
9verstage-y += storage.c
10
11romstage-y += sd_mmc.c
12romstage-y += storage.c
13
14postcar-y += sd_mmc.c
15postcar-y += storage.c
16
17ramstage-y += sd_mmc.c
18ramstage-y += storage.c
19
20# Determine the type of controller being used
21ifeq ($(CONFIG_SDHCI_CONTROLLER),y)
22bootblock-y += pci_sdhci.c
23bootblock-y += sdhci.c
24bootblock-$(CONFIG_SDHCI_ADMA_IN_BOOTBLOCK) += sdhci_adma.c
25bootblock-y += sdhci_display.c
26
27verstage-y += pci_sdhci.c
28verstage-y += sdhci.c
29verstage-$(CONFIG_SDHCI_ADMA_IN_VERSTAGE) += sdhci_adma.c
30verstage-y += sdhci_display.c
31
32romstage-y += pci_sdhci.c
33romstage-y += sdhci.c
34romstage-$(CONFIG_SDHCI_ADMA_IN_ROMSTAGE) += sdhci_adma.c
35romstage-y += sdhci_display.c
36
37postcar-y += pci_sdhci.c
38postcar-y += sdhci.c
39postcar-y += sdhci_adma.c
40postcar-y += sdhci_display.c
41
42ramstage-y += pci_sdhci.c
43ramstage-y += sdhci.c
44ramstage-y += sdhci_adma.c
45ramstage-y += sdhci_display.c
46
47# Determine if the bounce buffer is necessary
48ifeq ($(CONFIG_SDHCI_BOUNCE_BUFFER),y)
49bootblock-y += bouncebuf.c
50verstage-y += bouncebuf.c
51romstage-y += bouncebuf.c
52postcar-y += bouncebuf.c
53ramstage-y += bouncebuf.c
54endif # CONFIG_SDHCI_BOUNCE_BUFFER
55
56endif # CONFIG_SDHCI_CONTROLLER
57
58# Determine if MultiMediaCards or embedded MMC devices are supported
59ifeq ($(CONFIG_COMMONLIB_STORAGE_MMC),y)
60bootblock-y += mmc.c
61verstage-y += mmc.c
62romstage-y += mmc.c
63postcar-y += mmc.c
64ramstage-y += mmc.c
65endif # CONFIG_COMMONLIB_STORAGE_MMC
66
67# Determine if Secure Digital cards are supported
68ifeq ($(CONFIG_COMMONLIB_STORAGE_SD),y)
69bootblock-y += sd.c
70verstage-y += sd.c
71romstage-y += sd.c
72postcar-y += sd.c
73ramstage-y += sd.c
74endif # CONFIG_COMMONLIB_STORAGE_SD
75
76# Determine if erase operations are supported
77ifeq ($(CONFIG_STORAGE_ERASE),y)
78bootblock-$(CONFIG_STORAGE_EARLY_ERASE) += storage_erase.c
79verstage-$(CONFIG_STORAGE_EARLY_ERASE) += storage_erase.c
80romstage-y += storage_erase.c
81postcar-y += storage_erase.c
82ramstage-y += storage_erase.c
83endif # CONFIG_STORAGE_ERASE
84
85# Determine if write operations are supported
86ifeq ($(CONFIG_STORAGE_WRITE),y)
87bootblock-$(CONFIG_STORAGE_EARLY_WRITE) += storage_write.c
88verstage-$(CONFIG_STORAGE_EARLY_WRITE) += storage_write.c
89romstage-y += storage_write.c
90postcar-y += storage_write.c
91ramstage-y += storage_write.c
92endif # CONFIG_STORAGE_WRITE
93
94endif # CONFIG_COMMONLIB_STORAGE
95