1# 2# (C) Copyright 2006 3# Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4# 5# SPDX-License-Identifier: GPL-2.0+ 6# 7 8include $(TOPDIR)/config.mk 9 10LIB := $(obj)libnand.o 11 12ifdef CONFIG_CMD_NAND 13 14ifdef CONFIG_SPL_BUILD 15 16ifdef CONFIG_SPL_NAND_DRIVERS 17NORMAL_DRIVERS=y 18endif 19 20COBJS-$(CONFIG_SPL_NAND_AM33XX_BCH) += am335x_spl_bch.o 21COBJS-$(CONFIG_SPL_NAND_DOCG4) += docg4_spl.o 22COBJS-$(CONFIG_SPL_NAND_SIMPLE) += nand_spl_simple.o 23COBJS-$(CONFIG_SPL_NAND_LOAD) += nand_spl_load.o 24COBJS-$(CONFIG_SPL_NAND_ECC) += nand_ecc.o 25COBJS-$(CONFIG_SPL_NAND_BASE) += nand_base.o 26 27else # not spl 28 29NORMAL_DRIVERS=y 30 31COBJS-y += nand.o 32COBJS-y += nand_bbt.o 33COBJS-y += nand_ids.o 34COBJS-y += nand_util.o 35COBJS-y += nand_ecc.o 36COBJS-y += nand_base.o 37 38endif # not spl 39 40ifdef NORMAL_DRIVERS 41 42COBJS-$(CONFIG_NAND_ECC_BCH) += nand_bch.o 43 44COBJS-$(CONFIG_NAND_ATMEL) += atmel_nand.o 45COBJS-$(CONFIG_DRIVER_NAND_BFIN) += bfin_nand.o 46COBJS-$(CONFIG_NAND_DAVINCI) += davinci_nand.o 47COBJS-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o 48COBJS-$(CONFIG_NAND_FSL_IFC) += fsl_ifc_nand.o 49COBJS-$(CONFIG_NAND_FSL_UPM) += fsl_upm.o 50COBJS-$(CONFIG_NAND_FSMC) += fsmc_nand.o 51COBJS-$(CONFIG_NAND_JZ4740) += jz4740_nand.o 52COBJS-$(CONFIG_NAND_KB9202) += kb9202_nand.o 53COBJS-$(CONFIG_NAND_KIRKWOOD) += kirkwood_nand.o 54COBJS-$(CONFIG_NAND_KMETER1) += kmeter1_nand.o 55COBJS-$(CONFIG_NAND_MPC5121_NFC) += mpc5121_nfc.o 56COBJS-$(CONFIG_NAND_MXC) += mxc_nand.o 57COBJS-$(CONFIG_NAND_MXS) += mxs_nand.o 58COBJS-$(CONFIG_NAND_NDFC) += ndfc.o 59COBJS-$(CONFIG_NAND_NOMADIK) += nomadik.o 60COBJS-$(CONFIG_NAND_S3C2410) += s3c2410_nand.o 61COBJS-$(CONFIG_NAND_SPEAR) += spr_nand.o 62COBJS-$(CONFIG_TEGRA_NAND) += tegra_nand.o 63COBJS-$(CONFIG_NAND_OMAP_GPMC) += omap_gpmc.o 64COBJS-$(CONFIG_NAND_PLAT) += nand_plat.o 65COBJS-$(CONFIG_NAND_DOCG4) += docg4.o 66 67else # minimal SPL drivers 68 69COBJS-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_spl.o 70COBJS-$(CONFIG_NAND_FSL_IFC) += fsl_ifc_spl.o 71COBJS-$(CONFIG_NAND_MXC) += mxc_nand_spl.o 72 73endif # drivers 74endif # nand 75 76COBJS := $(COBJS-y) 77SRCS := $(COBJS:.o=.c) 78OBJS := $(addprefix $(obj),$(COBJS)) 79 80all: $(LIB) 81 82$(LIB): $(obj).depend $(OBJS) 83 $(call cmd_link_o_target, $(OBJS)) 84 85######################################################################### 86 87# defines $(obj).depend target 88include $(SRCTREE)/rules.mk 89 90sinclude $(obj).depend 91 92######################################################################### 93