blob: af5137e287807fc0407c2d4ad05c99e4d6eb29ec [file] [log] [blame]
Lee Leahyeef40eb2017-03-23 10:54:57 -07001#
2# This file is part of the coreboot project.
3#
4# Copyright (C) 2017 Intel Corporation.
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; version 2 of the License.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15
Lee Leahy48dbc662017-05-08 16:56:03 -070016ifeq ($(CONFIG_COMMONLIB_STORAGE),y)
Lee Leahyeef40eb2017-03-23 10:54:57 -070017
18bootblock-y += sd_mmc.c
19bootblock-y += storage.c
20
21verstage-y += sd_mmc.c
22verstage-y += storage.c
23
24romstage-y += sd_mmc.c
25romstage-y += storage.c
26
27postcar-y += sd_mmc.c
28postcar-y += storage.c
29
30ramstage-y += sd_mmc.c
31ramstage-y += storage.c
32
33# Determine the type of controller being used
34ifeq ($(CONFIG_SDHCI_CONTROLLER),y)
35bootblock-y += pci_sdhci.c
36bootblock-y += sdhci.c
37bootblock-$(CONFIG_SDHCI_ADMA_IN_BOOTBLOCK) += sdhci_adma.c
38bootblock-y += sdhci_display.c
39
40verstage-y += pci_sdhci.c
41verstage-y += sdhci.c
42verstage-$(CONFIG_SDHCI_ADMA_IN_VERSTAGE) += sdhci_adma.c
43verstage-y += sdhci_display.c
44
45romstage-y += pci_sdhci.c
46romstage-y += sdhci.c
47romstage-$(CONFIG_SDHCI_ADMA_IN_ROMSTAGE) += sdhci_adma.c
48romstage-y += sdhci_display.c
49
50postcar-y += pci_sdhci.c
51postcar-y += sdhci.c
52postcar-y += sdhci_adma.c
53postcar-y += sdhci_display.c
54
55ramstage-y += pci_sdhci.c
56ramstage-y += sdhci.c
57ramstage-y += sdhci_adma.c
58ramstage-y += sdhci_display.c
59
60# Determine if the bounce buffer is necessary
61ifeq ($(CONFIG_SDHCI_BOUNCE_BUFFER),y)
62bootblock-y += bouncebuf.c
63verstage-y += bouncebuf.c
64romstage-y += bouncebuf.c
65postcar-y += bouncebuf.c
66ramstage-y += bouncebuf.c
67endif # CONFIG_SDHCI_BOUNCE_BUFFER
68
69endif # CONFIG_SDHCI_CONTROLLER
70
71# Determine if MultiMediaCards or embedded MMC devices are supported
Lee Leahy48dbc662017-05-08 16:56:03 -070072ifeq ($(CONFIG_COMMONLIB_STORAGE_MMC),y)
Lee Leahyeef40eb2017-03-23 10:54:57 -070073bootblock-y += mmc.c
74verstage-y += mmc.c
75romstage-y += mmc.c
76postcar-y += mmc.c
77ramstage-y += mmc.c
Lee Leahy48dbc662017-05-08 16:56:03 -070078endif # CONFIG_COMMONLIB_STORAGE_MMC
Lee Leahyeef40eb2017-03-23 10:54:57 -070079
80# Determine if Secure Digital cards are supported
Lee Leahy48dbc662017-05-08 16:56:03 -070081ifeq ($(CONFIG_COMMONLIB_STORAGE_SD),y)
Lee Leahyeef40eb2017-03-23 10:54:57 -070082bootblock-y += sd.c
83verstage-y += sd.c
84romstage-y += sd.c
85postcar-y += sd.c
86ramstage-y += sd.c
Lee Leahy48dbc662017-05-08 16:56:03 -070087endif # CONFIG_COMMONLIB_STORAGE_SD
Lee Leahyeef40eb2017-03-23 10:54:57 -070088
89# Determine if erase operations are supported
90ifeq ($(CONFIG_STORAGE_ERASE),y)
91bootblock-$(CONFIG_STORAGE_EARLY_ERASE) += storage_erase.c
92verstage-$(CONFIG_STORAGE_EARLY_ERASE) += storage_erase.c
93romstage-y += storage_erase.c
94postcar-y += storage_erase.c
95ramstage-y += storage_erase.c
96endif # CONFIG_STORAGE_ERASE
97
98# Determine if write operations are supported
99ifeq ($(CONFIG_STORAGE_WRITE),y)
100bootblock-$(CONFIG_STORAGE_EARLY_WRITE) += storage_write.c
101verstage-$(CONFIG_STORAGE_EARLY_WRITE) += storage_write.c
102romstage-y += storage_write.c
103postcar-y += storage_write.c
104ramstage-y += storage_write.c
105endif # CONFIG_STORAGE_WRITE
106
Lee Leahy48dbc662017-05-08 16:56:03 -0700107endif # CONFIG_COMMONLIB_STORAGE