Lee Leahy | eef40eb | 2017-03-23 10:54:57 -0700 | [diff] [blame] | 1 | # |
| 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 Leahy | 48dbc66 | 2017-05-08 16:56:03 -0700 | [diff] [blame] | 16 | ifeq ($(CONFIG_COMMONLIB_STORAGE),y) |
Lee Leahy | eef40eb | 2017-03-23 10:54:57 -0700 | [diff] [blame] | 17 | |
| 18 | bootblock-y += sd_mmc.c |
| 19 | bootblock-y += storage.c |
| 20 | |
| 21 | verstage-y += sd_mmc.c |
| 22 | verstage-y += storage.c |
| 23 | |
| 24 | romstage-y += sd_mmc.c |
| 25 | romstage-y += storage.c |
| 26 | |
| 27 | postcar-y += sd_mmc.c |
| 28 | postcar-y += storage.c |
| 29 | |
| 30 | ramstage-y += sd_mmc.c |
| 31 | ramstage-y += storage.c |
| 32 | |
| 33 | # Determine the type of controller being used |
| 34 | ifeq ($(CONFIG_SDHCI_CONTROLLER),y) |
| 35 | bootblock-y += pci_sdhci.c |
| 36 | bootblock-y += sdhci.c |
| 37 | bootblock-$(CONFIG_SDHCI_ADMA_IN_BOOTBLOCK) += sdhci_adma.c |
| 38 | bootblock-y += sdhci_display.c |
| 39 | |
| 40 | verstage-y += pci_sdhci.c |
| 41 | verstage-y += sdhci.c |
| 42 | verstage-$(CONFIG_SDHCI_ADMA_IN_VERSTAGE) += sdhci_adma.c |
| 43 | verstage-y += sdhci_display.c |
| 44 | |
| 45 | romstage-y += pci_sdhci.c |
| 46 | romstage-y += sdhci.c |
| 47 | romstage-$(CONFIG_SDHCI_ADMA_IN_ROMSTAGE) += sdhci_adma.c |
| 48 | romstage-y += sdhci_display.c |
| 49 | |
| 50 | postcar-y += pci_sdhci.c |
| 51 | postcar-y += sdhci.c |
| 52 | postcar-y += sdhci_adma.c |
| 53 | postcar-y += sdhci_display.c |
| 54 | |
| 55 | ramstage-y += pci_sdhci.c |
| 56 | ramstage-y += sdhci.c |
| 57 | ramstage-y += sdhci_adma.c |
| 58 | ramstage-y += sdhci_display.c |
| 59 | |
| 60 | # Determine if the bounce buffer is necessary |
| 61 | ifeq ($(CONFIG_SDHCI_BOUNCE_BUFFER),y) |
| 62 | bootblock-y += bouncebuf.c |
| 63 | verstage-y += bouncebuf.c |
| 64 | romstage-y += bouncebuf.c |
| 65 | postcar-y += bouncebuf.c |
| 66 | ramstage-y += bouncebuf.c |
| 67 | endif # CONFIG_SDHCI_BOUNCE_BUFFER |
| 68 | |
| 69 | endif # CONFIG_SDHCI_CONTROLLER |
| 70 | |
| 71 | # Determine if MultiMediaCards or embedded MMC devices are supported |
Lee Leahy | 48dbc66 | 2017-05-08 16:56:03 -0700 | [diff] [blame] | 72 | ifeq ($(CONFIG_COMMONLIB_STORAGE_MMC),y) |
Lee Leahy | eef40eb | 2017-03-23 10:54:57 -0700 | [diff] [blame] | 73 | bootblock-y += mmc.c |
| 74 | verstage-y += mmc.c |
| 75 | romstage-y += mmc.c |
| 76 | postcar-y += mmc.c |
| 77 | ramstage-y += mmc.c |
Lee Leahy | 48dbc66 | 2017-05-08 16:56:03 -0700 | [diff] [blame] | 78 | endif # CONFIG_COMMONLIB_STORAGE_MMC |
Lee Leahy | eef40eb | 2017-03-23 10:54:57 -0700 | [diff] [blame] | 79 | |
| 80 | # Determine if Secure Digital cards are supported |
Lee Leahy | 48dbc66 | 2017-05-08 16:56:03 -0700 | [diff] [blame] | 81 | ifeq ($(CONFIG_COMMONLIB_STORAGE_SD),y) |
Lee Leahy | eef40eb | 2017-03-23 10:54:57 -0700 | [diff] [blame] | 82 | bootblock-y += sd.c |
| 83 | verstage-y += sd.c |
| 84 | romstage-y += sd.c |
| 85 | postcar-y += sd.c |
| 86 | ramstage-y += sd.c |
Lee Leahy | 48dbc66 | 2017-05-08 16:56:03 -0700 | [diff] [blame] | 87 | endif # CONFIG_COMMONLIB_STORAGE_SD |
Lee Leahy | eef40eb | 2017-03-23 10:54:57 -0700 | [diff] [blame] | 88 | |
| 89 | # Determine if erase operations are supported |
| 90 | ifeq ($(CONFIG_STORAGE_ERASE),y) |
| 91 | bootblock-$(CONFIG_STORAGE_EARLY_ERASE) += storage_erase.c |
| 92 | verstage-$(CONFIG_STORAGE_EARLY_ERASE) += storage_erase.c |
| 93 | romstage-y += storage_erase.c |
| 94 | postcar-y += storage_erase.c |
| 95 | ramstage-y += storage_erase.c |
| 96 | endif # CONFIG_STORAGE_ERASE |
| 97 | |
| 98 | # Determine if write operations are supported |
| 99 | ifeq ($(CONFIG_STORAGE_WRITE),y) |
| 100 | bootblock-$(CONFIG_STORAGE_EARLY_WRITE) += storage_write.c |
| 101 | verstage-$(CONFIG_STORAGE_EARLY_WRITE) += storage_write.c |
| 102 | romstage-y += storage_write.c |
| 103 | postcar-y += storage_write.c |
| 104 | ramstage-y += storage_write.c |
| 105 | endif # CONFIG_STORAGE_WRITE |
| 106 | |
Lee Leahy | 48dbc66 | 2017-05-08 16:56:03 -0700 | [diff] [blame] | 107 | endif # CONFIG_COMMONLIB_STORAGE |