blob: 6d77ebfaa539fcfb916f5ec83be7a537b71b4e61 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001# SPDX-License-Identifier: GPL-2.0+
Marian Balakowiczd62379d2006-09-01 19:49:50 +02002#
Jean-Christophe PLAGNIOL-VILLARD82ca9742007-11-24 21:26:56 +01003# (C) Copyright 2000-2007
Marian Balakowiczd62379d2006-09-01 19:49:50 +02004# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
Marian Balakowiczd62379d2006-09-01 19:49:50 +02005
Miquel Raynal68f73562019-10-25 19:39:31 +02006mtd-$(CONFIG_MTD) += mtdcore.o mtd_uboot.o
7mtd-$(CONFIG_DM_MTD) += mtd-uclass.o
8mtd-$(CONFIG_MTD_PARTITIONS) += mtdpart.o
9mtd-$(CONFIG_MTD_CONCAT) += mtdconcat.o
10mtd-$(CONFIG_ALTERA_QSPI) += altera_qspi.o
11mtd-$(CONFIG_FLASH_CFI_DRIVER) += cfi_flash.o
12mtd-$(CONFIG_FLASH_CFI_MTD) += cfi_mtd.o
13mtd-$(CONFIG_FLASH_CFI_LEGACY) += jedec_flash.o
Miquel Raynal68f73562019-10-25 19:39:31 +020014mtd-$(CONFIG_FLASH_PIC32) += pic32_flash.o
15mtd-$(CONFIG_ST_SMI) += st_smi.o
16mtd-$(CONFIG_STM32_FLASH) += stm32_flash.o
17mtd-$(CONFIG_RENESAS_RPC_HF) += renesas_rpc_hf.o
18mtd-$(CONFIG_HBMC_AM654) += hbmc-am654.o
19
20# U-Boot build
21ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)
Miquel Raynal1f1ae152018-08-16 17:30:07 +020022
Miquel Raynal68f73562019-10-25 19:39:31 +020023ifneq ($(mtd-y),)
24obj-y += mtd.o
25endif
Miquel Raynal1f1ae152018-08-16 17:30:07 +020026obj-y += nand/
Miquel Raynal68f73562019-10-25 19:39:31 +020027obj-y += onenand/
28obj-y += spi/
29obj-$(CONFIG_MTD_UBI) += ubi/
30
31#SPL/TPL build
32else
33
34ifneq ($(mtd-y),)
35obj-$(CONFIG_SPL_MTD_SUPPORT) += mtd.o
36endif
37obj-$(CONFIG_$(SPL_TPL_)NAND_SUPPORT) += nand/
38obj-$(CONFIG_SPL_ONENAND_SUPPORT) += onenand/
39obj-$(CONFIG_$(SPL_TPL_)SPI_FLASH_SUPPORT) += spi/
40obj-$(CONFIG_SPL_UBI) += ubispl/
41
42endif