blob: 6dbc43a6d7a79f43e379c8833c2ad13f6f4779c3 [file] [log] [blame]
Stefan Reinauer1c56d9b2012-05-10 11:27:32 -07001# SPI flash driver interface
Vadim Bendeburyadcb0952014-05-01 12:23:09 -07002
Vadim Bendeburye31d2432016-04-09 18:33:49 -07003subdirs-y += tpm
4
Martin Roth3a543182015-09-28 15:27:24 -06005ifeq ($(CONFIG_SPI_CONSOLE),y)
6ramstage-y += spiconsole.c
Nico Huber653d5d32018-06-05 21:56:30 +02007smm-y += spiconsole.c
Martin Roth3a543182015-09-28 15:27:24 -06008endif
9
Nico Huber1d017362018-06-05 22:14:41 +020010# add SPI drivers per stage
11# $1 stage name
12# $2 optional _EARLY suffix for CONFIG_BOOT_DEVICE_SPI_FLASH_RW_NOMMAP(_EARLY)
13define add_spi_stage
14$(1)-y += spi-generic.c
15$(1)-y += bitbang.c
16$(1)-$(CONFIG_COMMON_CBFS_SPI_WRAPPER) += cbfs_spi.c
17$(1)-$(CONFIG_SPI_FLASH) += spi_flash.c
Xiang Wangb1349452019-08-27 15:57:23 +080018$(1)-$(CONFIG_SPI_SDCARD) += spi_sdcard.c
Nico Huber1d017362018-06-05 22:14:41 +020019$(1)-$(CONFIG_BOOT_DEVICE_SPI_FLASH_RW_NOMMAP$(2)) += boot_device_rw_nommap.c
20$(1)-$(CONFIG_CONSOLE_SPI_FLASH) += flashconsole.c
21$(1)-$(CONFIG_SPI_FLASH_ADESTO) += adesto.c
22$(1)-$(CONFIG_SPI_FLASH_AMIC) += amic.c
23$(1)-$(CONFIG_SPI_FLASH_ATMEL) += atmel.c
24$(1)-$(CONFIG_SPI_FLASH_EON) += eon.c
25$(1)-$(CONFIG_SPI_FLASH_GIGADEVICE) += gigadevice.c
26$(1)-$(CONFIG_SPI_FLASH_MACRONIX) += macronix.c
27$(1)-$(CONFIG_SPI_FLASH_SPANSION) += spansion.c
28$(1)-$(CONFIG_SPI_FLASH_SST) += sst.c
29$(1)-$(CONFIG_SPI_FLASH_STMICRO) += stmicro.c
30$(1)-$(CONFIG_SPI_FLASH_WINBOND) += winbond.c
31$(1)-$(CONFIG_SPI_FRAM_RAMTRON) += ramtron.c
32endef
Youness Alaouic4b4ff32017-05-11 10:36:29 -040033
Nico Huber1d017362018-06-05 22:14:41 +020034$(eval $(call add_spi_stage,bootblock,_EARLY))
35$(eval $(call add_spi_stage,romstage,_EARLY))
36$(eval $(call add_spi_stage,verstage,_EARLY))
37$(eval $(call add_spi_stage,postcar,_EARLY))
38$(eval $(call add_spi_stage,ramstage))
Duncan Laurie181bbdd2012-06-23 16:53:57 -070039ifeq ($(CONFIG_SPI_FLASH_SMM),y)
Nico Huber1d017362018-06-05 22:14:41 +020040$(eval $(call add_spi_stage,smm))
Idwer Vollering73a10182014-02-16 00:32:13 +000041endif