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