blob: a2eb4359e966e09f67b62961af3a9dcaf9857775 [file] [log] [blame]
Patrick Georgic49d7a32020-05-08 22:50:46 +02001# SPDX-License-Identifier: GPL-2.0-only
Lee Leahyeef40eb2017-03-23 10:54:57 -07002
Lee Leahy48dbc662017-05-08 16:56:03 -07003ifeq ($(CONFIG_COMMONLIB_STORAGE),y)
Lee Leahyeef40eb2017-03-23 10:54:57 -07004
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
Lee Leahy48dbc662017-05-08 16:56:03 -070059ifeq ($(CONFIG_COMMONLIB_STORAGE_MMC),y)
Lee Leahyeef40eb2017-03-23 10:54:57 -070060bootblock-y += mmc.c
61verstage-y += mmc.c
62romstage-y += mmc.c
63postcar-y += mmc.c
64ramstage-y += mmc.c
Lee Leahy48dbc662017-05-08 16:56:03 -070065endif # CONFIG_COMMONLIB_STORAGE_MMC
Lee Leahyeef40eb2017-03-23 10:54:57 -070066
67# Determine if Secure Digital cards are supported
Lee Leahy48dbc662017-05-08 16:56:03 -070068ifeq ($(CONFIG_COMMONLIB_STORAGE_SD),y)
Lee Leahyeef40eb2017-03-23 10:54:57 -070069bootblock-y += sd.c
70verstage-y += sd.c
71romstage-y += sd.c
72postcar-y += sd.c
73ramstage-y += sd.c
Lee Leahy48dbc662017-05-08 16:56:03 -070074endif # CONFIG_COMMONLIB_STORAGE_SD
Lee Leahyeef40eb2017-03-23 10:54:57 -070075
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
Lee Leahy48dbc662017-05-08 16:56:03 -070094endif # CONFIG_COMMONLIB_STORAGE